manju70
asked on
how to create relationships in mysql using phpMyAdmin
Hai all,
I want to know how to create relationships between the tables in mysql using phpMyAdmin software.
Anyone who r familiar with it pls solve my problem
Thankyou
Manju
I want to know how to create relationships between the tables in mysql using phpMyAdmin software.
Anyone who r familiar with it pls solve my problem
Thankyou
Manju
ASKER
At first I thank, for your comments.
but, if I wanted to load data in a foreign key field then how am I to ensure whether the corresponding primary key field is available in master table(like in Ms access ).
if mysql doesn't supports this features,is any other free software which supports it is available?????
thanks in advance
manju
but, if I wanted to load data in a foreign key field then how am I to ensure whether the corresponding primary key field is available in master table(like in Ms access ).
if mysql doesn't supports this features,is any other free software which supports it is available?????
thanks in advance
manju
If you have two tables:
users
~~~~~
userID
username
password
demographics
~~~~~~~~~~~~
userID
age
sex
race
Your SQL query would be: "select * from users, demographics where users.userID=demographics. userID" to get the data from both tables
users
~~~~~
userID
username
password
demographics
~~~~~~~~~~~~
userID
age
sex
race
Your SQL query would be: "select * from users, demographics where users.userID=demographics.
but, if I wanted to load data in a foreign key field then how am I to ensure whether the corresponding
primary key field is available in master table(like in Ms access ).
You should be using JOINS to do this.
My friend esnagel has suggested you how do to same using LEFT JOIN.
But if you want more features Try PostGRE SQL.
http://www.at.postgresql.org/
JD
primary key field is available in master table(like in Ms access ).
You should be using JOINS to do this.
My friend esnagel has suggested you how do to same using LEFT JOIN.
But if you want more features Try PostGRE SQL.
http://www.at.postgresql.org/
JD
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Zuhair
thats heck of a software !!!
JD
thats heck of a software !!!
JD
But: mySQL is still a relational database management system(RDBMS), but the relations between tables are not physical. If I have 2 tables
"score"
ID int
studentID int
score varchar(5)
and the table "student"
ID int
firstname varchar(32)
lastname varchar(32),
they stand alone without a physical connection. But with the studentID in the table score I have constructed the tables as if there were a physical relation between them, and I could use SQL-querys as in other DB_systems.