220 likes | 378 Views
Welcome: To the fifth learning sequence “ Data Models “ Recap : In the previous learning sequence, we discussed The Database concepts. Present learning: We shall explore the following topic: - The most common types of data models. Data Models.
E N D
Welcome: To the fifth learning sequence “ Data Models “ Recap : In the previous learning sequence, we discussed The Database concepts. Present learning: We shall explore the following topic: - The most common types of data models.
Data Models The goal of the data model is to make sure that the all data objects required by the database are completely and accurately represented.
Data Models Why is data model important ? - Data modeling is probably the most intensive and time consuming part of the development process . - A common response by practitioners who write on the subject is that you should no more build a database without a model than you should build a house without blueprints .
Data Models Because the data model uses easily understood notations and natural language it can be reviewed and verified as correct by the end-users . The data model is also detailed enough to be used by the database developers to use as a blueprint for building the physical database .
Data Models The information contained in the data model will be used to define the relational tables primary and foreign keys stored procedures and triggers . A poorly designed database will require more time in the long-term .
Data Models Model : as description or analogy used to visualized something that be directly observed. Data model: a collection of concepts that can be used to describe the structure of a database provides the necessary means to achieve this abstraction, by structure of a database , we mean the data types , relationships , and constraints that should hold for the data . Most data models also include a set of basic operations for specifying retrievals and updates on the database .
Data Models Some types of data model : Hierarchical Model * Network Models * Relational Models * * Object-Oriented Model
Data Models The hierarchical data models organizes data in a tree structure . There is a hierarchy of parent and child data segments, this structure implies that a record can have repeating information, generally in the child data segments, data in a series of records, which have a set of field values attached to it .
Data Models Network data model : The popularity of the network data model coincided with the popularity of the hierarchical data model. Some data were more naturally modeled with more than one parent per child, so the network model permitted the modeling of many -to-many relationships in data .
Data Models Relational data model : A relational database allows the definition of data structures, storage and retrieval operations and integrity constraints, in such a database the data and relations between them are organized in tables. A table is a collection of records and each record in a table contains the same fields.
Data Models Object-Oriented data Model : Object DBMSs add database functionality to object programming languages, they bring much more than persistent storage of programming language objects. Object DBMSs extend the semantics of the C++ , smalltalk and java object programming languages to provide full-featured database programming capability, while retaining native language compatibility .
Data Models The American National Standards Institute / Standard Planning And Requirement Comment (ANSI / SPARC) define 3 degrees of abstraction as illustrated in Figure 1.
Data Models The architecture is divided in to three general levels: 1- External levels This level is concerned with the way in which the data is viewed by individual users i.e (logical storage). 2- Internal levels This level is concerned with the way in which the data is actually stored i.e (physical storage). 3- Conceptual level It is the level of indirection between the other two levels (External & Internal levels).
User A1 User B3 User A2 User B1 User B2 ANSI/SPARC Language Workspace Language Workspace Language Workspace Language Workspace . Data Base Administrator (DBA) * * External Model A Ext. Schema A External Model B Ext. Schema B Ext./Con. Mapping A DDMS Ext./Con. Mapping B Language Workspace Conceptual Model Conc. Schema Con./Int. Mapping * User interface Stored database (Internal Model) Inte. Schema Fig.1: An Architecture for Database System
ANSI/SPARC - Each user of a database system has a language of his or her disposal. What is important about the used language is that it will include a Data SubLanguage (DSL), which is that subset of the language concerned with database objects and operations. - Any given DSL is really a combination of: 1- Data Definition Language DDL, when provides for the definition of a database objects. 2- Data Manipulation Language DML, which supports the manipulation or processing of those objects. 3- Structured Query Language SQL, which supports displaying and retrieving database objects. - Each user provided with a workspace, which acts as receiving or transmitting area between the user and the database.
ANSI/SPARC The user is said to view the database by means of an external model. Each external model is defined by means of an external schema, which consists of description each of the various types of external record in that external model. The conceptual model is a representation of the entire information of the database, which defined by means of the conceptual schema, that includes definitions of various types of conceptual record. - The internal level consists of multiple occurrence of multiple type of stored records, and is described by means of internal schema, which also specifies what indexes exists, and how stored fields are represented, and so on.
Data Models Categories of data models : Conceptual data models : these models, sometimes called domain models , are typically used to identify and document business (domain) concepts with project stakeholders. Conceptual data models are often created as the precursor to logical data models (LDMs) or as alternatives to LDMs .
Data Models Logical data models (LDMs) : logical data models are used to further explore the domain concepts, and their relationships and relationship cardinalities. This could be done for the scope of a single project or for your entire enterprise. Logical data models depict the logical entity types, typically referred to simply as entity types, the data attributes describing those entities, DDL can be generated at this level .
Data Models Physical data models (PDMs) : physical data models are used to design the internal schema of a database, depicting the data tables (derived from the logical data entities), the data columns of those tables (derived from the entity attributes), and the relationships between the tables derived from the entity relationships .
Data Models Major event in data model include : - Identifying the data and associated processes. - Defining the data (such as data types , sizes , and defaults). - Specifying data storage requirements. - Defining the data management processes (such as security reviews and backups. - Ensuring data integrity (by using business rules and validation checks).
Data Models Summary: In this learning sequence, we discussed the best common types of data models.
Data Models end