PPT
PPT
Data Model:
A set of concepts to describe the structure of a DB (data types, relationships), operations for manipulation of the DB, and constraints on the DB.
Schemas
Database Schema:
The description of a database. Changes infrequently. Also called the intension. Includes descriptions of the DB structure, data types, and constraints.
Schema Diagram:
A diagram of (most aspects of) a database schema. Data types, relationships, constraints are not shown
Schema Construct:
A component (or object) of the schema, e.g., STUDENT, COURSE.
Example of a DB State
Three-Schema Architecture
A quasi-standard created by ANSI in the 1970s to support three of the important DBMS characteristics:
program/data independence multiple views use of a catalog to store the DB description
Three-Schema Architecture - 2
Defines DBMS schemas at three levels:
Internal schema: describes physical storage structures and access pathshow the data is stored.
Typically uses a physical data model.
Conceptual schema: describes the structure and constraints of the entire DB for all userswhat is stored in the DB.
Uses a conceptual or an implementation data model.
Three-Schema Architecture - 3
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 users external view (e.g. formatting the results of an SQL query for display in a Web page)
Three-Schema Architecture 4.
Program/Data Independence
Logical Data Independence: The External Views (applications) are immune to the changes in the conceptual level and physical level schemas. Physical Data Independence: The External Views (applications) & Conceptual Level Schemas (conceptual and logical schema) are immune to the changes in physical level schemas.
Program/Data Independence 2.
When a schema at a lower level is changed, only the mappings between this schema and higher-level ones need to be changed. The higher-level schemas themselves are unchanged. Application programs are unaffected since they refer to the external schemas, hence program/data independence.
DBMS Languages - 1
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). Some DBMSs (that have a clear separation between conceptual and internal levels) have a separate storage definition language (SDL) and view definition language (VDL) to define internal and external schemas.
DBMS Languages - 2
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. Alternatively, stand-alone DML commands can be applied directly (called a query language).
DBMS Languages 3.
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.
DBMS Interfaces - 1
Stand-alone query language interfaces
Example: Entering SQL queries at the DBMS interactive SQL interface (e.g. SQL*Plus in ORACLE)
DBMS Interfaces - 2.
User-friendly interfaces:
Menu-based, popular for browsing on the web Forms-based, designed for nave users Graphics-based (PointnClick, DragnDrop etc.) Natural language: requests in written English, e.g. give me all products from vendor 10 that cost more than $200 Combinations of the above
Other Tools
Data dictionary / repository:
Used to store schema descriptions and other information such as design decisions, application program descriptions, user information, usage standards, etc.
Other Tools
Application Development Environments and CASE (computer-aided software engineering) tools: Examples:
PowerBuilder (Sybase) JBuilder (Borland) JDeveloper 10G (Oracle)
Clients
Provide appropriate interfaces through a client software module to access and utilize the various server resources. Clients may be diskless machines or PCs or Workstations with disks with only the client software installed. Connected to the servers via some form of a network.
(LAN: local area network, wireless network, etc.)
DBMS Server
Provides database query and transaction services to the clients Relational DBMS servers are often called SQL servers, query servers, or transaction servers Applications running on clients utilize an Application Program Interface (API) to access server databases via standard interface such as:
ODBC: Open Database Connectivity standard JDBC: for Java programming access
Client and server must install appropriate client and server module software for ODBC or JDBC
Classification of DBMSs
Based on the data model used
Traditional: Relational, Network, Hierarchical. Emerging: Object-oriented, Object-relational.
Other classifications
Single-user (typically used with personal computers) vs. multi-user (most DBMSs). Centralized (uses a single computer with one database) vs. distributed (uses multiple computers, multiple databases)
Different licensing options: site license, maximum number of concurrent users (seat license), single user, etc.
Summary
Data Models and Their Categories Schemas, Instances, and States Three-Schema Architecture Data Independence DBMS Languages and Interfaces Database System Utilities and Tools Centralized and Client-Server Architectures Classification of DBMSs