Review Database Application Development Access Database Development ER-diagram Forms Reports Queries.

Slides:



Advertisements
Similar presentations
Week 5 Relational Database Design by ER- -to-Relational Mapping.
Advertisements

Database System - Assignment #3 Sept. 2012Yangjun Chen ACS Assignment #3 due Wed., Nov. 14, (30) Exercise 7.17 on Page 235 Show the result.
Defined by Edgar Codd in 1970 Defined by Edgar Codd in 1970 Considered ingenious but impractical Considered ingenious but impractical Conceptually simple.
COMPANY schema EMPLOYEE
Mapping ER to Relational Model
OUTLINE OF THE LECTURE PART I GOAL: Understand the Data Definition Statements in Fig 4.1 Step1: Columns of the Tables and Data types. Step2: Single column.
The Relational Algebra
Review Applications of Database Systems Applications of Database Systems Theory Practice.
Exploring Microsoft Access 2003 Chapter 4 Proficiency: Relational Databases, External Data, Charts, Pivot, and the Switchboard.
Mapping an ERD to a Relational Database To map an ERD to a relational database, five rules are defined to govern how tables are constructed. 1)Rule for.
Data modeling using the entity-relationship model Sept. 2012Yangjun Chen ACS Outline: Data modeling using ER-model (Chapter 3 - 3rd, 4th, 5th ed.)
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 7- 1.
- relation schema, relations - database schema, database state
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 7 Relational Database Design by ER- Mapping.
Database Systems Chapter 7 ITM 354. Chapter Outline ER-to-Relational Schema Mapping Algorithm –Step 1: Mapping of Regular Entity Types –Step 2: Mapping.
Data modeling using the entity-relationship model Winter 2006Ron McFadyen Entity-relationship model (ER model) P. 49: “This model and its variations.
Relational Data Model Sept. 2014Yangjun Chen ACS Outline: Relational Data Model Relational Data Model -relation schema, relations -database schema,
Chapter 7 Relational Database Design by ER- and EER-to-Relational Mapping Copyright © 2004 Pearson Education, Inc.
관계 연산자 & SQL. Selection SELECT * FROM r WHERE A=B AND D>5.
Database Systems ER and EER to Relational Mapping Toqir Ahmad Rana Database Management Systems 1 Lecture 18.
Dr. Bernard Chen Ph.D. University of Central Arkansas
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 9 Relational Database Design by ER- and EER-to-Relational Mapping.
Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2008
1 DATABASE By Mr. Abdalla A. Shaame.  What is a database?  The main characters of a database system  The basic database design method  The entity-relationship.
Logical DB Design 5. 1 CSE2132 Database Systems Week 5 Lecture Logical Database Design.
Review: Application of Database Systems
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 7 Relational Database Design by ER- to-Relational Mapping.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 7 Relational Database Design by ER- Mapping.
Retrieve the names of all employees in department 5 who work more than 10 hours per week on the ‘ProductX’ project. p10ssn ← (Π essn (σ hours > 10 (works-on.
How to build ER diagrams
 Employee (fname, minit, lname, ssn, bdate, address, sex, salary, superssn, dno)  Department (dname, dnumber, mgrssn, mgrstartdate) 
METU Department of Computer Eng Ceng 302 Introduction to DBMS Relational Database Design by ER to Relational Mapping by Pinar Senkul resources: mostly.
Chapter 9: Logical Database Design and the Relational Model (ERD Mapping)
Slide Chapter 7 Relational Database Design by ER- to-Relational Mapping.
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 340 Introduction to Database Systems.
Logical Design database design. Dr. Mohamed Osman Hegaz2 Conceptual Database Designing –Provides concepts that are close to the way many users perceive.
Software School of Hunan University Database Systems Design Part III : Mapping ER Diagram to Relational Schema.
Review Database Application Development Access Database Development Theory Practice.
ER-TO-RELATIONAL MODEL MAPPING CONTENT SOURCES: ELAMSARI AND NAVATHE, FUNDAMENTALS OF DATABASE MANAGEMENT SYSTEMS.
Mapping ER Diagrams to Tables
Lecture (8) 1. Relational Database Design by ER- and EERR- to-Relational Mapping 2.
Relational Database Design by ER- and EER-to-Relational Mapping
Chapter 7 Relational Database Design by ER- and EERR-to-Relational Mapping.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 9 Relational Database Design by ER- and EER- to-Relational Mapping.
1 Entity-Relationship Model Gang Qian Department of Computer Science University of Central Oklahoma.
Relational Database Design by ER- and EER-to-Relational Mapping
Chapter 7 Relational Database Design by ER- and EERR-to-Relational Mapping Copyright © 2004 Pearson Education, Inc.
Database Design The Relational Model Text Ch5
Relational Database Design by ER- and EER-to-Relational Mapping
Relational Database Design by ER- and EERR-to-Relational Mapping
Relational Database Design by ER-to-Relational Mapping
Chapter (9) ER and EER-to-Relational Mapping, and other Relational Languages Objectives How a relational database schema can be created from a conceptual.
Chapter (9) ER and EER-to-Relational Mapping, and other Relational Languages Objectives How a relational database schema can be created from a conceptual.
376a. Database Design Dept. of Computer Science Vassar College
Mapping ER Diagrams to Tables
Outline: Relational Data Model
Company Requirements.
Outline: Database Basics
CS4222 Principles of Database System
Relational Database Design by ER- and EER-to-Relational Mapping
Relational Database Design by ER- and EER-to-Relational Mapping
Review: Application of Database Systems
Relational Database Design by ER- and EER-to- Relational Mapping
1. Explain the following concepts: (a) superkey (b) key
1.(5) Describe the working process with a database system.
Mapping an ERD to a Relational Database
1. Explain the following concepts of the ER data model:
Chapter (7) ER-to-Relational Mapping, and other Relational Languages
Mapping an ERD to a Relational Database
Relational Database Design by ER-to-Relational Mapping
Presentation transcript:

Review Database Application Development Access Database Development ER-diagram Forms Reports Queries

ER-diagram Entity types Strong entity type Weak entity type Relationships Cardinality constraints Participation constraints Attributes atomic attributes composite attributes single-valued, multi-valued attributes derived attributes key, partial key, surrogate key, non-key attribute

employee department project dependent works for manages works on dependents of controls supervision bdate ssn name lname minit fname sex address salary birthdatenamesex relationship name numberlocation name number number of employees startdate hours N supervisor supervisee M N 1 1 N N degree location

Mapping from ER-diagrams onto relational schemas 1.Create a relation for each strong entity type 2. Create a relation for each weak entity type 3. For each binary 1:1 relationship choose an entity and include the other’s PK in it as an FK 4. For each binary 1:n relationship, choose the n-side entity and include an FK with respect to the other entity. 5. For each binary M:N relationship, create a relation for the relationship 6. For each multi-valued attribute create a new relation 7. For each n-ary relationship, create a relation for the relationship

fname, minit, lname, ssn, bdate, address, sex, salary, superssn, dno Dname, dnumber, mgrssn, mgrstartdate Dnumber, dlocation Pname, pnumber, plocation, dnum Essn, pno, hours Essn, dependentname, sex, bdate, relationship EMPLOYEE DEPARTMENT DEPT _LOCATIONS WORKS_ON PROJECT DEPENDENT

About participation constraints If a relationship is mandatory for an entity set, then if the entity set is on the “many” side of the relationship, then a specification is required to ensure a foreign key has a value, and that it cannot be null setting the ‘required’ property for the FK in MS Access, or NOT NULL constraint in the DDL. N A c d B x y 1

cd A xyc B The “required” property for attribute c is set “yes”.

Setting the required property to Yes

If the entity set is on the “one” side of a relationship, then a check constraint or database trigger can be specified to ensure compliance. N A c d B x y 1

cd A xyc B A program should be produced to check that any value appearing in c-column in table A must appear at least once in c-column in table B.

Forms different components: -bound controls -unbound controls -calculated controls -drop-down list box (combo box) -check box -option group -command buttons

Reports seven sections: - report header - page header - group header - details - group footer -page footer -report footer

Queries different kinds of queries: - select queries - action queries Make-Table query Delete query Append-Table query Update query - Crosstab query - total queries Group by Aggregate functions: Count, sum, maximum, minimum, Average - one-to-one relationship, one-to-many relationship