1 / 28

Welcome: To the fifth learning sequence “ Data Models “

In this learning sequence, we discuss the importance and purpose of data models, as well as the most common types such as hierarchical, network, relational, and object-oriented models. Learn how data models help in organizing and structuring databases effectively.

ariannap
Download Presentation

Welcome: To the fifth learning sequence “ Data Models “

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 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.

  2. 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.

  3. Data Models Importance Data modeling is probably the most intensive and time consuming part of the development process Building a database without a model is like building a house without plans

  4. Data Models Because the data model uses easily understood notations and natural language it can be reviewed and verified by end-users Detailed enough to be used by the database developers to use as a blueprint for building the physical database

  5. 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 .

  6. 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 .

  7. Data Models Some types of data model : Hierarchical Model * Network Models * Relational Models * * Object-Oriented Model * Object-Relational Model * NoSQL Model * XML Model

  8. 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 .

  9. 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 .

  10. 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.

  11. 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 .

  12. Data Models The American National Standards Institute / Standard Planning And Requirement Committee (ANSI / SPARC) define 3 degrees of abstraction as illustrated in Figure 1.

  13. 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).

  14. ANSI/SPARC

  15. ANSI/SPARCExternal Level • Represents the user’s view of the database • Consists a different view of the database for each user. • Describes the part of the database that is relevant to each user • For example, in large organizations, the users in each department will require different user view (interface). Details needed by Finance department differs than needed by HR. • Views may provide different representations of the same data • Date may be formatted (day/month/year) or (year/month/day), according to user preference. • Some views might include derived or calculated data • Date of birth is stored, but in a user view the Age is calculated.

  16. ANSI/SPARCConceptual Level • It describes what data is stored in the database and the relationships among the data. • It is a complete view of the data requirements of the organization that is independent of any storage consideration. • The conceptual level represents: • All entities ,their attributes, and their relationships. • The constraints on the data. • Security and integrity information. • The conceptual level supports each external view, so that any data available to the user must be contained or derived from the conceptual level. • these models, sometimes called domain models , are typically used to identify and document business (domain) concepts with project stakeholders(users)..

  17. ANSI/SPARCInternal Level • It covers the physical representation of the database on the computer. • It describes how the data is stored in the database in terms of particular data structures and file organizations. • The internal level is concerned with: • Allocating storage space for data and indexes. • Describing the forms that records will take when stored. • Record placement. Assembling records into files. • Data compression and encryption techniques. • The internal level interfaces with the OS to place data on the storage devices, build the indexes, retrieve the data, etc. • It deals with the mechanics of physically storing data on a device such as a disk.

  18. ANSI/SPARCDatabase Schemas • The overall description of a database is called the database schema. • There are three different types of schema corresponding to the three levels in the -ANSI/SPARC architecture. • External schema (many schemas may exist) • Conceptual schema (only one per database) • Internal schema (only one per database) • The DBMS is responsible for mapping between the three types of schema (i.e. how they actually correspond with each other). • Each external schema is related to the conceptual schema (external/conceptual mapping). • A conceptual/internal mapping relates the conceptual schema to the internal schema.

  19. User A1 User B3 User A2 User B1 User B2 Language Workspace Language Workspace Language Workspace Language Workspace . ANSI/SPARC Data Base Administrator (DBA) * * External Model A Ext. Schema A External Model B Ext. Schema B Ext./Con. Mapping A DBMS Ext./Con. Mapping B Conceptual Model Conc. Schema Language Workspace Con./Int. Mapping * User interface Stored database (Internal Model) Inte. Schema Fig.1: An Architecture for Database System

  20. ANSI/SPARC

  21. ANSI/SPARC • The main objective of the three-level architecture is to “separate the users’ view(s) of the database from the way it is physically represented”, which will result: • Allowing independent customized user views. • Hiding the physical storage details from the users. • The DBA can change the database storage structures without affecting the users’ views. • Conceptual structure can be changed without affecting the users’ views.

  22. ANSI/SPARCDatabase languages - 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 Sub-Language (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, which defines the database objects (creating tables, fields, primary and foreign keys) 2- Data Manipulation Language DML, which supports the manipulation or processing of those objects. (Insert, update, delete data) 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.

  23. 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 .

  24. 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 .

  25. 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 .

  26. 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).

  27. Data Models Summary: In this learning sequence, we discussed the best common types of data models.

  28. Data Models end

More Related