0% found this document useful (0 votes)
42 views

Introduction

DBMS Basic Concepts The document discusses the basic concepts of a database management system (DBMS) including: 1. A DBMS is software that allows users to define, create, and maintain a database and provides controlled access to stored data. 2. Key components of a database system include hardware, software, data, users, and procedures. 3. Data models, schemas, and instances define the structure and organization of data in a database.

Uploaded by

Pranay Kumar
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views

Introduction

DBMS Basic Concepts The document discusses the basic concepts of a database management system (DBMS) including: 1. A DBMS is software that allows users to define, create, and maintain a database and provides controlled access to stored data. 2. Key components of a database system include hardware, software, data, users, and procedures. 3. Data models, schemas, and instances define the structure and organization of data in a database.

Uploaded by

Pranay Kumar
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 37

DBMS Basic

Concepts
DBMS
• Database Management System
• Term Database requires understanding of
data and information
• Data: It can be anything like name, place or
number, etc. Data usually refers to raw data, or
unprocessed data.

• Information: It is organized or classified data so


that it has some meaningful values to the receiver.
– Information is the processed data on which decisions
and actions are based.
Difference between Data
and Information?
Data Information
Data is raw facts and figures Information is a processed form of data

For example: 12 is data For example: When 12 is stored in row


column form as shown it is information.
Age 12

Data are atomic level pieces of Information is a collection of data


information

Data does not help in decision making Information helps in decision making
Database
• A database is a shared collection of logically
related data designed to meet the information
needs of an organization
• The related information when placed is an
organized form makes a database.
• The organization of data/information is
necessary because unorganized information
has no meaning.
Purpose of DBMS
An example
•University Database:
Data about students, faculty, courses, research-
laboratories, course registration/enrollment etc.
Reflects the state of affairs of the academic
aspects of the university.
Purpose: To keep an accurate track of the
academic activities of the university.
Purpose of DBMS
Before DBMSs were introduced, organizations
usually stored information in file processing
system which has a number of disadvantages:
•Data redundancy and inconsistency
•Difficulty in accessing data
•Data isolation
•Integrity problems
•Atomicity problems
•Concurrent-access anomalies
•Security problems
File System vs DBMS
File System DBMS

File system is a software that manages ad DBMS is a software for managing the
organizes the files in a storage medium database.
within a computer.
Redundant data can be present in a file In DBMS there is no redundant data.
system.
There is less data consistency in file There is more data consistency because
system. of the process of normalization.
There is no efficient query processing in Efficient query processing is there in
file system. DBMS.
It is less complex as compared to DBMS. It has more complexity in handling as
compared to file system.
File systems provide less security in DBMS has more security mechanisms as
comparison to DBMS. compared to file system.
It is less expensive than DBMS. It has a comparatively higher cost than a
file system.
Database Management System
• DBMS A database management system is the
software system that allows users to define,
create and maintain a database and provides
controlled access to the data.
• A database management system (DBMS) is
basically a collection of programs that enables
users to store, modify, and extract information
from a database as per the requirements.
Operations on databases
• To add new information
• To view or retrieve the stored information
• To modify or edit the existing
• To remove or delete the unwanted
information
• Arranging the information in a desired order
etc.
Applications of DBMS
•Banking: all transactions
•Airlines: reservations, schedules
•Universities: registration, grades
•Sales: customers, products, purchases
•Online retailers: order tracking, customized
recommendations
•Manufacturing: production, inventory, orders,
supply chain
•Human resources: employee records, salaries, tax
deductions
Components of Database
• Five major components in database system
environment:
– Hardware
– Software
– Data
– Users
– Procedures
Components of Database System
• Hardware: It is the actual computer system
used for keeping and accessing the database.
DBMS hardware consists of secondary storage
devices like hard disks.
• Software: It is the actual DBMS. Between the
physical database itself and the users of
system is a layer of software, called DBMS.
• Data: Data acts as the bridge between the
machine components and user components.
Components of Database System
• Users: There are number of users who can
access or retrieve data on demand using the
applications and the interfaces provided by
DBMS. The users can be:
– Naïve users
– Online users
– Application Programmers
– Sophisticated Users
– Data base Administrator ( DBA)
Components of Database System
• Procedures: It refers to the instructions and
rules that govern the design and the use of
the database. The users of the system and the
staff that manage the database requires
documented procedures on how to use or run
the system.
Data models, Schemas, and Instances
• Data model:-A set of concepts to describe the
structure of a database, and certain
constraints that the database should obey.
• Schema:- The overall description of the
database is called the Database Schema.
– A schema is defined as an outline or a plan that
describes the records and relationships existing at
the particular level.
• Instance:- Data in the database at a particular
moment in time.
16
Instances and Schemas
 Databases change over time as information is inserted and deleted. The collection
