dat a model

Click here to load reader

Upload: mattox

Post on 14-Jan-2016

27 views

Category:

Documents


0 download

DESCRIPTION

Dat a Model. 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 - PowerPoint PPT Presentation

TRANSCRIPT

Slide 1

Data Model#1In this chapter, you will learn:Database Management System2- 2Why data models are importantAbout the basic data-modeling building blocksWhat business rules are and how they affect database designHow the major data models evolved, and their advantages and disadvantagesHow data models can be classified by level of abstraction

2The Importance of Data ModelsDatabase Management System2- 3Data model Relatively simple representation, usually graphical, of complex real-world data structuresCommunications tool to facilitate interaction among the designer, the applications programmer, and the end userGood database design uses an appropriate data model as its foundation

3Importance of Data ModelingDatabase Management System2- 4End-users have different views and needs for dataData model organizes data for various users4Data Model Basic Building BlocksDatabase Management System2- 5Entity is anything about which data are to be collected and storedAttribute is a characteristic of an entityRelationship describes an association among (two or more) entitiesOne-to-many (1:M) relationship Many-to-many (M:N or M:M) relationshipOne-to-one (1:1) relationship

5The Evolution of Data ModelsDatabase Management System2- 6HierarchicalNetworkRelationalEntity relationshipObject oriented

6The Hierarchical ModelCharacteristics Database Management System2- 7Basic concepts form the basis for subsequent database developmentLimitations lead to a different way of looking at database designBasic concepts show up in current data modelsBest understood by examining manufacturing process7A Hierarchical Structure

Database Management System2- 88Hierarchical StructureCharacteristics Database Management System2- 9Each parent can have many childrenEach child has only one parentTree is defined by path that traces parent segments to child segments, beginning from the leftHierarchical path Ordered sequencing of segments tracing hierarchical structure9The Hierarchical ModelDatabase Management System2- 10Advantages over a file systemConceptual simplicity easy to understand the model layoutDatabase securityData independence (a change in a data type will be automatically cascaded throughout the database by the DBMS, thereby eliminating the need to make changes in the program segments that reference the changes data type)Efficiency very efficient when it contains a large volume of data in 1:M relationships and whose relationships are fixed over time10The Hierarchical Model (continued)Database Management System2- 11Disadvantages over a file systemComplex implementation detailed knowledge of the physical data storage characteristics is required by the designers and programmersLacks structural independence Implementation limitations difficult to support M:N relationshipsLack of standards no standard DDL and no DML11The Network ModelDatabase Management System2- 12Created to Represent complex data relationships more effectively Improve database performanceImpose a database standardConference on Data Systems Languages (CODASYL) American National Standards Institute (ANSI)Database Task Group (DBTG)12Crucial Database ComponentsDatabase Management System2- 13SchemaConceptual organization of entire database as viewed by the database administratorSubschemaDefines database portion seen by the application programs that actually produce the desired information from data contained within the database Data Management Language (DML) Define data characteristics and data structure in order to manipulate the data

13Network ModelBasic Structure Database Management System2- 14Resembles hierarchical modelCollection of records in 1:M relationshipsA relationship is called a SetComposed of at least two record typesOwner Equivalent to the hierarchical models parent MemberEquivalent to the hierarchical models childA record can appear as a member in more than one set i.e., a member may have multiple owners14A Network Data Model

Database Management System2- 1515The Network Data ModelDatabase Management System2- 16AdvantagesConceptual simplicityHandles more relationship typesData access flexibility no need for a preorder traversalPromotes database integrity must first define the owner and then the member recordData independenceConformance to standards

16The Network Data Model (continued)Database Management System2- 17DisadvantagesSystem complexityLack of structural independence

17The Relational Model: Basic StructureDatabase Management System2- 18Relational Database Management System (RDBMS)Performs same basic functions provided by hierarchical and network DBMS systems, plus other functions RDBMS handles all the complex physical detaisMost important advantage of the RDBMS is its ability to let the user/designer operate in a human logical environment

18The Relational Model:Basic StructureDatabase Management System2- 19Table (relations) Matrix consisting of a series of row/column intersectionsRelated to each other by sharing a common entity characteristicRelational schema Visual representation of relational databases entities, attributes within those entities, and relationships between those entities

19Linking Relational Tables

Database Management System2- 2020Relational TableDatabase Management System2- 21Stores a collection of related entitiesResembles a file Relational table is purely logical structureHow data are physically stored in the database is of no concern to the user or the designerThis property became the source of a real database revolution

21A Relational Schema

Database Management System2- 2222The Relational ModelDatabase Management System2- 23AdvantagesStructural independence changes in the relational data structure do not affect the DBMSs data access in any wayEasier database design, implementation, management, and useAd hoc query capability - SQLPowerful database management system

