0% found this document useful (0 votes)
18 views32 pages

03-Lec 3 CH 2

Chapter 2 of INF 311 covers database system concepts and architecture, focusing on data models, schemas, and instances. It discusses the three-schema architecture for data independence, detailing internal, conceptual, and external levels, as well as the importance of data abstraction. The chapter also introduces various data models, including relational and object data models, and explains the distinction between database schema and state.

Uploaded by

Ti To
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views32 pages

03-Lec 3 CH 2

Chapter 2 of INF 311 covers database system concepts and architecture, focusing on data models, schemas, and instances. It discusses the three-schema architecture for data independence, detailing internal, conceptual, and external levels, as well as the importance of data abstraction. The chapter also introduces various data models, including relational and object data models, and explains the distinction between database schema and state.

Uploaded by

Ti To
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

INF 311 - Database management system (1)

Chapter 2
Database System Concepts and Architecture
Chapter 2 Outline

• Data Models, Schemas, and Instances


• Three-Schema Architecture and Data Independence
Data Models, Schemas, and Instances

• Data abstraction
• Suppression of details of data organization and storage
• Highlighting of the essential features for an improved
understanding of data
Data Models, Schemas, and Instances (cont'd.)

• Data model
• Collection of concepts that describe the structure of a database
• Provides means to achieve data abstraction
• Basic operations
• Specify retrievals and updates on the database
• the dynamic aspect or behavior of a database application.
• This allows the database designer to specify a set of valid user-defined operations
that are allowed on the database objects. An example of a user-defined operation
could be COMPUTE_GPA, which can be applied to a STUDENT object.
Categories of Data Models

• High-level or conceptual data models


• Close to the way many users perceive data
• Low-level or physical data models
• Describe the details of how data is stored on computer storage
media
• Representational data models
• Easily understood by end users
• Also similar to how data organized in computer storage
High-level or conceptual data models

• Entity
• Represents a real-world object or concept
• Attribute
• Represents some property of interest
• Further describes an entity
• Relationship among two or more entities
• Represents an association among the entities
• Entity-Relationship model
Categories of Data Models (cont'd.)

• Relational data model


• Used most frequently in traditional commercial DBMSs
• Represent data by using record structures and hence are
sometimes called record-based data models.
Object data model
• New family of higher-level implementation data models Closer
to conceptual data models (UML)
Categories of Data Models (cont'd.)

• Physical data models


• Describe how data is stored as files in the computer by
representing information such as record formats, record orderings,
and access paths
• Access path
• Structure that makes the search for particular database records
efficient
• Index
• Example of an access path
• Allows direct access to data using an index term or a keyword
Schemas, Instances, and Database State

• Database schema
• Description of a database which is specified during database design.
• is not expected to change frequently
• Schema diagram
• Displayed schema
• The diagram displays the structure of each record type but not the actual
instances of records.
• Schema construct
• Each object in the schema such as STUDENT or COURSE
• Database state or snapshot
• Data in database at a particular moment in time
Schemas, Instances, and Database State (cont'd.)
Database Schema vs. Database State
• Database State:
• Refers to the content of a database at a moment in time.
• The actual data stored in a database at a particular moment in time. This includes
the collection of all the data in the database.
• Also called database instance (or occurrence or snapshot).
• The term instance is also applied to individual database components, e.g.
record instance, table instance
• Initial Database State:
• Refers to the database state when it is initially loaded into the system.
• Every time an update operation is applied to the database, we get another database state
• Valid State:
• A state that satisfies the structure and constraints of the database. Slide 2- 14
Slide 6- 15
Schemas, Instances, and Database State (cont'd.)

• Schema evolution
• Changes applied to schema as application requirements change

 Distinction
 The database schema changes very infrequently.

 The database state changes every time the database is updated

• Schema is also called intension.


• State is also called extension
Example of a database state

Slide 2- 17
Three-Schema Architecture and Data Independence
• The goal of the three-schema architecture is to separate the user applications from the physical
database.
• Internal level
• Describes 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.
• Conceptual level
• has a conceptual schema
• Describes structure of the whole database for a community of users
• The conceptual schema hides the details of physical storage structures and concentrates on
describing entities, data types, relationships, user operations, and constraints.
• External or view level
• Describes part of the database that a particular user group is interested in and hides the rest of
the database from that user group.
Three-Schema Architecture and Data Independence (cont'd.)
Three-Schema Architecture and Data Independence (cont'd.)
Three-Schema Architecture

• Mappings among schema levels are needed to transform


requests and data.
• Programs refer to an external schema, and are mapped by
the DBMS to the internal schema for execution.
• Data extracted from the internal DBMS level is reformatted
to match the user’s external view (e.g. formatting the
results of an SQL query for display in a Web page)

Slide 2- 21
Data Independence

• Capacity to change the schema at one level of a database


system
• Without having to change the schema at the next higher level
• Types:
• 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 schema.
Hence, the external schemas need not be changed as well.
DBMS Languages

• Data definition language (DDL)


• Defines both schemas
• Storage definition language (SDL)
• Specifies the internal schema
• View definition language (VDL)
• Specifies user views/mappings to conceptual schema
• Data manipulation language (DML)
• Allows retrieval, insertion, deletion, modification
Centralized and Client/Server
Architectures for DBMSs
• Centralized DBMSs Architecture
• All DBMS functionality, application program
execution, and user interface processing carried
out on one machine
Basic Client/Server Architectures

• Servers with specific functionalities


• File server
• Maintains the files of the client machines.
• Printer server
• Connected to various printers; all print requests by the clients are
forwarded to this machine
• Web servers or e-mail servers
Basic Client/Server Architectures (cont'd.)

• Client machines
• Provide user with:
• Appropriate interfaces to utilize these servers
• Local processing power to run local applications
Basic Client/Server Architectures (cont'd.)

• Client
• User machine that provides user interface capabilities and local
processing
• Server
• System containing both hardware and software
• Provides services to the client machines
• Such as file access, printing, archiving, or database access
Two-Tier Client/Server
Architectures for DBMSs
• Server handles
• Query and transaction functionality related to SQL processing
• Client handles
• User interface programs and application programs
Three-Tier and n-Tier Architectures for Web Applications

• Application server or Web server


• Adds intermediate layer between client and the database
server
• Runs application programs and stores business rules
• N-tier
• Divide the layers between the user and the stored data further
into finer components

You might also like