0% found this document useful (0 votes)
65 views30 pages

CH 1introductory Concepts of Dbms

This document provides an overview of database management systems (DBMS). It discusses what data, databases, management, and systems are. It then describes the goals and applications of DBMS. The document outlines some drawbacks of using file systems to store data and how DBMS offers solutions. It also discusses how DBMS came to be and compares database systems to file systems. Finally, it covers some key DBMS concepts like instances and schemas, data abstraction, data models, and database languages.

Uploaded by

linesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
65 views30 pages

CH 1introductory Concepts of Dbms

This document provides an overview of database management systems (DBMS). It discusses what data, databases, management, and systems are. It then describes the goals and applications of DBMS. The document outlines some drawbacks of using file systems to store data and how DBMS offers solutions. It also discusses how DBMS came to be and compares database systems to file systems. Finally, it covers some key DBMS concepts like instances and schemas, data abstraction, data models, and database languages.

Uploaded by

linesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

The World of Data

Data Base Management System


1. Introduction to DBMS

What is Data Information about the Thing

What is Data Base A Computerized Record-


Keeping System
What is Management Creation, Maintenance and
Deletion of Data

What is System To Store all the Data &


manage them within one
environment is called System

What is DBMS Managing Data with a basic


platform within one
environment is called DBMS
DBMS As per Textbook
Collection of interrelated data (database) and a set of programs
to access those data
DBMS Goal
To provide a convenient and efficient way to store and retrieve
data from the database
Applications
 Banking – Credit &  Finance Companies
Transaction
 Online retailers.
 Travelling Mgmt
 Manufacturing
 Universities & Colleges
 Human Resources
 Telecommunications employee records, salaries, tax
deductions
Drawbacks of using file systems to
store data:

• Data redundancy and inconsistency


• Multiple file formats, duplication of information
in different files
• Difficulty in accessing data
• Need to write a new program to carry out each
new task
• Data isolation — multiple files and formats
• Integrity problems
• Integrity constraints (e.g. account balance > 0)
become ―buried‖ in program code rather than
being stated explicitly
• Hard to add new constraints or change existing
ones
Cont…

• Atomicity of updates
• Failures may leave database in an inconsistent state with
partial updates carried out
• Example: Transfer of funds from one account to another
should either complete or not happen at all
• Concurrent access by multiple users
• Concurrent accessed needed for performance
• Uncontrolled concurrent accesses can lead to
inconsistencies
– Example: Two people reading a balance and updating
it at the same time
• Security problems
• Hard to provide user access to some, but not all, data

Database systems offer solutions to all the above problems


How the DBMS Came?
Ordinary FS DBMS

 Totally Manual  Searching is Faster

 Burden of Large Files  Removal of File Mgmt

 Mgmt is hard  Mgmt is more


Convenient & Efficient

 Uncomfortable with  More easy to move


moving of Data data

 Data Insecure  Security is more


Powerful

 Unreliable  Reliability is Increased


Database System Vs. File System

 Data redundancy and inconsistency

 Difficulty in accessing data

 Data isolation

 Integrity problems

 Atomicity problems

 Concurrent-access anomalies

 Security problems
Why Use a DBMS?

• Data independence and efficient access.


• Reduced application development time.
• Data integrity and security.
• Uniform data administration.
• Concurrent access, recovery from crashes.
Why Study Databases?? ?

• Shift from computation to information


– at the “low end”: scramble to webspace (a
mess!)
– at the “high end”: scientific applications
• Datasets increasing in diversity and volume.
– Digital libraries, interactive video, Human
Genome project, EOS project
– ... need for DBMS exploding
• DBMS encompasses most of CS
– OS, languages, theory, AI, multimedia, logic
Instances & Schemas
Instances Schema
The collection of information stored The overall design of the database
in the database at a particular is called Schema
moment is called an Instance of the
database
e.g. Value of the variable in the e.g. Declaration of the variable
program
Frequently Changes Changed infrequently

Physical Schema: Describes the DB design at physical level


Logical Schema: Describes the DB design at logical level
Subschema: Describes the DB design at view level
Data Abstraction
Abstraction means Hide something from Actual

Customers Highest Level Increase…


Easiness
Abstraction
Security
Sales Department Middle Level
Decrease…
Power
Hide ness
Automobile Department Lowest Level Complexity
Data Abstraction (Cont…)
Abstraction means Hide something from Actual
User
View Level Highest Level of Abstraction
Views the selected data from database
View 1 View 2 … View n
Describes the part of the entire database

Next-Higher Level of Abstraction


DB Logical
Tells “what” the data actually stored
Admin Level
Describes the entire database & their
relationship.
Physical Lowest Level of Abstraction
Level Tells “how” the data actually stored
Describes complex data structures in detail
Data Independence

• Capacity to exchange the schema at one level of dbase system


without having to change the schema at next higher level.

• Logical Data Independence -ability to modify the conceptual schema


without changing external/application schema.
• -by adding record type or data
• -reduce database

• Physical Data Independence – the ability to modify the physical/internal l


