Design the Relational Schema for the E-R diagram that you have drawn for part Question 1. The relations must be at least in 2 NF. Perform the following on the relations :

b) Identify the domain of various attributes.

Table Name : course

Field NameData TypeConstraintDescription
c_codevarchar(10)Primary KeyUniquely identify each course in this table
c_namevarchar(100)Course name
course_feesintTotal course fee

Table Name : faculty

Field NameData TypeConstraintDescription
f_codevarchar(10)Primary KeyUniquely identify each faculty in this table
f_namevarchar(100)Name of the faculty
f_addressvarchar(200)Current address of the faculty
f_phonebigintContact number of the faculty
f_qualificationvarchar(100)Educational qualification/degree of the faculty

Table Name : student

Field NameData TypeConstraintDescription
s_codevarchar(10)Primary KeyUniquely identify each student in this table
s_namevarchar(100)Name of the student
s_addressvarchar(200)Current address of the student
s_phonebigintContact number of the student

Table Name : teach

Field NameData TypeConstraintDescription
s_codevarchar(10)Foreign KeyStudent identification code
c_codevarchar(10)Foreign KeyCourse identification code
f_codevarchar(10)Foreign KeyFaculty identification code

Table Name : test_schedule

Field NameData TypeConstraintDescription
exam_codevarchar(10)Primary KeyUniquely identify each examination in this table
week_numberintRepresent week number on which week the examination was done
full_marksintFull marks of the examination paper
c_codevarchar(10)Foreign KeyCourse identification code

Table Name : test_result

Field NameData TypeConstraintDescription
s_codevarchar(10)Foreign KeyStudent identification code
exam_codevarchar(10)Foreign KeyExamination identification code
gradevarchar(2)

Table Name : classes

Field NameData TypeConstraintDescription
class_codevarchar(10)Primary KeyUniquely identify each class in this table
durationintClass duration
class_typevarchar(15)Define class type : theory, practical, examination
date_and_timedatetimeDate and time of the class
c_codevarchar(10)Foreign KeyCourse identification code
f_codevarchar(10)Foreign KeyFaculty identification code

Leave a Reply