1 Chapter 2 Data Model Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.

Slides:



Advertisements
Similar presentations
Database Systems: Design, Implementation, and Management Ninth Edition
Advertisements

Database Systems: Design, Implementation, and Management Tenth Edition
Database Systems: Design, Implementation, and Management Tenth Edition
Database Systems: Design, Implementation, and Management Tenth Edition
1 © 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be different from the.
Chapter 2 Data Models.
Database Systems: Design, Implementation, and Management Ninth Edition
FILE SYSTEMS & DATABASE 1.5: Data Models
Chapter 2 Data Models Database Systems: Design, Implementation, and Management, Eleventh Edition, Coronel & Morris.
Introduction to Databases
1 1 File Systems and Databases. 1 1 Introducing the Database 4Major Database Concepts u Data and information l Data - Raw facts l Information - Processed.
4 1 Chapter 4 Entity Relationship (ER) Modeling Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
ITS232 Introduction To Database Management Systems
Entity Relationship (E-R) Modeling
Chapter 2 Data Models Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
Chapter 2 Data Model Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
Chapter 1 File Systems and Databases
Chapter 2 Data Models Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
Chapter 2 Data Models Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
File Systems and Databases
Data Models.
Ch1: File Systems and Databases Hachim Haddouti
Object-Oriented Databases
File Systems and Databases Hachim Haddouti
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 2 Data Models Database Systems, 8th Edition 1.
Chapter 4 Entity Relationship (E-R) Modeling
Academic Year 2014 Spring.
LECTURE 2 DATABASE SYSTEM CONCEPTS AND ARCHITECTURE.
2 1 Chapter 2 Data Model Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
3 Chapter 3 Entity Relationship (E-R) Modeling Database Systems: Design, Implementation, and Management, Fifth Edition, Rob and Coronel.
Chapter 2 Data Model Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
Week 1 Lecture MSCD 600 Database Architecture Samuel ConnSamuel Conn, Asst. Professor Suggestions for using the Lecture Slides.
2 1 Chapter 2 Data Models Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
INTRODUCTION TO DATABASE (cont.)
Database Design - Lecture 2
Database Systems: Design, Implementation, and Management Ninth Edition
Chapter 2 Data Models Database Systems: Design, Implementation, and Management, Rob and Coronel Adapted for INFS-3200.
Chapter # 2 Data Models BIS Database Systems A.Thanop Somprasong
2 1 Data Models MIS 304 Winter Class Goals Understand why data models are important Learn about the basic data-modeling building blocks Learn.
Chapter Two ( Data Model) Objectives Introduction to Data Models What are the Data Models Why they are important Learn how to design a DBMS.
1 Data Models. 2 Overview Why data models are important Basic data-modeling building blocks What are business rules and how do they influence database.
Lecture # 3 & 4 Chapter # 2 Database System Concepts and Architecture Muhammad Emran Database Systems 1.
L Department of Mathematics Computer and Information Science l1l1 1 CS 351: Database Management Christopher I. G. Lanclos Chapter 2.
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
ITEC 3220A Using and Designing Database Systems
Chapter 2 Data Model Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
CS311 Database Management system Somchai Thangsathityangkul 1.
Lecture 2 Data Models. Learning Objectives Why data models are important About the basic data-modeling building blocks What business rules are and how.
Data Model O Gives and idea of how the final system or software will look after and the development is completed O This concept is exactly like real world.
1 © 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be different from the.
2 1 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel Data Models Why data models are important About the basic data-modeling.
Department of Mathematics Computer and Information Science1 CS 351: Database Management Systems Christopher I. G. Lanclos Chapter 4.
Data Models. 2 The Importance of Data Models Data models –Relatively simple representations, usually graphical, of complex real-world data structures.
DBS201: Data Modeling. Agenda Data Modeling Types of Models Entity Relationship Model.
1 Database Systems, 8 th Edition Database Systems: Design, Implementation, and Management Eighth Edition Chapter 2 Data Models.
1 © 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be different from the.
Learn about: Data modeling and why data models are important Basic data-modeling building blocks What business rules are and how they influence database.
1 © 2010 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be different from the.
Database Systems: Design, Implementation, and Management Tenth Edition
CS311 Database Management system
DATA MODELS Siti Nurbaya Ismail Senior Lecturer
Database Management system
Advanced Database Models
ITS232 Introduction To Database Management Systems
File Systems and Databases
Chapter 4 Entity Relationship (ER) Modeling
Chapter 2 Data Models Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
Database Management Systems
Presentation transcript:

