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)
 about SQL

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-08-08 : 07:37:51
tan writes "If i want create a database got several records, how i do it

question:
One paper(table) got several records example : CPT 111, CPT 123, CPT 124. Each data is using by several lecturar and each paper divide to 3 part is assignment, quiz and test.

But question is one lecturer may be can teaching more than 1 paper and 1 paper can taken by many lecturer, beside that, 1 lecturer also can make decision how many assignment,quiz and test was need pass for one period time.

Example:
Lecturer_Id 123 teaching paper CPT111 and decide 3 assignment, 2 quiz and 2 test was holding on in this sem.

But other lecturer_Id 234 was decide this paper CPT111 must has 2 assignment, 1 quiz and 4 test.

thank"

Vinnie881
Master Smack Fu Yak Hacker

1231 Posts

Posted - 2006-08-08 : 22:45:19
It sounds like you want a 3 table db

tbl1 - LectureID
tbl2 - LectureID,TeachingPaperID
tbl3 - teachingPaperID,Desc

so for your example

"lecturer_Id 234 was decide this paper CPT111 must has 2 assignment, 1 quiz and 4 test", if I understood correctly

tbl1 - LectureID,LectureDesc
234,First Lecture


tbl2 - LectureID,TeachingPaperID,TeachingPaperDesc
234,1,CPT 111



tbl3 - teachingPaperID,WorkID,Desc
1,1,Assignment
1,2,Assignment
1,3,Quiz
1,4,Test
1,5,Test
1,6,Test
1,6,Test


This is obviously just a sample, the real db will likley have a few more tables, and more columns describing each detail item, but hopfully this will show you how to achieve what you requested.
Go to Top of Page
   

- Advertisement -