• Another quibble I would throw in is to make each table's primary key an identity field, meaning "an integer that SQL Server assigns automatically to every new record when it is inserted into the table." So your Student table might have something like this:

    [font="Courier New"]

    Student

    --------------------------------------------

    StudentID StudentName AdministrativeNo

    --------------------------------------------

    1 John Smith 435

    2 Mary Jones 123

    3 Smith Barney 067B

    4 Don Ho 221[/font]

    The StudentID is absolute, but the other data in the can be edited. The "AdministrativeNo" field is the number assigned to that student by the Registrar, for example. Now for the Class table:

    [font="Courier New"]

    Class

    -----------------------------------------------

    ClassID Class Department

    -----------------------------------------------

    1 Chem 1A Chemistry

    2 English 100 English

    3 Algebra 2B Mathematics

    4 Calculus 1A Mathematics

    5 Chem 1B Chemistry

    6 Chem 2A Chemistry

    [/font]

    Then, the StudentClass table that links your students to all their classes becomes very compact because it only contains the foreign keys to your other two tables. Remember, it gets its own integer key, another identity field.

    [font="Courier New"]

    StudentClass

    -------------------------------------------

    StudentClassID StudentID ClassID

    -------------------------------------------

    1 1 5 John Smith is taking Chem 1B

    2 3 6 Smith Barney - Chem 2A

    3 4 1 Don Ho - Chem 1A

    4 3 2 and so on....

    5 3 3

    [/font]

    Now, you're on your own... Oh, and read up on JOINs. You're going to be using them. A lot.

    Sigerson

    "No pressure, no diamonds." - Thomas Carlyle