03-Lec 3 CH 2
03-Lec 3 CH 2
Chapter 2
Database System Concepts and Architecture
Chapter 2 Outline
• 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
• 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.)
• 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.
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
Slide 2- 21
Data Independence
• 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