Unit 1-Introduction To Database Systems
Unit 1-Introduction To Database Systems
RV College of
Engineering
Unit 1 (Introduction to
Improvi Database Systems)
1
RV College of Go, change the world
Engineering
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 of Go, change the world
Engineering
Basic Definitions
• 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 Management System (DBMS):
• A software package/ system to facilitate the creation and maintenance of a computerized
database.
• Database System:
• The DBMS software together with the data itself. Sometimes, the applications are also included.
3
RV College of Go, change the world
Engineering
• Inconsistency
• Redundancy
• Loss of flexibility
• Multiple files
• Update Problem
4
RV College of Go, change the world
Applications
• Traditional Applications:
• Numeric and Textual Databases
• More Recent Applications:
• Multimedia Databases
• Geographic Information Systems (GIS)
• Data Warehouses
• Real-time and Active Databases
• Many other applications
5
RV College of Go, change the world
Engineering
• Define a particular database in terms of its data types, structures, and constraints
• Construct or Load the initial database contents on a secondary storage medium
• Manipulating the database:
• Retrieval: Querying, generating reports
• Modification: Insertions, deletions and updates to its content
• Accessing the database through Web applications
• Processing and Sharing by a set of concurrent users and application programs –
yet, keeping all data valid and consistent
6
RV College of Go, change the world
Engineering
• 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 of Go, change the world
Engineering
8
RV College of Go, change the world
Example of a Database
Engineering
9
RV College of Go, change the world
Engineering
Example of a Database
(with a Conceptual Data Model)
• Some mini-world relationships:
• SECTIONs are of specific COURSEs
• STUDENTs belong to SECTIONs
• COURSEs have prerequisite COURSEs
• INSTRUCTORs teach SECTIONs
• COURSEs are offered by DEPARTMENTs
• STUDENTs major in DEPARTMENTs
10
RV College of Go, change the world
Engineering
11
RV College of Go, change the world
Engineering
• Data Abstraction:
• The characteristic that allows program-data independence and program-operation independence
• Program-operation independence
• User application programs can operate on the data by invoking operations through their names and
arguments, regardless of how the operations are implemented
• 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 of Go, change the world
Engineering
13
RV College of Go, change the world
Engineering
Database Users
14
RV College of Go, change the world
Engineering
Database Users
15
RV College of Go, change the world
Engineering
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:
• Casual: access database occasionally when needed
• Naïve or Parametric: they make up a large section of the end-user population.
• They use previously well-defined functions in the form of “canned transactions” against the
database.
• Examples are bank-tellers or reservation clerks who do this activity for an entire shift of operations.
• 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 of Go, change the world
Engineering
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 Model Structure and Constraints:
• Constructs are used to define the database structure
• Constructs typically include elements (and their data types) as well as groups of elements
(e.g. entity, record, table), and relationships among such groups
• Constraints specify some restrictions on valid data; these constraints must be enforced at all
times
RV College of Go, change the world
Engineering
Data Models
19
RV College of Go, change the world
Engineering
20
RV College of Go, change the world
Engineering
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 of Go, change the world
Engineering
22
RV College of Go, change the world
Engineering
Database State
• 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.
• Initial Database State
• Refers to the database state when it is initially loaded into the system.
• Valid State
• A state that satisfies the structure and constraints of the database.
23
RV College of Go, change the world
Engineering
24
RV College of Go, change the world
Engineering
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.
• Not explicitly used in commercial DBMS products, but has been useful
in explaining database system organization
25
RV College of Go, change the world
Engineering
26
RV College of Go, change the world
Engineering
27
RV College of Go, change the world
Engineering
Data Independence
• Logical Data Independence:
• The capacity to change the conceptual schema without having to change the
external schemas and their associated application programs.
• Physical Data Independence:
• 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 of Go, change the world
Engineering
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.
• The higher-level schemas themselves are unchanged.
• Hence, the application programs need not be changed since they refer to the
external schemas.
29
RV College of Go, change the world
Engineering
DBMS Languages
• Data Definition Language (DDL)
• Data Manipulation Language (DML)
• High-Level or Non-procedural Languages: These include the relational
language SQL
• May be used in a standalone way or may be embedded in a programming language
• Low Level or Procedural Languages:
• These must be embedded in a programming language
30
RV College of Go, change the world
Engineering
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 of Go, change the world
Engineering
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).
32
RV College of Go, change the world
Engineering
Types of DML
• 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. Many records can be retrieved in one DML statement
• 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.
33
RV College of Go, change the world
Engineering
DBMS Languages
34
RV College of Go, change the world
Engineering
35
RV College of Go, change the world
Engineering
Thank YOU
36