COMPSCI 122A Lecture Notes - Lecture 2: Unique Key, Compound Key, Data Integrity

65 views3 pages

Document Summary

Database schema can be drawn using an er diagram. Can map an er diagram into a relational schema. Entity - object or thing in the world, described using a set of attributes. Entity set - a collection of similar entities (eg. all employees) All entities in an entity set have the same set of attributes. Each entity set has a key (a unique identifier) Can be either one attribute (atomic key) Each attribute has a domain (similar to a data type) Relationship - association among two or more entities. Relationship set - collection of similar relationships lot. An n-a(cid:931)y (cid:931)ela(cid:933)(cid:922)(cid:928)(cid:927)(cid:932)(cid:921)(cid:922)(cid:929) (cid:932)e(cid:933) r (cid:931)ela(cid:933)e(cid:932) (cid:927) e(cid:927)(cid:933)(cid:922)(cid:933)y (cid:932)e(cid:933)(cid:932) e1, e(cid:927); eac(cid:921) (cid:931)ela(cid:933)(cid:922)(cid:928)(cid:927)(cid:932)(cid:921)(cid:922)(cid:929) (cid:922)(cid:927) r (cid:922)(cid:927)v(cid:928)lve(cid:932) e(cid:927)(cid:933)(cid:922)(cid:933)(cid:922)e(cid:932) (cid:940)(cid:857)e1,e(cid:927)(cid:858) (cid:941) e1 e1,e(cid:927) e(cid:927) (cid:942) Consider works in: an employee can work in many department; a department can have many employees. In contrast, each dept has at most one manager, according to the cardinality constraint on manages.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents