Presentation is loading. Please wait.

Presentation is loading. Please wait.

2. Database System Concepts and Architecture

Similar presentations


Presentation on theme: "2. Database System Concepts and Architecture"— Presentation transcript:

1 2. Database System Concepts and Architecture
Chapter 2

2 2.1 Data Models, Schemas, and Instances
Data Model: A collection of concepts used to describe the structure of a database Database Structure: Data types, relationships, and constraints on data Database Schema: The description of the database (intension) Schema Diagram: Diagrammatic representation of the DB schema Schema Construct: An object in the schema Database State/Instance: The data in the database at a particular moment in time (extension)

3 2.1 Data Models, Schemas, and Instances
Database schema Database Instance

4 2.1 Data Models, Schemas, and Instances
Schema diagram displays some aspects of the schema Data types and relationships are not evident Define a new DB? Specify the DB schema DB state is the empty state Populate DB with initial data? No changes in the schema DB state is the initial state Subsequent update operations? DB state changes into a new state

5 2.1 Data Models, Schemas, and Instances
DBMS ensures that every DB state is a valid state A state that satisfies the structure and constraints specified in the schema Special care must be taken when designing a DB schema A schema is not supposed to change frequently A DBMS stores the meta-data Schema constructs and constraints

6 2.2 DBMS Architecture and Data Independence
DB architecture is specified using a three-schema architecture Used to achieve the first 3 characteristics of DB approach Separation between programs and data Support of multiple user views Use of catalog to store DB schema Provides only a description of data

7 2.2.1 The Three-Schema Architecture
Physical (Internal) Level Has an internal schema Describes the physical storage structure of the DB Logical (Conceptual) Level Has a conceptual schema Describes the structure of the whole DB (entities, data types, relationships, user operations, and constraints) Hides details of the physical level External (View) Level Has several external schemas or user views Each describes the part of the DB that a particular user is interested in

8 2.2.1 The Three-Schema Architecture
External View External View mapping mapping Conceptual Schema mapping Internal Schema

9 2.2.2 Data Independence Data Independence Result?
Ability to change the schema at one level of a DB system without having to change the schema at the next higher level Result? Logical data independence Physical data independence

10 2.2.2 Data Independence Logical data independence
Ability to change the conceptual schema without having to change the external schemas or application programs Changes? Expand the DB (add a record or data item) Reduce the DB (remove a record or data item) Changes to constraints

11 2.2.2 Data Independence Physical data independence
Ability to change the internal schema without having to change the conceptual or external schemas Changes? Reorganization of physical files

12 2.3.1 DBMS Languages Data Definition Language (DDL)
Used by the DBA and database designers to specify the conceptual schema of a database In many DBMSs, the DDL is also used to define internal and external schemas (views) In some DBMSs, separate storage definition language (SDL)andview definition language (VDL) are used to define internal and external schemas SDL is typically realized via DBMS commands provided to the DBA and database designers

13 2.3.1 DBMS Languages Data Manipulation Language (DML)
Used to specify database retrievals and updates DML commands (data sublanguage) can be embedded in a general-purpose programming language (host language), such as COBOL, C, C++, or Java. A library of functions can also be provided to access the DBMS from a programming language Alternatively, stand-alone DML commands can be applied directly (called a query language).

14 2.3.1 DBMS Languages Data Manipulation Language (DML) DML Types:
High Level or Non-procedural Language For example, the SQL relational language Are “set”-oriented and specify what data to retrieve rather than how to retrieve it. Also called declarative languages. Low Level or Procedural Language Retrieve data one record-at-a-time; Constructs such as looping are needed to retrieve multiple records, along with positioning pointers

15 2.3.2 DBMS Interfaces Menu-Based Interfaces Forms-Based Interfaces
Popular for browsing the Web Forms-Based Interfaces Designed for naïve users Graphical User Interfaces (GUI) Point and Click, Drag and Drop, etc. Natural Language Interfaces Requests are written in English Speech Input and Output Speech used as input query and/or as query result Interfaces for Parametric Users Ex: bank tellers using function keys Interfaces for the DBA Commands used for Creating user accounts, granting authorizations, setting system parameters, changing schemas or access paths

16 2.4 The Database System Environment

17 2.5 DBMS Architectures Centralized DBMSs Architecture
Combines everything into single system including- DBMS software, hardware, application programs, and user interface processing software User can still connect through a remote terminal – however, all processing is done at centralized site

18 2.5 DBMS Architectures Basic Client/Server Architectures
Specialized Servers with Specialized functions (Print server, File server, DBMS server, Web server, server) Clients can access the specialized servers as needed

19 2.5 DBMS Architectures Two-Tier Client/Server Architectures
A client program may connect to several DBMSs, sometimes called the data sources Data sources can be files or other non-DBMS software that manages data Other variations of clients are possible

20 2.5 DBMS Architectures Three-Tier and n-tier Architectures
Common for Web applications Intermediate Layer called Application Server or Web Server: Such an architecture can enhance security: Database server only accessible via middle tier Clients cannot directly access database server

21 2.6 Classification of Database Management Systems
Several criteria are used Data Model Traditional Relational data model Network data model Hierarchical data model Emerging Object data model Object-relational data model Number of Users Single-user systems Multi-user systems

22 2.6 Classification of Database Management Systems
Number of Sites Centralized DBMS Distributed DBMS Homogeneous DDBMS Heterogeneous DDBMS Federated DBMS (multidatabase system)

23 Any Questions?


Download ppt "2. Database System Concepts and Architecture"

Similar presentations


Ads by Google