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 |
|
Manoool
Starting Member
6 Posts |
Posted - 2007-11-08 : 12:56:35
|
| Hi.. I'm going to build database of university, but I have problem with primaru key, This is the situation:there are many faculities and each one has many departments,each department has many courses,each course has many sections.. The problem:I want to make those fields in the same table and make the primary key generate from other fields,(i.e) I want the faculity be integer from 4 digit "Example the first faculity start with 1000 the second 2000 and so on" and the the department of each faculity will generate its value from the faculity number+interger number from 3digit "Example the department of the first faculity start with 1100 and the second on will be 1200 and so on " the same thing will repeate for courses and sections so the sectionsID will be the primary key. Do you know hoew this idea can be implement by SQL server 2005?Please help me as soon as possible. |
|
|
Van
Constraint Violating Yak Guru
462 Posts |
Posted - 2007-11-08 : 13:15:53
|
| What other requirements did your CIS instructor give you for this assignment? |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
Manoool
Starting Member
6 Posts |
Posted - 2007-11-09 : 02:25:08
|
quote: Originally posted by Van What other requirements did your CIS instructor give you for this assignment?
will.....I have to build complete university system that allow them to convert all of their manual procedure toonline oneincluding the registration and the electronic services tothe student and teachers and administrationI have many tablesand I want to connect between the faculties ,department and coursesin the first place I think to put each one in tablewith auto number as the primary keybut the doctor told me that "this is bad design"and she suggest to but the in one table and try to connect between themso , i thought in this way that ipreviously mentionand i wish that some one can help mebeacuse i dont have experience with SQL |
 |
|
|
Van
Constraint Violating Yak Guru
462 Posts |
|
|
|
|
|