1 Chapter 2 Data Model Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel

1 2 In this chapter, you will learn: Why data models are important About the basic data-modeling building blocks What business rules are and how they affect database design How the major data models evolved, and their advantages and disadvantages How data models can be classified by level of abstraction

1 3 The Importance of Data Models Data model –Relatively simple representation, usually graphical, of complex real-world data structures –Communications tool to facilitate interaction among the designer, the applications programmer, and the end user Good database design uses an appropriate data model as its foundation End-users have different views and needs for data Data model organizes data for various users

1 4 Data Model Basic Building Blocks Entity – is anything about which data are to be collected and stored Attribute – is a characteristic of an entity Relationship – describes an association among (two or more) entities –One-to-many (1:M) relationship –Many-to-many (M:N or M:M) relationship –One-to-one (1:1) relationship

1 5 Business Rules How do database designers go about determining the entities, attributes, and relationships that will build a data model? Business Rules – Brief, precise, and unambiguous description of a policy, procedure, or principle within a specific organization’s environment

1 6 Examples of Business Rules A customer may generate many invoices. Each invoice is generated by only one customer.

1 7 Sources of Business Rules Company managers Policy makers Department managers Written documentation –Procedures –Standards –Operations manuals Direct interviews with end users

1 8 Importance of Business Rules Standardize company’s view of data Constitute a communications tool between users and designers Allow designer to understand the nature, role, and scope of data Allow designer to understand business processes Allow designer to develop appropriate relationship participation rules and constraints

1 9 The Evolution of Data Models Hierarchical Network Relational Entity relationship Object oriented

1 10 Hierarchical Database Model Logically represented by an upside down tree –Each parent can have many children –Each child has only one parent

1 11 Hierarchical Database Model Advantages –Conceptual simplicity –Database security and integrity –Data independence –Efficiency Disadvantages –Complex implementation –Difficult to manage and lack of standards –Lacks structural independence –Applications programming and use complexity –Implementation limitations

1 12 Network Database Model Each record can have multiple parents –Composed of sets –Each set has owner record and member record –Member may have several owners

1 13 Network Database Model Advantages –Conceptual simplicity –Handles more relationship types –Data access flexibility –Promotes database integrity –Data independence –Conformance to standards Disadvantages –System complexity –Lack of structural independence

1 14 Relational Database Model Developed by Codd (IBM) in 1970 Perceived by user as a collection of tables for data storage Tables are a series of row/column intersections Tables related by sharing common entity characteristic(s) ( Figure 2.4) Relational table is purely logical structure –How data are physically stored in the database is of no concern to the user or the designer

1 15 Linking Relational Tables

1 16 Relational Schema Visual representation of relational database’s entities, attributes within those entities, and relationships between those entities.

1 17 Relational Database Model Advantages –Structural independence –Improved conceptual simplicity –Easier database design, implementation, management, and use –Ad hoc query capability with SQL –Powerful database management system

1 18 Relational Database Model Disadvantages –Substantial hardware and system software overhead –Poor design and implementation is made easy

1 19 Entity Relationship Model Widely accepted and adapted graphical tool for data modeling Introduced by Chen in 1976 Graphical representation of entities and their relationships in a database structure

1 20 The ER Model — Basic Structure Entity relationship diagram (ERD) –Uses graphic representations to model database components –Entity is mapped to a relational table Entity instance (or occurrence) is row in the relational table Connectivity labels types of relationships –Diamond connected to related entities through a relationship line Entity set is collection of like entities Unfortunately, ERD designers use “entity” as a substitute for “entity set” and we ‘ll conform to that established practice.

1 21 Relationships: The Basic Chen ERD

1 22 Relationships: The Basic Crow’s Foot ERD

1 23 Entity Relationship Database Model Complements the relational data model concepts Represented in an entity relationship diagram (ERD) Based on entities, attributes, and relationships

1 24 Entity Relationship Database Model Advantages –Exceptional conceptual simplicity –Visual representation –Effective communication tool –Integrated with the relational database model Disadvantages –Limited constraint representation –Limited relationship representation (relationships between attributes within entities cannot be represented) –No data manipulation language (DML) –Loss of information content

