Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 one parent table, many child tables...

Author  Topic 

giro
Starting Member

8 Posts

Posted - 2003-12-03 : 23:28:46
Hi,

In my database design, I've a table for storing a user's profile (roughly about 10 columns). This table has the user's id (user_id) as the Primary Key. I've a host of other child tables related to this parent table via the user_id. That is:

parent_table
-user_id (PK)
-date_of_birth
-course
-email
.
.
.

child_table_1
-user_id (FK)
- attribute1
-attribute2

child_table_2
-user_id (FK)
-attribute1
-attribute2

and so on.

Is it normal to set up a database in such a manner, where you've one parent table linked to several other tables in the same database via the Primary Key of the Parent table?

krishnan_sn
Starting Member

14 Posts

Posted - 2003-12-04 : 01:12:52
hi,

yes u can proceed...yes it is the normal way to define a primary key and have the references in the child table...




S.Navaneetha Krishnan
Go to Top of Page

giro
Starting Member

8 Posts

Posted - 2003-12-04 : 01:53:16
thanks, krishnan_sn!
Go to Top of Page
   

- Advertisement -