L02 - Entity-Relationship(ER Model Example A Database...

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

View Full Document Right Arrow Icon
Entity-Relationship (ER) Model
Background image of page 1

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

View Full Document Right Arrow Icon
2 CS174A: ER Example: A Database Application Design ± Alexandria digital library Data : maps, satellite pictures, aerial photos, … Queries : search by location, date, type, . .. and combinations of conditions Updates : new items Requirements : accessible on the web (via browser), efficient, reliable ± Where do we start? Analyze the data to be managed and design the database structure!
Background image of page 2
3 CS174A: ER What need to be done ± Software systems needed Relational Database (SQL) Web Server File system ID, date, author (maker), type, …, 500-3000 attributes ± How many relations (tables)? How to divide into relations?
Background image of page 3

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

View Full Document Right Arrow Icon
4 CS174A: ER Overview of Database Conceptual Design ± Initial design using ER Model: What are the “ entities ” and “ relationships ” in the enterprise? What information about these entities and relationships should we store in the database? What are the integrity constraints or business rules that hold? A database ‘schema’ in the ER Model can be represented pictorially (ER diagrams) Can map an ER diagram into a relational schema ± Refinement with normalization techniques
Background image of page 4
5 CS174A: ER ± Entity : Real-world object distinguishable from other objects An entity is described (in DB) using a set of attributes ± Examples : Harold Frank Hall, room 2106 CS 174A ER Model — Entities Employees name
Background image of page 5

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

View Full Document Right Arrow Icon
6 CS174A: ER ± Entity Set : A collection of similar entities, e.g., employees All entities in an entity set have the same set of attributes (until we consider ISA hierarchies) Each entity set has a key Each attribute has a domain Can map an entity set to a relation easily ER Model — Entity Sets Employees 35 Smethurst 131-24-3650 22 Smiley 231-31-5368 48 Attishoo 123-22-3666 lot name ssn Employees ssn name lot
Background image of page 6
7 CS174A: ER ± Relationship : Association among 2 or more entities A relationship is represented by a tuple of entities ± Examples: Attishoo works in Pharmacy department Raghu teaches CS174A ± Relationship set : Collection of similar relationships An n -ary relationship set R relates n entity sets E 1 , . .., E n each relationship in R involves entities e 1 E 1 , . .., e n E n
Background image of page 7

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

View Full Document Right Arrow Icon
8 CS174A: ER ER Model — Relationship Sets ± Relationship set ± Same entity set could participate in different relationship sets, or in different “roles” in same set Works_in since Employees lot name ssn Departments budget dname did subordinate supervisor Reports_to Employees lot name ssn
Background image of page 8
9 CS174A: ER ± Relationship sets can also have descriptive attributes (e.g., the
Background image of page 9

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

View Full Document Right Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 27

L02 - Entity-Relationship(ER Model Example A Database...

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

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