0% found this document useful (0 votes)
8 views

Database Description - Final - Edudb - v2 - withoutER

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Database Description - Final - Edudb - v2 - withoutER

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Education DB

student(student_id, first_name, last_name, dob, gender, address, note, class_id)


subject(subject_id, name, credit, percentage_final_exam)
lecturer(lecturer_id, first_name, last_name, dob, gender, address, email)
teaching(subject_id, lecturer_id)
grade(code, fromScore, toScore)
clazz(clazz_id, name, lecturer_id, monitor_id)
enrollment(student_id, subject_id, semester, midterm_score, final_score)

--------------------------------------------------------------------------------------
student(student_id, first_name, last_name, dob, gender, address, note, class_id)
Attribute Type NOT NULL Description
name

student_id CHAR(8) Yes Student identification code. PRIMARY


KEY

first_name VARCHAR(20) Yes First name

last_name VARCHAR(20) Yes Last name

dob DATE Yes Date of birth. New student’s age must


be between 16 and 35.

gender CHAR(1) No Sex, must be either 'F' (female) or 'M'


(male).

address VARCHAR(30) No Residential address

note TEXT No Other information

clazz_id CHAR(8) No Class identification code of student. It


is a FOREIGN KEY references to
Clazz_id of Class relation
subject(subject_id, name, credit, percentage_final_exam)
Attribute name Type NOT NULL Description

subject_id CHAR(6) Yes Subject identification code.


PRIMARY KEY

name VARCHAR(30) Yes Subject name

credit INT Yes Credit number, must be between


1 and 5.

percentage_final_ INT Yes Percentage of final examination


exam for final evaluation. It varies
between 0-100.

lecturer(lecturer_id, first_name, last_name, dob, gender, address, email)


Attribute Type NOT NULL Description
name

lecturer_id CHAR(5) Yes Lecturer identification code. PRIMARY


KEY

first_name VARCHAR(20) Yes First name

last_name VARCHAR(20) Yes Last name

dob DATE Yes Date of birth. New lecturer’s age must


be between 22 and 65.

gender CHAR(1) No Sex, must be either 'F' (female) or 'M'


(male).

address VARCHAR(30) No Residential address

email VARCHAR(40) No Email address


Teaching(subject_id, lecturer_id)
Attribute name Type NOT NULL Description

subject_id CHAR(6) Yes Subject identification code.


FOREIGN KEY references to
subject_id of Subject relation

lecturer_id CHAR(5) Yes lecturer identification code.


FOREIGN KEY references to
lecturer_id of lecturer relation

PRIMARY KEY = {subject_id, lecturer_id}

grade(code, from_score, to_score): grade definition


Attribute name Type NOT NULL Description

code CHAR(1) Yes Course grade. DOMAIN = {'A', 'B',


'C', 'D', 'F'}. PRIMARY KEY.

from_score DECIMAL(3,1) Yes The minimal value of grade interval.


DOM = [0, 10].

To_score DECIMAL(3,1) Yes The maximal value of grade interval.


DOM = [0,10].

clazz(clazz_id, name, lecturer_id, monitor_id)


Attribute name Type NOT NULL Description

clazz_id CHAR(8) Yes Class identification code. PRIMARY


KEY

name VARCHAR(20) No Class name

lecturer_id CHAR(5) No Lecturer identification code of form


teacher; FOREIGN KEY references
to lecturer_id of Lecturer relation
monitor_id CHAR(8) No ID of class monitor. FOREIGN KEY
references to student(student_id)

enrollment(student_id, subject_id, semester, midterm_score, final_score)


Attribute Type NOT NULL Description
name

student_id CHAR(8) Yes Student identification code.


FOREIGN KEY references to
student(student_id)

subject_id CHAR(6) Yes Subject code.


FOREIGN KEY references to
subject(subject_id)

semester CHAR(5) Yes Annual semester: '20171', '20172',


'20173', …

midterm_scor Float No Score of mid-term exam. DOM = [0,10]


e and (midtermScore mod 0.5) must be 0

Final_score Float No Score of final exam. DOM= [0,10]


(finalScore mod 0.5) must be 0

PRIMARY KEY = {student_id, subject_id, semester}

You might also like