1 / 36

Chapter 2

Chapter 2. Database System Concepts and Architecture. Data Models, Schemas, and Instances. Categories of Data Models (1/2). Data model A collection of concepts that can be used to describe the structure of a database.

Télécharger la présentation

Chapter 2

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. Chapter 2 Database System Concepts and Architecture

  2. Data Models, Schemas, and Instances

  3. Categories of Data Models (1/2) • Data model • A collection of concepts that can be used to describe the structure of a database. • The data types, relationships, and constraints that should hold on the data. • A set of basic operations for specifying retrievals and updates on the database. • Concepts to specify the dynamic aspect or behavior of a database application. • User-defined operations

  4. Categories of Data Models (2/2) • High-level or conceptualdata models provide concepts that are close to the way many users perceive data. • The Entity-Relationship model • Theobject data models • Low-level or physical data models provide concepts that describe the details of how data is stored in the computer. • Record formats, record orderings, and access paths • Representational (or implementation) data models provide concepts that may be understood by end users but that are not too far removed from the way data is organized within the computer. • The relational data model • The network and hierarchical models • Theobject data models

  5. Schemas, Instances, and Database State (1/5) • The description of a database is called the database schema, which is specified during database design and is not expected to change frequently. • A displayed schema is called a schema diagram. • A schema diagram displays only some aspects of a schema. • Other aspects are not specified in the schema diagram.

  6. Schemas, Instances, and Database State (2/5) • The data in the database at a particular moment in time is called a database state or snapshot. • It is also called the current set of occurrences or instances in the database. • The actual data in a database may change quite frequently.

  7. Schemas, Instances, and Database State (3/5) • When we define a new database, we specify its database schema only to the DBMS. • At this point, the corresponding database state is the empty state with no data. • We get the initialstate of the database when the database is first populated or loaded with the initial data. • From then on, every time an update operation is applied to the database, we get another database state.

  8. Schemas, Instances, and Database State (4/5) • The DBMS is partly responsible for ensuring that every state of the database is a valid state—that is, a state that satisfies the structure and constraints specified in the schema. • Hence, specifying a correct schema to the DBMS is extremely important, and the schema must be designed with the utmost care. • The DBMS stores the descriptions of the schema constructs and constraints—also called the meta-data—in the DBMS catalog so that DBMS software can refer to the schema whenever it needs to. • The schema is sometimes called the intension, and a database state an extension of the schema.

  9. Schemas, Instances, and Database State (5/5) • Although the schema is not supposed to change frequently, it is not uncommon that changes need to be applied to the schema once in a while as the application requirements change. • This is known as schema evolution. • Most modern DBMSs include some operations for schema evolution that can be applied while the database is operational.

  10. DBMS Architecture and Data Independence

  11. The Three-Schema Architecture • The internal level has an internal schema, which describes the physical storage structure of the database. • The internal schema uses a physical data model and describes the complete details of data storage and access paths for the database. • The conceptual level has a conceptual schema, which describes the structure of the whole database for a community of users. • A high-level data model or an implementation data model can be used at this level. • The external or view level includes a number of external schemas or user views. • A high-level data model or an implementation data model can be used at this level.

  12. Data Independence (1/2) • The capacity to change the schema at one level of a database system without having to change the schema at the next higher level. • Data independence is accomplished because, when the schema is changed at some level, the schema at the next higher level remains unchanged; only the mapping between the two levels is changed.

  13. Data Independence (2/2) • Logical data independence is the capacity to change the conceptual schema without having to change external schemas or application programs. • Physical data independence is the capacity to change the internal schema without having to change the conceptual (or external) schemas.

  14. Database Languages and Interfaces

  15. DBMS Languages (1/7) • In many DBMSs where no strict separation of levels is maintained, one language, called the data definition language (DDL), is used by the DBA and by database designers to define the conceptual and internal schemas.

  16. DBMS Languages (2/7) • In DBMSs where a clear separation is maintained between the conceptual and internal levels, the DDL is used to specify the conceptual schema only. • Another language, the storage definition language (SDL), is used to specify the internal schema.

  17. DBMS Languages (3/7) • For a true three-schema architecture, we would need a third language, the view definition language(VDL), to specify user views and their mappings to the conceptual schema, but in most DBMSs the DDL is used to define both conceptual and external schemas.

  18. DBMS Languages (4/7) • Once the database schemas are compiled and the database is populated with data, users must have some means to manipulate the database. • Typical manipulations include retrieval, insertion, deletion, and modification of the data. The DBMS provides a datamanipulation language (DML) for these purposes.

  19. DBMS Languages (5/7) • In current DBMSs, the preceding types of languages are usually not considered distinctlanguages; rather, a comprehensive integrated language is used that includes constructs for conceptual schema definition, view definition, and data manipulation. • Storage definition is typically kept separate, since it is used for defining physical storage structures to fine-tune the performance of the database system, and it is usually utilized by the DBA staff.

  20. DBMS Languages (6/7) • Two main types of DMLs • High-level or nonprocedural DML • Can be entered interactively from a terminal (or monitor) or be embedded in a general-purpose programming language. • Set-at-a-time or set-orientedDMLs • Low-level or procedural DML • Must be embedded in a general-purpose programming language. • Record-at-a-timeDMLs

  21. DBMS Languages (7/7) • Whenever DML commands, whether high-level or low-level, are embedded in a general-purpose programming language, that language is called the host language and the DML is called the data sublanguage. • On the other hand, a high-level DML used in a stand-alone interactive manner is called a query language.

  22. DBMS Interfaces • Menu-Based Interfaces for Browsing • Forms-Based Interfaces • Graphical User Interfaces • Natural Language Interfaces • Interfaces for Parametric Users • Interfaces for the DBA

  23. The Database System Environment

  24. DBMS Component Modules

  25. Database System Utilities • Loading • Backup • File reorganization • Performance monitoring

  26. Tools, Application Environments, and Communications Facilities • CASE tools • Expanded data dictionary (or data repository) system • Application development environments • Communications software

  27. Classification of Database Management Systems

  28. Data Model • Relational • Object • Object-relational • Hierarchical • Network

  29. Number of Users • Single-user systems • Multiuser systems

  30. Number of Sites • Centralized • Distributed • Homogeneous • Heterogeneous • Federated

  31. Cost

  32. Types of Access Path

  33. General-Purpose or Special-Purpose

More Related