Presentation is loading. Please wait.

Presentation is loading. Please wait.

Database Design 1: Introduction and Terminology CS 320.

Similar presentations


Presentation on theme: "Database Design 1: Introduction and Terminology CS 320."— Presentation transcript:

1 Database Design 1: Introduction and Terminology CS 320

2 Steps in Web/Database Development Project definition  Identify site goals Analysis  Specify what the site needs to do Design  Specify how the site going to do what it needs to do in order to accomplish its goals Development  Create the database  Create the Web pages Test and deploy

3 Design Steps Design the database Design the Web pages  Static pages  Dynamic Web pages that interact with the databases

4 What is a Data Model? Precise description of the data content in a system Levels of data models: 1. Conceptual: describes WHAT data the system contains 2. Logical: describes HOW the database will be structured, regardless of the DBMS 3. Physical: describes HOW the system will be implemented using a specific DBMS

5 Why create data models?  To aid in the development of a sound database design  Goal: to create database tables that do not contain duplicate data values that can become inconsistent

6 Entity-Relationship Data Models Specify data items and relationships  Classic, simplest Best for deriving a sound table design  Many extensions/variations exist  Basis for most other modeling approaches

7 Sample Database (used in examples) CANDY_CUSTOMER CANDY_PURCHASE CANDY_CUST_TYPE CANDY_PRODUCT

8 Creating an Entity-Relationship Model 1. Identify entities 2. Identify entity attributes and primary keys 3. Specify relationships

9 Data Entities  Entity  A "thing" about which you want to store data in an application  Key: Multiple instances of the entity must exist  Goal:  Store data about each entity in a separate table  Example entities in CANDY database:  CUSTOMER, PRODUCT, PURCHASE

10 Database Vocabulary CANDY_PRODUCT Field: individual data item Record: collection of related fields Table: collection of related records

11 ER Model Attributes Attribute  A characteristic (field) of an entity that you want to store in the database Examples: CUST_ID, PROD_DESC Attribute value  The value of a particular attribute for a particular instance of an entity  Examples: 1, "Nuts Not Nachos"

12 ER Model Relationships Specify how instances of one entity are related with instances of another entity

13 Example Relationships

14 Test Yourself: In a database for an Italian restaurant, ENTREE would be an example of a(n): a. Entity b. Attribute c. Entity instance d. Relationship

15 Test Yourself: In a database for an Italian restaurant, ENTREE would be an example of a(n): a. Entity b. Attribute c. Entity instance d. Relationship

16 Test Yourself: In a database for an Italian restaurant, ENTREE_PRICE would be an example of a(n): a. Entity b. Attribute c. Entity instance d. Relationship

17 Test Yourself: In a database for an Italian restaurant, ENTREE_PRICE would be an example of a(n): a. Entity b. Attribute c. Entity instance d. Relationship


Download ppt "Database Design 1: Introduction and Terminology CS 320."

Similar presentations


Ads by Google