Results 1 to 2 of 2
2003-02-28, 15:27 #1
- Join Date
- Dec 2002
- New Orleans, Louisiana, USA
- Thanked 0 Times in 0 Posts
need a lesson on relationships (2000)
I am creating a database to keep up with information on patients. I seem to be confused about database relationships.Under join properties, I selected option 2 "Include all records from T_Demographics (my main table) and only those from T_CallData where the joined fields are equal. I joined on the RNA_ID field which is my primary key in each table. I want to enforce referential integrity. I notice the relationship tree defines my option as a 1 to 1 relationship. Will it change to 1 to many when I put data in. I will have many calls for each patient. Just wanted to know if there is something I should change before I dump the data in and have a big mess. Thanks, Laura
2003-02-28, 15:40 #2
- Join Date
- Mar 2002
- Thanked 29 Times in 29 Posts
Re: need a lesson on relationships (2000)
If you join two tables on their primary keys, you will always get a 1-to-1 relationship, because primary keys are by their nature unique. So if you have a record in T_Demographics with a certain RNA_ID, there can be only one record in T_CallData with that RNA_ID.
You should delete the relationship for now (otherwise you can't take the next step), and set another primary key in the T_CallData table, perhaps a on new AutoNumber field. Then, create the relationship anew (on RNA_ID) - now it will be a 1-to-many relationship because RNA_ID is no longer the primary key in T_CallData.