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.
Author |
Topic |
yasin84
Starting Member
1 Post |
Posted - 2008-09-18 : 14:45:28
|
hi friendsam pretty new to sql server 2005 and am in a dilemma. i have 4 tables namely:1) pupil - containing details about the pupils2) group - containing details about a group of pupils3) lesson - containing details about different lessons available4) course - containing details about courses offeredthe problem is:a pupil must be a member of a group. Now a lesson may be part of a course or may not and a course consists of a series of lessons. A group should be enrolled to a lesson or a course. How do i relate these 4 tables? Determining the primary key and foreign keys of each tablesplease help methanking you all in advance for your kindness |
|
Jawad Khan
Starting Member
21 Posts |
Posted - 2008-09-25 : 05:13:17
|
Well there may be many designs. Here is a way it can be done. The image below shows the tables. The primary keys and FKs are visible.Here is some sample data. |
|
|
|
|
|