SQL Server Performance

designing idea please

Discussion in 'General DBA Questions' started by sunsanvin, Mar 7, 2007.

  1. sunsanvin New Member

    Dear Friends,I'm a junior DBA,
    I've to prepare an online examination.
    for this, I've three categories.
    a)beginer level
    b)intermediate level
    c)expert level

    again here subjects are 6. like sqlserver,oracle,c#,vb.net,html,javascript.
    in these subjects, i've to select these three types of questions.
    now how can i design for this requirement? shall i create three tables for beginer, intermediate,expert or shall i create 6 tables and write according that?

    am i given correct inputs?

    please give me an idea to design

    thank you verymuch experts.


    vinod
  2. FrankKalis Moderator

    If I understand correctly, this looks like a case for 2 tables to me:


    CREATE TABLE examination_levels
    (
    levelID INT NOT NULL
    CONSTRAINT PK_examination_levels PRIMARY KEY
    , level_description VARCHAR(20) NOT NULL
    )

    GO

    CREATE TABLE examination_subjects
    (
    subjectID INT NOT NULL
    CONSTRAINT PK_examination_subjects PRIMARY KEY
    , subject_description VARCHAR(20) NOT NULL
    , levelID INT NOT NULL
    CONSTRAINT FK_examination_subjects_levelID
    FOREIGN KEY REFERENCES examination_levels(levelID) ON DELETE NO ACTION
    , ... other columns
    )


    --
    Frank Kalis
    Moderator
    Microsoft SQL Server MVP
    Webmaster:http://www.insidesql.de

Share This Page