I would like a second set of eyes or more on this piece of a Data Warehouse I am designing.The system I get the data from ONLY keeps the data for the current school year(@ the begining of each school year the tables are cleared). I am trying to capture what occurs during the course of a year & for each year to come.A student can be in multiple Programs(such as free lunch, learning disabilty, gifted, mobile(moves multiple times within or in/out of disctrict in same school year), etc.) AND they can move in/out of these Programs more than once each school year. Currently when a student moves in or out of a program a 'STATUS' column is modified with a A(active) or I(inactive). Each Program is in a different table or tables and I want to combine them into ONE table called PROGRAMS.Here is what I have come up with and would like to know if this is the 'best practice' way or if I am looking at this from the wrong angle.SID = Student ID(which the other system assigns, Unique).CREATE TABLE STUDENT( SID INT NOT NULL, LName VARCHAR(30) NOT NULL, FName VARCHAR(30) NOT NULL, MIDName VARCHAR(15) NOT NULL, CONSTRAINT PK_STUDENT PRIMARY KEY CLUSTERED (SID ASC))GOCREATE TABLE PROGRAMS( SID INT NOT NULL, SchoolYR CHAR(9) NOT NULL, ProgType CHAR(6) NOT NULL, RecordDT DATE NOT NULL, CONSTRAINT PK_PROGRAMS PRIMARY KEY CLUSTERED (SID ASC, SchoolYR DESC, ProgType ASC, RecordDT DESC), CONSTRAINT FK_PROGRAMS_STUDENT FOREIGN KEY (SID) REFERENCES STUDENT (SID))
RecordDT = the date the Program was inserted/updated in the other system.Thanks