General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
>Can anyone teach me how to decide it is 1 to many relation or 1 to 1 relation? how to decide which is parent table and which is child table? izzit only 2 type of relation ship in FoxPro?
1-1 vs 1-many:
The real world decides this for you. A 1 to 1 relationship is when there can NEVER be more than one record relating the two tables. Example: Table of patients only has a 1-1 relationship with the deathinfo table. It is important to note though in a 1-many relationship, the parent table may relate to no records in the child table, 1 record or more than 1 record.
Which is child:
This can change. For instance I have a PATIENT table that is the parent table to a DOCTORS table in one query and in another query the DOCTORS table is the parent and the PATIENT is the child. It depends how you are viewing and logically thinking of the data at the moment.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only