23The Relational Model (continued)Database Management System2- 24DisadvantagesSubstantial hardware and system software overheadCan facilitate poor design and implementation

24The Entity Relationship ModelDatabase Management System2- 25Widely accepted and adapted graphical tool for data modeling Introduced by Peter Chen in 1976Graphical representation of entities and their relationships in a database structure

25The Entity Relationship ModelBasic StructureDatabase Management System2- 26Entity relationship diagram (ERD)Uses graphic representations to model database componentsEntity is mapped to a relational tableEntity instance (or occurrence) is row in table Entity set is collection of like entitiesConnectivity labels types of relationshipsDiamond connected to related entities through a relationship line

26Relationships: The Basic Chen ERD

Database Management System2- 2727The Entity Relationship ModelDatabase Management System2- 28AdvantagesExceptional conceptual simplicityVisual representationEffective communication toolIntegrated with the relational data model

28The Entity Relationship ModelDatabase Management System2- 29DisadvantagesLimited constraint representationNo data manipulation languageLoss of information content

29The Object Oriented ModelDatabase Management System2- 30Semantic data model (SDM) developed by Hammer and McLeod in 1981Modeled both data and their relationships in a single structure known as an objectBasis of object oriented data model (OODM)OODM becomes the basis for the object oriented database management system (OODBMS)30The Object Oriented Model Database Management System2- 31Object is described by its factual content Like relational models entityIncludes information about relationships between facts within object and relationships with other objectsUnlike relational models entitySubsequent OODM development allowed an object to also contain operationsObject becomes basic building block for autonomous structures31Object Oriented Data ModelBasic StructureDatabase Management System2- 32Object: abstraction of a real-world entityAttributes describe the properties of an objectObjects that share similar characteristics are grouped in classesClasses are organized in a class hierarchyInheritance is the ability of an object within the class hierarchy to inherit the attributes and methods of classes above it32A Comparison of the OO Model and the ER Model

Database Management System2- 3333The Object Oriented ModelDatabase Management System2- 34AdvantagesAdds semantic contentVisual presentation includes semantic contentDatabase integrityBoth structural and data independence

34The Object Oriented Model (continued)Database Management System2- 35DisadvantagesSlow pace of OODM standards developmentComplex navigational data accessSteep learning curveHigh system overhead slows transactionsLack of market penetration

35Other ModelsDatabase Management System2- 36Extended Relational Data Model (ERDM)Semantic data model developed in response to increasing complexity of applicationsDBMS based on the ERDM often described as an object/relational database management system (O/RDBMS)Primarily geared to business applications

36Other Models (continued)Database Management System2- 37Dates objections to ERDM labelGiven proper support for domains, relational data models are quite capable of handling complex dataTherefore, capability that is supposedly being extended is already thereO/RDM label is not accurate because the relational data models domain is not an object model structure

37Data Models: A SummaryDatabase Management System2- 38Each new data model capitalized on the shortcomings of previous modelsCommon characteristics: Conceptual simplicity without compromising the semantic completeness of the databaseRepresent the real world as closely as possibleRepresentation of real-world transformations (behavior) must be in compliance with consistency and integrity characteristics of any data model38The Development of Data Models

Database Management System2- 3939Database Models and the InternetDatabase Management System2- 40Characteristics of successful Internet age databasesFlexible, efficient, and secure Internet access that is easily used, developed, and supportedSupport for complex data types and relationships Seamless interfacing with multiple data sources and structures

40Database Models and the InternetDatabase Management System2- 41Relative conceptual simplicity to make database design and implementation less cumbersome An abundance of available database design, implementation, and application development toolsA powerful DBMS graphical user interface (GUI) to help make the DBAs job easier

41Degrees of Data AbstractionDatabase Management System2- 42Way of classifying data modelsMany processes begin at high level of abstraction and proceed to an ever-increasing level of detailDesigning a usable database follows the same basic process

42Degrees of Data Abstraction (continued)Database Management System2- 43American National Standards Institute/Standards Planning and Requirements Committee (ANSI/SPARC)Classified data models according to their degree of abstraction (1970s): ConceptualExternalInternal

43SummaryDatabase Management System2- 44A good DBMS will perform poorly with a poorly designed databaseA data model is a (relatively) simple abstraction of a complex real-world data-gathering environmentBasic data modeling components are:EntitiesAttributesRelationships44Summary (continued)Database Management System2- 45Hierarchical model Based on a tree structure composed of a root segment, parent segments, and child segmentsDepicts a set of one-to-many (l:M) relationships between a parent and its childrenDoes not include ad hoc querying capability

45Summary (continued)Database Management System2- 46Network model attempts to deal with many of the hierarchical models limitationsRelational model: Current database implementation standardMuch simpler than hierarchical or network designObject is basic modeling structure of object oriented modelData modeling requirements are a function of different data views (global vs. local) and level of data abstraction

46