DATA BASE MANAGE SYS
DATA BASE MANAGE SYS COP 5725
Popular in Course
Popular in Computer Programming
Hans Farrell PhD
verified elite notetaker
This 7 page Class Notes was uploaded by Hans Farrell PhD on Friday September 18, 2015. The Class Notes belongs to COP 5725 at University of Florida taught by Markus Schneider in Fall. Since its upload, it has received 14 views. For similar materials see /class/206689/cop-5725-university-of-florida in Computer Programming at University of Florida.
Reviews for DATA BASE MANAGE SYS
Report this Material
What is Karma?
Karma is the currency of StudySoup.
You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!
Date Created: 09/18/15
What you should have learned after this lecture El how an ER schema is transformed into a relational database schema El what relational algebra is and what its main basic operations are Transformation of a 1m and a m1relationship set El For each binary 1mrelationship set R let S be the relation schema which corre sponds to the entity set participating in R on the mside Add to S as foreign key the primary key of relation schema T which corresponds to the other entity set participat ing in R The reason for this is that each entity on the mside is associated with at most one entity on the 1side of R Furthermore all simple attributes and all simple components of composite attributes of R are taken as attributes of 8 El example university data base lectures credits title heldby professorspersid name room rank assistantspersid name room boss CI The names of attributes of a foreign key have partially to be changed in order to ensure the uniqueness of names in a schema Transformation of an mznrelationship set El For each binary mznrelationship set R a new relation schema S is created Add to S as foreign keys the primary keys of the relation schemas that correspond to the two entity sets participating in R Their combination forms the primary key of 8 Further more all simple attributes and all simple components of composite attributes of R are taken as attributes of 8 El example university database attendsregid ispreconditionofpredecessor successor Transformation of multivalued attributes El For each multivalued attribute A a new relation schema R is created R comprises an attribute corresponding to A and as foreign key the primary key K of the relation schema which corresponds to the entity set or relationship set containing A as attribute The primary key of R is the combination of A and K If the multivalued attribute is composite its simple components are added to R Cl examplei departmentdeptno name deptloclocation deptno Transformation of an nary relationship set El For each nary relationship set R with n gt 2 a new relation schema S is created Add to S as foreign keys the primary keys of the relation schemas corresponding to entity sets participating in R Furthermore all simple attributes and all simple components of composite attributes of R are taken as attributes of S The primary key of S is the combination of all foreign keys El example university database testsregid persid grade Complete schema of the university database studentsregid integer name string sem integer lecturesid integer credits integer title string heldby integer professorspersid integer name string room integer rank string assistantsgersid integer name string room integer boss integer attendsregid integer id integer ispreconditionofpredecessor integer successor integer testsregid integer id integer gersid integer grade integer Transformation of generalizations CI Generalizations are not represented by an own relation The relationship is already expressed by the fact that the key of the common superclass is also used as key of the specialized subclasses example l professors l assistants l employeespersid name room professorspersid rank assistantspersid information about a professor distributed to two tuples of two relations namely to a tuple of the relation employees and to a tuple of the relation professors To obtain the complete information requires a connection of both relations and tuples respectively join There is no inheritance in the relational data model 44 Relational Algebra Introduction El so far structural description by means of a database schema El required language for extracting information from the database likewise necessary but later dealt with data manipulation language DML with operations for inserting changing and deleting information El two formal languages relational calculus tuple relational calculus domain relational calculus declar ative language which allows to specify which data one would like to retrieve or which criteria these data have to fulfil but not how a query has to be evaluated relational algebra procedural language which allows to specify how a query has to be evaluated execution plan both languages are closed ie the results of queries which operate on relations are again relations El universal algebra given a set T anchor of the algebra given a set of operations 61 on of the form 62 T gt T El relational algebra is a universal algebra anchor is the set of all relations 5 1 basic operations union difference Cartesian product project select rename other algebra operations are derived ie they can be expressed by the basic operations El given two relations RA1 C1 A2 CZ Ar 0 and SB1 D1 32 Dz BS DS with arity rand 3 El R and S are schema compliant identical except for renaming if r 3 holds and if there exists a permutation p of the indices 1 r so that V 1 g i g r C DCPU The Union operation El R and S are schema compliant El RuStteRtES The Difference operation El R and S are schema compliant El R StteRte8
Are you sure you want to buy this material for
You're already Subscribed!
Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'