Unit 1-Introduction To Database Systems
Unit 1-Introduction To Database Systems
RV College world
of
Engineering
Unit 1 (Introduction to
Database Systems)
Introduction to Database Systems -Databases and Database users: Introduction, An example, Characteristics
of Database Approach, Data Models, Schemas and Instances, Three-schema Architecture and Data
Independence, The Database System Environment.
Improvi
Data Modeling Using the Entity-Relationship Model- High-Level Conceptual Data Models for Database
Design; A Sample Database Application; Entity Types, Entity Sets, Attributes and Keys; Relationship types,
Relationship Sets, Roles and Structural Constraints; Weak Entity Types
Original Content:
Ramez Elmasri and Shamkant B. Navathe
Dr. Shobha G
Professor, Department of CSE
RV College of Engineering, Bengaluru - 59
1
RV College Go, change the
of
Engineerin world
g
Contents
• Basic Definitions
• Typical DBMS Functionality
• Example of a Database (UNIVERSITY)
• Main Characteristics of the Database Approach
• Database Users
• Data Models
• Schemas and Instances
• Three-schema Architecture and Data Independence
• Database Languages and Interfaces
• The Database System Environment. 2
RV College Go, change the
of
Engineerin world
Basic Definitions
g
• Database:
• A collection of related data.
• Data:
• Known facts that can be recorded and have an implicit meaning.
• Mini-world:
• Some part of the real world about which data is stored in a database. For example, student grades and
transcripts at a university.
• Database System:
• The DBMS software together with the data itself. Sometimes, the applications are also included.
3
RV College Go, change the
of
Engineerin world
g
• Inconsistency
• Redundancy
• Loss of flexibility
• Multiple files
• Update Problem
4
RV College Go, change the
Applications
• Traditional Applications:
• Numeric and Textual Databases
5
RV College Go, change the
of
Engineerin world
g
• Define a particular database in terms of its data types, structures, and constraints
• Other features:
• Protection or Security measures to prevent unauthorized access
• Presentation and Visualization of data
• Maintaining the database and associated programs over the lifetime of the
database application
• Called database, software, and system maintenance
7
RV College Go, change the
of
Engineerin world
g
8
RV College Go, change the
of
world
Example of a Database
Engineerin
g
9
RV College Go, change the
of
Engineerin world
Example of a Database
g
10
RV College Go, change the
of
Engineerin world
g
11
RV College Go, change the
of
Engineerin world
g
• Data Abstraction:
• The characteristic that allows program-data independence and program-operation independence
• Program-operation independence
Allows changing data storage structures and operations without having to change the DBMS access
programs.
• A data model is used to hide storage details and present the users with a conceptual view of the
database.
• Relational model hides how the data is stored and how the operations are implemented. DB is
represented in terms of entities, attributes and relationships among entities that is understood
by most users.
• Programs refer to the data model constructs rather than data storage details
• Support of multiple views of the data:
• Each user may see a different view of the database, which describes only the data of interest to
that user.
12
RV College Go, change the
of
Engineerin world
g
• Concurrency control within the DBMS guarantees that each transaction is correctly
executed or aborted
• Recovery subsystem ensures each completed transaction has its effect permanently
recorded in the database
• OLTP (Online Transaction Processing) is a major part of database applications. This allows
hundreds of concurrent transactions to execute per second.
13
RV College Go, change the
of
Engineerin world
g
Database Users
• Those who actually use and control the database content, and those who
design, develop and maintain database applications (called “Actors on the
Scene”), and
• Those who design and develop the DBMS software and related tools, and the
computer systems operators (called “Workers Behind the Scene”).
14
RV College Go, change the
of
Engineerin world
g
Database Users
• Database Administrators:
• Responsible for authorizing access to the database, for coordinating and monitoring its use,
acquiring software and hardware resources, controlling its use and monitoring efficiency of
operations.
• Database Designers:
• Responsible to define the content, the structure, the constraints, and functions or
transactions against the database. They must communicate with the end-users and
understand their needs.
15
RV College Go, change the
of
Engineerin world
g
Categories of End-users
• End-users: They use the data for queries, reports and some of them update the database
content. End-users can be categorized into:
• Sophisticated:
• These include business analysts, scientists, engineers, others thoroughly familiar with the system capabilities.
• Many use tools in the form of software packages that work closely with the stored database.
• Stand-alone:
• Mostly maintain personal databases using ready-to-use packaged applications.
• An example is a tax program user that creates its own internal database.
• Another example is a user that maintains an address book
16
RV College Go, change the
of
Engineerin world
g
• Design and implement the DBMS modules and interfaces as a software package
• Tool Developers
• Design and implement tools – the software packages that facilitate database modeling
and design, database system design, and improved performance
17
Data Models
• Data Abstraction
• Suppression of details of data organization and storage and the highlighting of the essential
features for an improved understanding of data
• Data Model:
• A collection of concepts to describe the structure of a database, the operations for manipulating
these structures, and certain constraints that the database should obey.
• It provides necessary means to achieve data abstraction
Data Models
• Operations on the data model may include basic model operations (e.g.
generic insert, delete, update) and user-defined operations (e.g.
compute_student_gpa, update_inventory)
19
RV College Go, change the
of
Engineerin world
g
Database Schema
• Database Schema
• The description of a database.
• Includes descriptions of the database structure, data types, and the
constraints on the database.
• Schema Diagram
• An illustrative display of (most aspects of) a database schema.
• Schema Construct
• A component of the schema or an object within the schema, e.g., STUDENT,
COURSE.
21
RV College Go, change the
of
Engineerin world
g
22
RV College Go, change the
of
Engineerin world
Database State
g
• Database State
• 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,
entity instance
• Refers to the content of a database at a moment in time.
• Valid State
• A state that satisfies the structure and constraints of the database.
23
RV College Go, change the
of
Engineerin world
g
24
RV College Go, change the
of
Engineerin world
g
Three-Schema Architecture
• Proposed to support DBMS characteristics of:
• Program-data independence.
• Support of multiple views of the data.
• Its goal is to separate the user applications and the physical database.
25
RV College Go, change the
of
Engineerin world
g
• Internal schema at the internal level to describe physical storage structures and access paths
(e.g indexes).
• Typically uses a physical data model.
• Conceptual schema at the conceptual level to describe the structure and constraints for the
whole database for a community of users. It describes entities, data types, relationships, user
operations and constraints.
• Uses a conceptual or an implementation data model.
• External schemas at the external level (or view level) to describe the various user views.
• Usually uses the same data model as the conceptual schema.
26
RV College Go, change the
of
Engineerin world
g
27
RV College Go, change the
of
Engineerin world
g
Data Independence
• Logical Data Independence:
• The capacity to change the conceptual schema without having to change the
external schemas and their associated application programs.
• The capacity to change the internal schema without having to change the
conceptual schema.
• For example, the internal schema may be changed when certain file structures
are reorganized or new indexes are created to improve database performance
28
RV College Go, change the
of
Engineerin world
g
Data Independence
• When a schema at a lower level is changed, only the mappings
between this schema and higher-level schemas need to be changed in
a DBMS that fully supports data independence.
29
RV College Go, change the
of
Engineerin world
g
DBMS Languages
• Data Definition Language (DDL)
30
RV College Go, change the
of
Engineerin world
g
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) and view
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
31
RV College Go, change the
of
Engineerin world
g
DBMS Languages
• Data Manipulation Language (DML):
32
RV College Go, change the
of
Engineerin world
g
Types of DML
• High Level or Non-procedural Language:
33
RV College Go, change the
of
Engineerin world
g
DBMS Languages
34
RV College Go, change the
of
Engineerin world
35
RV College Go, change the
of
Engineerin world
g
Thank YOU
36