1 25 The Object Oriented Model Semantic data model (SDM) developed by Hammer and McLeod in 1981 Modeled both data and their relationships in a single structure known as an object Basis of object oriented data model (OODM) OODM becomes the basis for the object oriented database management system (OODBMS)

1 26 Object-Oriented Database Model An object is an abstraction of a real-world entity –Attributes describe properties of an object –Collection of similar objects is a class Methods represent real world actions of classes Classes are organized in a class hierarchy – Inheritance is ability of object to inherit attributes and methods of classes above it

1 27 OO Data Model Advantages –Adds semantic content –Visual presentation includes semantic content –Database integrity –Both structural and data independence Disadvantages –Lack of OODM standards –Complex navigational data access –Steep learning curve –High system overhead slows transactions

1 28 The Development of Data Models The evolution has always been driven by the search for new ways of modeling increasingly complex real-world data.

1 29 Database Models and the Internet Characteristics of “Internet age” databases –Flexible, efficient, and secure Internet access –Easily used, developed, and supported –Supports complex data types and relationships –Seamless interfaces with multiple data sources and structures –Relative conceptual simplicity to make database design and implementation less cumbersome –Many database design, implementation, and application development tools –Powerful DBMS GUI make DBA job easier

1 30 Degrees of Data Abstraction Way of classifying data models American National Standards Institute/Standards Planning and Requirements Committee (ANSI/SPARC) –Classified data models according to their degree of abstraction (1970s): Conceptual External Internal

1 31 Data Abstraction Levels ER

1 32 The Conceptual Model u The conceptual model represents a global view of the data. u It is an enterprise-wide representation of data as viewed by high-level managers. u Entity-Relationship (E-R) model is the most widely used conceptual model. u The conceptual model is_ software independence hardware independence

1 33 A Conceptual Model for Tiny College

1 34 Advantages of Conceptual Model Provides a relatively easily understood macro level view of data environment Independent of both software and hardware –Does not depend on the DBMS software used to implement the model –Does not depend on the hardware used in the implementation of the model –Changes in either the hardware or the DBMS software have no effect on the database design at the conceptual level

1 35 The Internal Model u Representation of the database as “seen” by the DBMS u Once a specific DBMS has been selected, the internal model adapts the conceptual model to the DBMS. u The internal model is software-dependent hardware-independence.

1 36 The External Model u End users’ views of data environment u Each external model is then represented by its own external schema. u Provides subsets of internal view u Makes application program development easier u The external model is DBMS-dependent hardware-independence. CREATE VIEW CLASS_VIEW AS SELECT (CLASS_ID, CLASS_NAME, PROF_NAME, CLASS_TIME, ROOM_ID) FROM CLASS, PROFESSOR, ROOM WHERE CLASS.PROF_ID = PROFESSOR.PROF_ID AND CLASS.ROOM_ID = ROOM.ROOM_ID;

1 37 A Division of an Internal Model into External Models Internal External

1 38 The External Models for Tiny College

1 39 The Physical Model u The physical model operates at the lowest level of abstraction, describing the way data is saved on storage media such as disks or tapes. u Requires that database designers have a detailed knowledge of the hardware and software used to implement database design u The physical model is_ software-dependent hardware-dependent.

1 40 Levels of Data Abstraction

1 41 Database Models Collection of logical constructs used to represent data structure and data relationships within the database –Conceptual models: logical nature of data representation focus on the logical nature of the data representation. They are concerned with what is represented rather than how it is represented. E.g. E-R model –Implementation models: emphasis on how the data are represented in the database place the emphasis on how the data are represented in the database or on how the data structures are implemented. E.g. relational database model

1 42 Summary A good DBMS will perform poorly with a poorly designed database A data model is a (relatively) simple abstraction of a complex real-world data-gathering environment Basic data modeling components are: –Entities –Attributes –Relationships

1 43 Summary ( continued ) Hierarchical model –Based on a tree structure composed of a root segment, parent segments, and child segments –Depicts a set of one-to-many (l:M) relationships between a parent and its children –Does not include ad hoc querying capability

1 44 Summary ( continued ) Network model attempts to deal with many of the hierarchical model’s limitations Relational model: –Current database implementation standard –Much simpler than hierarchical or network design Object is basic modeling structure of object oriented model Data modeling requirements are a function of different data views (global vs. local) and level of data abstraction