logo

Designing Relational Database Model and Queries

   

Added on  2019-09-26

6 Pages778 Words332 Views
 | 
 | 
 | 
Student 1 OCTOBER, 2016JOB1 ASSIGNMENT SOLUTION
Designing Relational Database Model and Queries_1

CONTENTSRELATIONAL MODEL..................................................................................................2INTEGRITY CONSTRAINTS........................................................................................3PREDICATE LOGIC OF SCHEMA..............................................................................3QUERIES......................................................................................................................4SQL...........................................................................................................................4RELATIONAL CALCULUS........................................................................................4VIEWS..........................................................................................................................4ACTIVE RULES............................................................................................................51 | Page
Designing Relational Database Model and Queries_2

RELATIONAL MODELPredicate schema is:Student (number, name, degree)Course (code, cname)Term (name, student_number, Course_code)The relational schema is:STUDENTNUMBERNAMEDEGREECOURSECODECNAMETERMName STUDENT_NUMBERCOURSE_CODEIn the above diagram we can see that through the ER diagram, 3 tables have been designed in the relational model. In the first table student, number is a primary key toidentify each record uniquely. In the second table course, code is the primary key to identify each record. And the third table ‘term’ has been designed to model the ‘taking’ relation between the tables. The term table has term name student number and course code to identify which student has which course in each term. This 2 | Page
Designing Relational Database Model and Queries_3

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents