DBMS Unit 1
DBMS Unit 1
INTRODUCTION
Data
raw facts and figures
Data Processing
performing operations on the input data to generate output.
Data are logically organized into:
1. Bits (characters)
2. Fields
3. Records
4. Files
5. Databases
What is Database?
In the early days, database applications were built directly on top of file
systems
Purpose of Database Systems
• Drawbacks of using file systems to store data:
• Data redundancy (repetition of information)
• Data Inconsistency (Multiple copies of same data not updated)
• Difficulty in accessing data
• We should know the physical details of the file before accessing (like
Location, Name, Permissions, File Format, etc.)
• Data isolation — multiple files and schema
• Integrity problems are there in traditional file system.
• Searching is difficult – No Index to the records.
Purpose of Database Systems (Cont.)
• Drawbacks of using file systems (cont.)
• 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
Components of DBMS
• The DBMS software is partitioned into several modules. Each module or
component is assigned a specific operation to perform.
• Some of the functions of the DBMS are supported by operating systems (OS) to
provide basic services.
• The physical data and system catalog are stored on a physical disk. Access to the
disk is controlled primarily by OS.
• The major software modules or components of DBMS are as follows:
• Query processor
• Run time database manager
• Data Manager
Query Processor
• It is used to interpret the online user query and converts into a form capable of
being send to the data manager for execution.
• The query processor use the data dictionary to find the structure of a database.
• It is a program module that provides the interface between the database and the
application programs/queries.
• The Query Processor Components include –
• Data Definition Language(DDL) Compiler(Create, Alter[Add, Drop, Modify], Drop, Describe)
• Data Manipulation Language (DML) compiler(Insert, Update, Select)
• Query evaluation engine
Data dictionary
• A data dictionary is a reserved space within a database which is used to store
information about the database itself.
• A data dictionary is a set of table and views which can only be read and never
altered.
• The data dictionary also defines how much space has been allocated for and / or
currently in used by all the schema objects.
• A data dictionary is used when finding information about users, objects, schema
and storage structures.
• Every time a data definition language (DDL) statement is issued, the data
dictionary becomes modified.
Data Dictionary
• A data dictionary may contain information such as:
• It provides recovery to the system which that system should be able to recover
the data after some failure.
• The buffer manager is responsible for the transfer of data between the
main memory and secondary storage (such as disk or tape). It is also referred as
the cache manger.
Different Types of Database Users in DBMS
• Application Programmers
Application programmers are the one who writes application programs that uses the database. These application programs
are written in programming languages like COBOL or PL (Programming Language 1), Java and fourth generation
language. These programs meet the user requirement and made according to user requirements. Retrieving information,
creating new information and changing existing information is done by these application programs.
They interact with DBMS through DML (Data manipulation language) calls. And all these functions are performed by
generating a request to the DBMS.
DBA (Database Administrator)
DBA can be a single person or it can be a group of person. Database Administrator is responsible for everything that is
related to database. He makes the policies, strategies and provides technical supports.
System Analyst
System analyst is responsible for the design, structure and properties of database. All the requirements of the end users are
handled
INSTANCE & SCHEMA
• 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.
• Database systems have several schemas, partitioned according to the
levels of abstraction.
• The physical schema describes the database design at the physical
level, while the logical schema describes the database design at the
logical level.
Architecture
of
Database Management System
• General architecture for database systems was produced in 1971 by the
DBTG (Data Base Task Group) appointed by the Conference on Data
Systems and Languages.
• The DBTG recognized the need for a two level approach with a system
view called the schema and user views called subschema.
• ANSI SPARC produced a similar terminology mid architecture in 1975 (3
level architecture)
There are following three levels or layers of DBMS architecture:
• External Level or view level
•Conceptual Level or logical level
• Internal Level
THREE LEVEL DATABASE ARCHITECTURE
• Data are actually stored as bits, or numbers and strings, but
it is difficult to work with data at this level.