of information stored in the database at a particular moment is called an instance of
the database.
 The overall design of the database is called the database schema. Schemas are
changed infrequently, if at all.

Example of Database Instances Example of Schema


Name Enrolment No. Dept. struct Student{
string name;
long int enroll;
Rahul 11904252 CSE
string dept;
Shivam 11805147 ECE };
Types of Schemas

1. Physical Schema

This schema pertains to the actual storage of data and its form of storage like files,
indices, etc. It defines how the data will be stored in a secondary storage.

2. Logical Schema
This schema defines all the logical constraints that need to be applied on the data
stored. It defines tables, views, and integrity constraints
3. External Schema
Design of database at view level is called view schema or External Schema. This
generally describes end user interaction with database systems.
SQL stands for....

A. Structured Query Language

B. Sequential Query Language

C. Structured Question Language

D. Sequential Question Language


Identify the correct option, which describes file systems?

a) Role-based data accessibility is possible


b) It is a set of system programs handle by application
programmers
c) It can leads to data anomalies
d) Files are well synchronised and very less chance of
data redundancy
Database Architecture
Two-tier and three-tier architecture
Three-tier architecture
• External or View level: It is the users’ view of the
database. This level describes that part of the database
that is relevant to each user.
– For example, one user may view dates in the form (day,
month, year), while another may view dates as (year,
month, day).
• Conceptual or logical level: It is the community view of
the database. This level describes what data is stored
in the database and the relationships among the data.
• It represents:
– All entities, their attributes, and their relationships;
– The constraints on the data;
– Security and integrity information.
• Internal or storage level: It is the physical
representation of the database on the computer. This
level describes how the data is stored in the database.
Data Independence-Achievement
of Layered Architecture of DBMS

• Two kinds of data independence:


– Logical data independence
– Physical data independence
Data Independence
• Logical Data Independence: The capacity to
change the conceptual schema without having
to change the external schemas and their
application programs.
• Physical Data Independence: The capacity to
change the internal schema without having to
change the conceptual schema.
Data Independence
• The processes of transforming requests and results
between the levels are called mappings.
• 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.
Data abstraction
• A major purpose of database system is to
provide user with an abstract view of data.
That is, system hides certain details of how
the data are stored and maintained.
Levels of Abstraction(view of
data)
• Physical level: describes how a record (e.g.,
customer) is stored.
• Logical level: describes what data stored in
database, and the relationships among the data.
DBA, who decides what information to keep in
the database, use the logical level of abstraction.
• View level: describe only part of database.
application programs hide details of data types.
Complexity remain due to variety of information
stored. Views can also hide information (such as
an employee’s salary) for security purposes.
View of Data

An architecture for a database system


Level of Data Abstraction – Bank Application
struct Cust_Record{  At the physical level, a customer,
int cust_id; account, or employee record can be
string name; described as a block of consecutive
string state; storage locations (for example, words or
string city; bytes).
const double min_balance;
};  At the logical level, each such record is
struct accounts{ described by a type definition, as in the
long long int acco_no; previous code segment, and the
long double balance; interrelationship of these record types is
}; defined as well.

struct employee{  Finally, at the view level, computer


int id; users see a set of application programs
string name; that hide details of the data types.
long int phone; Similarly, at the view level, several
string city; views of the database are defined, and
}; database users see these views.
Which of the following isn’t a level of
abstraction?
a) physical
b) logical
c) user
d) view
A level that describes how a record is
stored.

a) physical
b) logical
c) user
d) view
Database Languages
Database languages are used to create and
maintain database on computer.
•Data Definition Language(DDL): It is a language that allows user to define
data and their relationship to other types of data.
• CREATE
• ALTER
• DROP
• TRUNCATE
• RENAME
•DDL compiler generates a set of table templates stored in a data dictionary
•Data dictionary contains metadata (i.e., data about data) Database schema
•Integrity constraints
• Primary key (ID uniquely identifies instructors)
• Referential integrity (references constraint in SQL)
•– e.g. dept_name value in any instructor tuple must appear in department relation
Database Languages
Database languages are used to create and
maintain database on computer.
•Data Manipulation Language(DML):It provides a
set of operations to support the basic data
manipulation operations on the data held in
databases. It allows user to insert, update, delete
and retrieve data from the database.
– DELETE
– INSERT
– SELECT
– UPDATE
Database Languages
• Data Control Language(DCL): DCL statements control
access to data and the database
– GRANT
– REVOKE
– COMMENT
• Transaction Control Language(TCL): TCL statements
manage the change made by DML statements, and
group DML statements into transactions
– COMMIT
– ROLLBACK
– SAVEPOINT
– SET TRANSACTION
Quiz
• The detailed description on entity constraints,
entity relationships and entity types is
expressed in
A.Physical Level
B.Logical level
C.View level

You might also like