学生管理系统逻辑设计.docx
学生管理系统逻辑设计将概念结构设计阶段设计好的基本ER图转换为关系模式,如下所示:、学生(学号,姓名,性别,出生日期,入学年份,民族,身份证号,政治面貌)、班级(班级编号,班级名称,班主任)、专业(专业号,专业名称)、考勤情况(学号,考勤号,考勤名称)、课程(课程号,学分,课程名称,课时)、成绩(学号,课程号,得分,学期,学年)Create table professoral(pno char(8) primary key, pname varchar(40) not null);create table class( cno char(8) primary key , teacher varchar(10) not null, Cname varchar(40) not null);create table courseinformation( cfno char(8) primary key, cfname varchar(20) not null,credits int not null, ct int not null );create table student(sno char(8) primary key,sname varchar(10) not null,ssex char(1) not null check (ssex in ('f','m'),srdate date not null,szm varchar(10) check (szm in 'tuanyuan'),sbdate date,snational varchar(10) check (snational in 'hanzu'), sid char(18) not null);create table scores(cfno char(8) not null references courseinformation (cfno), sno char(8) not null references student(sno), sscores int check (0<=sscores and sscores<=100), ssdate date not null, cno char(8) not null, primary key (cfno,sno);create table attendance(sno char(8)not null references student (sno),ano char(8) not null,astyle char(20) not null, primary key(sno,ano);