Chapter2-DBDesign-6up - Conceptual Database Design: The...

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

View Full Document Right Arrow Icon
Conceptual Database Design: The Entity-Relationship Model Readings: Chapter 2 3 Databases: the continuing saga… In our last exciting episode, we motivated that databases were great because they: Store large amounts of data Handle transactions Allow efficient querying And many, many more classic favourites! Before we can do all of these, we must design the database 4 Levels of Abstraction A major purpose of a DB system is to provide an abstract view of the data. Three abstraction levels: Physical level : how data are actually stored Conceptual (or Logical) level : how data is perceived by the users External (or View) level : describes different part of the database to different users convenience, security, etc. Compare views of student, registrar, View 1 View 2 View 3 Conceptual Level Physical Level 5 Schema and Instances We create the schema – the logical structure of the database (e.g., students take courses) Conceptual (or logical) schema : db design at the logical level Physical schema : db design at the physical level; indexes, etc Later we’ll populate instances – the actual content of the database at a particular point in time E.g., currently there are no grades for CPSC 304 2006 Winter term 2 Physical Data Independence – the ability to modify the physical schema without changing the logical schema Applications depend on the conceptual schema Logical Data Independence – Provided by the views Ability to change the conceptual scheme without changing the applications 6 Conceptual Database Design What are the entities and relationships in the enterprise? Entities are usually nouns, but avoid irrelevant nouns e.g., “At UBC, we have full-time and part-time students. We store such information in our computer. We have 1000’s of courses…” Relationships are statements about 2 or more objects. Often, verbs. e.g., a prof teaches a course What information about these entities and relationships should we store in the database? What integrity constraints or other rules hold? In relational databases, this data is generally encoded in an Entity-Relationship (ER) Diagram 7 ER Model Basics: Entities Entity Set : A collection of similar entities. E.g., all employees. All entities in an entity set have the same set of attributes. (Until we consider ISA hierarchies, anyway!) Each attribute has a domain . (e.g. ., float, date, int, colour) Each entity set has a key. Employees SIN Name Address s Entity : Real-world object distinguishable from other objects. s An entity is described using a set of attributes .
Background image of page 1

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

View Full DocumentRight Arrow Icon
8 Keys Distinguish entities A key is the minimal set of one or more attributes which, taken collectively, identify uniquely an entity in an entity set. A
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/10/2009 for the course COMPUTER 504 taught by Professor Drjan during the Spring '09 term at Arab Academy for Science, Technology & Maritime Transport.

Page1 / 5

Chapter2-DBDesign-6up - Conceptual Database Design: The...

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

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