3-ER - CS273 - Data and Knowledge Bases Xifeng Y Xif Yan...

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon
CS273 - Data and Knowledge Bases Xifeng Yan Computer Science niversity of California at Santa Barbara University of California at Santa Barbara
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Department of Computer Science Entity-Relationship Model The ER ( entity-relationship) model is a widely-used conceptual model that allows us to sketch the overall (logical) structure design of a database Captures kinds of data and how they connect Not how data is represented, stored, or manipulated p, , p ER model is independent of the DBMS ER model is graphically represented: ER diagrams Later: convert ER designs to relational DB designs lides by courtesy of Y Chen with modifications CS273: Data and Knowledge Bases | University of California at Santa Barbara 2 slides by courtesy of Y. Chen with modifications
Background image of page 2
Department of Computer Science Entities and Relationships Entity nstance] An object that exists and is distinguishable from other bjects tudents) as et f ttributes [instance] objects (e.g., students); has a set of attributes (e.g., student-id, name, major) Entity A set of similar entities (e.g., a set of students); Entity Type/Set sets need not be disjoint (e.g., person & customer). elationship n ssociation mong everal ntities e Relationship [instance] An association among several entities (e.g., the instances of which students are taking what classes) Relationship ype/Set A set of similar relationships (e.g., students taking lasses) Type/Set classes) CS273: Data and Knowledge Bases | University of California at Santa Barbara 3
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Department of Computer Science Keys A key is a set of attributes for one entity type such that no two entities of this type agree on all the attributes of the key. e must designate a key for every entity type We must designate a key for every entity type. CS273: Data and Knowledge Bases | University of California at Santa Barbara 4
Background image of page 4
Department of Computer Science ER Diagrams (I): Entity, Attributes In an entity-relationship diagram: Entity type - rectangle Attribute - oval, with a line to the rectangle representing its entity type. ingle- alued ulti- alued erived omposite Key attributes - attribute names with underline Single valued Multi valued derived composite CS273: Data and Knowledge Bases | University of California at Santa Barbara 5
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Department of Computer Science Example ame manf name Beers Entity type Beers has two attributes, name and manf (manufacturer). Each Beers entity has values for these two attributes, e.g. (Bud, Anheuser-Busch) name is the key of Beers CS273: Data and Knowledge Bases | University of California at Santa Barbara 6
Background image of page 6
Department of Computer Science Example dept number hours location room building Courses ept number) is a multi- ttribute Key • (dept, number) is a multi attribute Key • Location is a composite attribute CS273: Data and Knowledge Bases | University of California at Santa Barbara 7
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Department of Computer Science Relationships A relationship type connects two or more entity types.
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/09/2012 for the course CS CS273 taught by Professor Xifengyan during the Spring '11 term at UCSB.

Page1 / 40

3-ER - CS273 - Data and Knowledge Bases Xifeng Y Xif Yan...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online