Progettazione Logica Giorgio Ghelli. Logical modeling2 The relational data model All data in flat tables of rows with a primary key (access operators:

Slides:



Advertisements
Similar presentations
Convert ER to Relational Database Entity relation Entity relation Attributes attributes Attributes attributes Primary key primary key Primary key primary.
Advertisements

Relational Terminology. Normalization A method where data items are grouped together to better accommodate business changes Provides a method for representing.
Defined by Edgar Codd in 1970 Defined by Edgar Codd in 1970 Considered ingenious but impractical Considered ingenious but impractical Conceptually simple.
The Relational Model. Introduction Introduced by Ted Codd at IBM Research in 1970 The relational model represents data in the form of table. Main concept.
Database Management Systems, R. Ramakrishnan and J. Gehrke1 The Entity-Relationship Model Chapter 2.
Ch5: ER Diagrams - Part 1 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
Monash University Week 7 Data Modelling Relational Database Theory IMS1907 Database Systems.
© 2005 by Prentice Hall Chapter 3a Database Design Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich.
Database Design Conceptual –identify important entities and relationships –determine attribute domains and candidate keys –draw the E-R diagram Logical.
Modeling Your Data Chapter 2. Overview of Database Design Conceptual design: –What are the entities and relationships in the enterprise? – What information.
Introduction to Relational Database ISYS 464. Introduction to Relational Model Data is logically structured within relations. Each relation is a table.
Data Modeling with ERD ISYS 363. Entity-Relationship Diagram An entity is a “thing” in the real world, such as a person, place, event for which we intend.
Mapping from E-R Model to Relational Model Yong Choi School of Business CSUB.
Chapter Five Data Modeling with the Entity-Relationship Model.
APPENDIX C DESIGNING DATABASES
Michael F. Price College of Business Chapter 6: Logical database design and the relational model.
Ch 6: ER 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.
Week 6 Lecture Normalization
IS 325 Notes for Wednesday September 18, 2013.
DATABASE MANAGEMENT SYSTEMS BASIC CONCEPTS 1. What is a database? A database is a collection of data which can be used: alone, or alone, or combined /
Concepts and Terminology Introduction to Database.
Mapping from Data Model (ERD) to Relational Model
Database R.Fröhlich, M. Schaffer, J. Konicek Database Relationship Types Different Relationship Types in a Logical Relational Model.
Normalization (Codd, 1972) Practical Information For Real World Database Design.
SQL Structured Query Language Programming Course.
Copyright © Curt Hill The Relational Model of Database Basic organization and terms.
Normalization Well structured relations and anomalies Normalization First normal form (1NF) Functional dependence Partial functional dependency Second.
CS370 Spring 2007 CS 370 Database Systems Lecture 4 Introduction to Database Design.
BIS 360 – Lecture Eight Ch. 12: Database Design and Normalization.
Entity-Relationship (ER) Modelling ER modelling - Identify entities - Identify relationships - Construct ER diagram - Collect attributes for entities &
1 Session 2 Welcome: The seventh learning sequence “ Reduction of an EER schema to tables“ Recap : In the previous learning sequence, we discussed the.
Database Management System Quiz 1. A company needs to store information about: the employees identified by EmpNo, Name, Salary and Phone; departments.
ER to Relational Translation John Ortiz. Lecture 5ER to Relational Translation2 Recall Database Design  Steps in database design Requirement Analysis.
Overview of Database Development Data Modeling and Relational Database Design.
1 From E-R Model to Relational Model. 2 Entity type sid#name address house#street pcode Student.
Object-Relational Modeling. What Is a Relational Data Model? Based on the concept of relations (tables of data) Relationships established by matching.
Unit 4 Object Relational Modeling. Key Concepts Object-Relational Modeling outcomes and process Relational data model Normalization Anomalies Functional.
ICOM 5016 – Introduction to Database Systems Lecture 9 Dr. Manuel Rodriguez Department of Electrical and Computer Engineering University of Puerto Rico,
Logical Design database design. Dr. Mohamed Osman Hegaz2 Conceptual Database Designing –Provides concepts that are close to the way many users perceive.
1 CS 430 Database Theory Winter 2005 Lecture 15: How to Convert an ER Model to Relations.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Quiz questions. 1 A data structure that is made up of fields and records? Table.
Data Modeling with ERD BUS 782. Entities An entity is a person, place, object, event, or concept in the user environment about which the organization.
Seminar 10: OODB Design (Self-Study)
Database Design – Lecture 6 Moving to a Logical Model.
Data Modeling Yong Choi School of Business CSUB. Part # 2 2 Study Objectives Understand concepts of data modeling and its purpose Learn how relationships.
Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin APPENDIX C DESIGNING DATABASES APPENDIX C DESIGNING DATABASES.
Chapter 10 Designing Databases. Objectives:  Define key database design terms.  Explain the role of database design in the IS development process. 
1 © Prentice Hall, 2002 ITD1312 Database Principles Chapter 4B: Logical Design for Relational Systems -- Transforming ER Diagrams into Relations Modern.
Database Design Slide 1 Database Design Lecture 7 part 2 Mapping ERD to Tables.
6-1 © Prentice Hall, 2007 Topic 6: Object-Relational Modeling Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich,
CSE 412/598 DATABASE MANAGEMENT COURSE NOTES 3. ENTITY-RELATIONSHIP CONCEPTUAL MODELING Department of Computer Science & Engineering Arizona State University.
Databases Flat Files & Relational Databases. Learning Objectives Describe flat files and databases. Explain the advantages that using a relational database.
Chapter 8: Object-Relational Modeling Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich, Jeffrey A. Hoffer.
8-1 © Prentice Hall, 2007 Chapter 8: Object-Relational Modeling Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich,
Data Modeling with ERD ISYS 363.
What Is Normalization  In relational database design, the process of organizing data to minimize redundancy  Usually involves dividing a database into.
1 The Relational Data Model David J. Stucki. Relational Model Concepts 2 Fundamental concept: the relation  The Relational Model represents an entire.
Database Designsemester Slide 1 Database Design Lecture 7 Entity-relationship modeling Text , 7.1.
Chapter 8: Object-Relational Modeling
Entity- Relationship (ER) Model
Comparison Operators Relational Operators.
Relational Database Design by ER- and EER-to-Relational Mapping
Generalization.
Relational Model and ER Model: in a Nutshell
Database Management System
Session 2 Welcome: The seventh learning sequence
Flat Files & Relational Databases

Presentation transcript:

Progettazione Logica Giorgio Ghelli

Logical modeling2 The relational data model All data in flat tables of rows with a primary key (access operators: later) Associations as foreign keys Employees EmpIdNameSalaryDepId 232John1000Y1 143Mary1200X2 254Joan900Y1 Departments DepIdBudget Y X

Logical modeling3 The relational data model: graphic notation Employees EmpId DepId Name Salary Departments DepId Budget EmployeesDepartments EmployeesDepartments  1

Logical modeling4 Phases of database design Conceptual design Logical design Physical design

Logical modeling5 Translating a conceptual plan to the relational model Add an artificial primary key to any collection which needs one Translate associations and inclusions into foreign keys Flatten complex attributes Translate multivalued attributes into tables

Logical modeling6 Translating a conceptual plan 1-N associations become foreign keys employees departments employees departments

Logical modeling7 M-N associations Encoded as a table with two foreign keys Employees EmpIdName John Mary Joan... Projects BudgetPrId 23000P P2 ProEmp PIdEId P1232 P1143 P2232 P2254

Logical modeling8 M-N associations M-N associations become tables They get association attributes employees projects employees projects ProEmp Percentage

Logical modeling9 Subcollections Conceptual: –Persons(PId, Name) Employees ext Persons(Dept, Salary) Consultants ext Persons(Project, Fee) Logical: ?

Logical modeling10 Subcollections Conceptual: –Persons(PId, Name) Employees ext Persons(Dept, Salary) Consultants ext Persons(Project, Fee) Logical: –Persons(PId, Name) Employees(Dept, Salary, PId*) Consultants(Project, Fee, PId*) –Persons(PId, Name, Kind, Dept, Salary, Project, Fee)

Logical modeling11 Subcollections persons pId name employees dept salary persons pId name employees dept salary persons code name dept salary code kind

Logical modeling12 All together, now persons father-of families tax-payersflats inhabits percentage