schema without changing the logical/conceptual schema
– Applications depend on the logical schema
– In general, the interfaces between the various levels and components
should be well defined so that changes in some parts do not seriously
influence others
Data Model
Identity
A Data-Model is a collection of Conceptual Tools for describing
Data, Relationships among Data, Semantics of Data, and
Consistency Constraints
Data Information
Semantics
Relationship Relationship
Relationship
Semantics Meaning
S C Constraints Validity
Data Data

Relationship
Relationship

B
Data
Two Data Models

Graphical representation Tabular representation


Based on a visualization of real Based on a collection of
world, consists of a collection Tables which represent data
of Objects, called entities and and relationships among
of relationships among these those data
objects
Low-Level Data Model
High-Level Data Model

Developer always go to first for E-R Model and then develop Relational Model for that.
Entity-Relationship Model

Example of schema in the entity-relationship


model
Entity Relationship Model (Cont.)

• E-R model of real world


– Entities (objects)
• E.g. customers, accounts, bank branch
– Relationships between entities
• E.g. Account A-101 is held by customer
Johnson
• Relationship set depositor associates
customers with accounts
• Widely used for database design
– Database design in E-R model usually converted to
design in the relational model (coming up next) which is
used for storage and processing
Relational
• Example of tabular Model
data in the relational model

Attributes

Customer customer- customer- customer- account-


-id name street city number
192-83-7465 Johnson Alma Palo Alto A-101

019-28-3746 Smith North Rye A-215

192-83-7465 Johnson Alma Palo Alto A-201

321-12-3123 Jones Main Harrison A-217


A Sample Relational Database
Other Data Models

Object-Oriented Data Model Network Data Model

Extension of E-R Model with Organizes data using records


the notions of encapsulation, & sets.
methods and objects

Object-Relational Data Model


Semistructured Data Model
Data items of the same type
Combination of Object-
may have different sets of
Oriented Data Model and
attributes
Relational Model
Used with XML
Database Languages

Data Definition Language Data Manipulation Language


Create Database Schema Express database queries and updates
e.g. create table account e.g.
(acc-no char(10), select acc-no from account
Balance integer)
Updates the special set of
Updates the table on which
tables called data dictionary
query is executed
or data directory
Consistency constraints can Conditions can be specified
be specified with DDL with DML
More to DML Language

DML is…  Retrieval of information stored in the DB


 The insertion of new information into the DB
 The deletion of information from the DB
 The modification of information stored in the DB

Procedural DMLs “what” data are needed and “how” to get those data

specify “what” data are needed without


Non-Procedural (Declarative) DMLs
specifying “how” to get those data

A query is a statement requesting the retrieval of data. The


Query Language portion of a DML that involves data retrieval is called
query language
Data Definition Language (DDL)
• Specification notation for defining the database schema
Example: create table account (
account_number char(10),
branch_name char(10),
balance integer)
• DDL compiler generates a set of tables stored in a data dictionary
• Data dictionary contains metadata (i.e., data about data)
– Database schema
– Data storage and definition language
• Specifies the storage structure and access methods used
– Integrity constraints
• Domain constraints
• Referential integrity (e.g. branch_name must correspond to a
valid branch in the branch table)
– Authorization
Database Users

• Users are differentiated by the way they expect to


interact with the system
• Application programmers – interact with system
through DML calls
• Sophisticated users – form requests in a
database query language
• Specialized users – write specialized database
applications that do not fit into the traditional
data processing framework
• Naïve users – invoke one of the permanent
application programs that have been written
previously
– E.g. people accessing database over the web, bank
tellers, clerical staff
Database Users
Native Users Application Programmers
Unsophisticated users who Computer professionals who
interact with the system by write application programs
prewritten application
e.g. bank teller who needs e.g. programmers who
to transfer 50 Rs. then just create the application
call „transfer‟ program which interact with DB
User Interface: Creates the forms & reports
Forms & Reports using some type of tools like
To submit a query just fill RAD (Rapid Application
up the form Development) Tool
They simply read report They use predefined
generated by the Database function to interact with
Database
Database Users (Cont…)
Sophisticated Users Specialized Users
Interact with the system Sophisticated users who
without writing programs writes specialized database
applications
e.g. users who directly e.g. people who creates the
work with DB through application to manipulate
DDL, DML Statements data directly with DB
They use queries for getting They develop systems that
data by submitting them to store data with complex data
query processor types (e.g. images, audio
data)
They use tools like Online e.g. computer-aided design
Analytical Processing systems, expert systems,
(OLAP) and Data Mining environment-modeling
Database Administrator
DBA
A person who has the central control of both the database and
the program that access those data over the system

DBA Tasks
Schema definition
Storage structure and access-method definition
Schema and physical-organization modification
Granting of authorization for data access
Routine maintenance
Specifying integrity constraints
Monitoring performance and responding to changes in requirements
Visualization of DBMS
Client
Server
(Oracle, DB/2)
Client User

DBA Hard Disk


Client

f1 f3 User
f2
f4 f6
f5
sss
Application Architectures

Two-tier architecture: E.g. client programs using ODBC/JDBC to


communicate with a database
Three-tier architecture: E.g. web-based applications, and
applications built using “middleware”

You might also like