Relational Model | Purpose Of Normalization | Assignment

Added on - 25 Sep 2019

  • 6

    Pages

  • 1075

    Words

  • 102

    Views

  • 0

    Downloads

Trusted by +2 million users,
1000+ happy students everyday
Showing pages 1 to 3 of 6 pages
Q (a)RELATIONAL MODELPredicate schema is:Student (number, name, degree)Course (code, cname)Term (name, student_number, Course_code)Taking (number,code, term)The relational schema is:STUDENTNUMBERNAMEDEGREECOURSECODECNAMETERMNameSTUDENT_NUMBERCOURSE_CODETAKINGNUMBERCODETERM
The purpose of the normalization is to reduce redundancy and prevent updateanomalies.In the above diagram we can see that through the ER diagram, 3 tableshave been designed in the relational model. In the first table Student where “number”is a primary key to identify each record uniquely. In the second table Course wherecode is the primary key to identify each record. And the third table‘term’Taking hasbeen designed to modelthe ‘taking’ relation between the tables. The‘term’‘taking’table hasterm namestudent number and course codeas primary keyto identifywhich student has which course in each term. This method is best has been done bynormalizing the whole relation between student and the course.Because there willnot be any redundancy in those table since student data, course data andrelationship between student and course are being stored in separated table.Q (b)INTEGRITY CONSTRAINTSThe integrity constraints are:1.Each Student will have a unique student ‘number’ which will be a primary key.This constraint is necessary so that each student record can be identifieddirectly by the number and can be stored uniquely.2.Each Course will have a unique course ‘code’ which will be a primary key.This constraint is necessary so that each course info can be identified directlyby the code and can be stored uniquely3.Each Student willhavetakeat leastone courseand may take up to fourcourses. This constraint is necessary to maintain theforeign key relationshipcardinality constraint between “Stundent” and “Taking” relationship
4.There will terms for each of the 4 courses: this is necessary to maintain the(1,4) relationship between the course and termEach Course should have atleast one or more students to maintain the cardinality constraint between“Course” and “Taking” relationship.5.The term name, course code and student number together will be takentogether which will be a primary key to identify each record.The Taking tableunique combination of course code and student number which will be theprimary key of the table.6.Each course term will have one or more students in it.All these will help in eliminating redundancy, update anomalies, insert or deleteanomalies and will make the relational database more consistent and reliable.Student number which appears in the Taking table must be in the Student table inorder to satisfy referential constraint.7.Course code which appears in the Taking table must be in the Course table inorder to satisfy referential constraint.Q (c)PREDICATE LOGIC OF SCHEMAStudent entityStudentDCDom (Number) x Dom (Name) x Dom (Degree)This predicate logic shows that Student is made up of 3 finite attributes. Theseattributes are subset of the relation student.Course entityCourseDCDom (Code) x Dom (Cname)
desklib-logo
You’re reading a preview
Preview Documents

To View Complete Document

Click the button to download
Subscribe to our plans

Download This Document