37
BIS3635 - Database BIS3635 - Database Systems Systems School of Management, School of Management, Business Information Systems, Business Information Systems, Assumption University Assumption University A.Thanop Somprasong Chapter # 2 Chapter # 2 Data Models Data Models

BIS3635 - Database Systems School of Management, Business Information Systems,

  • Upload
    sherri

  • View
    34

  • Download
    0

Embed Size (px)

DESCRIPTION

Chapter # 2 Data Models. BIS3635 - Database Systems School of Management, Business Information Systems, Assumption University A.Thanop Somprasong. To learn about data modeling and why data models are important To learn about the basic data-modeling building blocks - PowerPoint PPT Presentation

Citation preview

  • BIS3635 - Database Systems

    School of Management, Business Information Systems,Assumption University

    A.Thanop SomprasongChapter # 2Data Models

  • To learn about data modeling and why datamodels are importantTo learn about the basic data-modeling building blocksTo learn what business rules are and how they influence database designTo learn how the major data models evolvedTo learn how data models can be classified by level of abstractionObjectives

  • Designers, programmers, and end users see data in different waysDifferent views of same data lead to designs that do not reflect organizations operationData modeling reduces complexities of database designVarious degrees of dataabstraction help reconcile varying views of same dataIntroduction

  • Data models Relatively simple representations of complex real-world data structuresOften graphicalModel: an abstraction of a real-world object or eventUseful in understanding complexities of the real-world environmentData modeling is iterative and progressiveData Modeling and Data Models

  • Facilitate interaction among the designer, the applications programmer, and the end userEnd users have different views and needs for dataData model organizes data for various usersData model is an abstractionCannot draw required data out of the data modelThe Importance of Data Models

  • Entity: anything about which data are to becollected and storedAttribute: a characteristic of an entityRelationship: describes an association among entitiesOne-to-many (1:M) relationship Many-to-many (M:N or M:M) relationshipOne-to-one (1:1) relationshipConstraint: a restriction placed on the dataData Model Basic Building Blocks

  • Entity can be classified into 3 major parts :GeneralsPersonals: student, employee, instructor, doctor etc.Places: restaurant, company, hospital, zoo, classroomObjects: machine, car, bookConceptssubject, faculty, departmentEventsregistration, enrolment, borrowing, returningEntity Types (+)

  • Descriptions of policies, procedures, orprinciples within a specific organizationApply to any organization that stores and uses data to generate informationDescription of operations to create/enforce actions within an organizations environmentMust be in writing and kept up to dateMust be easy to understand and widely disseminatedDescribe characteristics of data as viewed by the companyBusiness Rules

  • Sources of business rules:Company managersPolicy makersDepartment managersWritten documentationProceduresStandardsOperations manualsDirect interviews with end usersDiscovering Business Rules

  • Standardize companys view of dataCommunications tool between users and designersAllow designer to understand the nature, role, andscope of dataAllow designer to understand business processesAllow designer to develop appropriate relationship participation rules and constraintsDiscovering Business Rules (2)

  • Generally, nouns translate into entitiesVerbs translate into relationships among entitiesRelationships are bidirectionalTwo questions to identify the relationship type:How many instances of B are related to oneinstance of A ?How many instances of A are related to oneinstance of B ?Translating Business Rules intoData Model Components

  • The Evolution of Data Models

  • Sometimes called top-down or parent-child structure modelDeveloped in the 1960s to manage largeamounts of data for manufacturing projectsBasic logical structure is represented by an upside-down tree (Tree-like structure)Hierarchical structure contains levels or segmentsSegment analogous to a record typeSet of one-to-many (1:M) relationships between each particular segmentThe Hierarchical Model

  • The Hierarchical Model (2)

  • Searching methodology will be initialized from top-down and left-right format respectivelyFoundation for current data modelsEasy to understand for this modelDisadvantages of the hierarchical model:Complex to implementDifficult to manageLacks structural independenceRelationships do not conform to M:N formNo standards for how to implementThe Hierarchical Model (3)

  • Created to represent complex data relationshipsmore effectively Improves database performanceImposes a database standardConference on Data Systems Languages (CODASYL) created the DBTGDatabase Task Group (DBTG): defined environment to facilitate database creationThe Network Model

  • SchemaConceptual organization of entire databaseas viewed by the database administratorSubschemaDatabase portion seen by the application programsData management language (DML) Defines the environment in which data can be managedThe Network Model (2)

  • Resembles hierarchical modelRecord may have more than one parentCollection of records in 1:M relationshipsSet composed of two record typesOwnerEquivalent to the hierarchical models parentMemberEquivalent to the hierarchical models childThe Network Model (3)

  • The Network Model (4)

  • Disadvantages of the network modelCumbersome (Too difficult)Lack of ad hoc query capability placed burden on programmers to generate code for reportsStructural change in the database could producehavoc in all application programsThe Network Model (5)

  • Developed by E. F. Codd (IBM) in 1970Table (relations) Matrix consisting of row/column intersectionsEach row in a relation called a tupleRelational models considered impractical in 1970Model conceptually simple at expense of computer overheadThe Relational Model

  • Relational data management system (RDBMS)Performs same functions provided by hierarchical modelHides complexity from the userRelational diagramRepresentation of entities, attributes, and relationshipsRelational table stores collection of related entitiesThe Relational Model (2)

  • The Relational Model (3)

  • The Relational Model (4)

  • SQL-based relational database application involves three parts:User interfaceAllows end user to interact with the dataSet of tables stored in the databaseEach table is independent from anotherRows in different tables related based on common values in common attributesSQL engineExecutes all queriesThe Relational Model (5)

  • Widely accepted standard for data modeling Introduced by Chen in 1976Graphical representation of entities and their relationships in a database structureEntity relationship diagram (ERD)Uses graphic representations to model database componentsEntity is mapped to a relational tableThe Entity Relationship Model

  • Entity instance (or occurrence) is row in table Entity set is collection of like entitiesConnectivity labels types of relationshipsRelationships expressed using Chen notationRelationships represented by a diamond Relationship name written inside the diamondCrows Foot notation used as design standard in this book and courseThe Entity Relationship Model (2)

  • The Entity Relationship Model (3)

  • Data and relationships contained in singlestructure known as an objectOODM (object-oriented data model) is the basis for OODBMSSemantic data modelObjects contain operations Object is self-contained: a basic building-block for autonomous structuresObject is an abstraction of a real-world entityThe Object-Oriented (OO) Model

  • Attributes describe the properties of an objectObjects that share similar characteristics aregrouped in classesClasses are organized in a class hierarchyInheritance: object inherits methods and attributes of parent classUML based on OO concepts that describe diagrams and symbolsUsed to graphically model a systemThe Object-Oriented (OO) Model (2)

  • The Object-Oriented (OO) Model (3)

  • Extended relational data model (ERDM)Semantic data model developed in response to increasing complexity of applicationsIncludes many of OO models best featuresOften described as an object/relational database management system (O/RDBMS)Primarily geared to business applicationsThe Convergence of Data Models

  • The Development of Data Models

  • Internet drastically changed role and scope of database marketFocus on Internet makes underlying data model less importantDominance of Web has resulted in growing need to manage unstructured informationCurrent databases support XMLXML: the standard protocol for data exchange among systems and Internet servicesDatabase Models and the Internet

  • Common characteristics: Conceptual simplicity with semantic completenessRepresent the real world as closely as possibleReal-world transformations must comply with consistency and integrity characteristicsEach new data model capitalized on the shortcomings of previous modelsSome models better suited for some tasksData Models: A Summary

  • Data Models: A Summary (2)

  • THE END