Notices
Notice: Exam Form BE IV/II & BAR V/II (Back) for 2076 Magh
Routine: BE IV/II & BAR V/II - 2076 Magh
Result: BCE I/II exam held on 2076 Bhadra
Result: All (except BCE & BEI) I/II exam held on 2076 Bhadra
Notice: Exam Center for Barrier Exam (2076 Poush), 1st Part
View All
View Old Questions
Computer Engineering(BCT)
Electrical Engineering(BEL)
Electronics and Communication(BEX)
View All
View Syllabus
Computer Engineering(BCT)
Electrical Engineering(BEL)
Electronics and Communication(BEX)
View All

Notes of Database Management System [CT 652]

Introduction to DBMS

 

Concept and Application of DBMS

File Processing System

The information on a system can be stored in permanent files. The system uses a no. of application programs, each of them is designed for data manipulation. As the system needs arises, new applications are added to the system. Such system is known as file processing system.
For example, consider a traditional library management system that uses file system to store data. The system consists of application programs to allow users to manipulate data. Such programs may be used to issue book ,add student records ,return book , fine calculations and so on.


Disadvantages of file processing system

1. Data redundancy
File system can lead to data redumdancy , a situation which the data are to be updated in several files. It results in storage of same information in several files consuming high storage ,space and cost. Also the information may not be updated in all files causing inconsistency

2. Identity problems
Each data stored must satisfy certain consistency and constraints which are coded in application programs. In order to satisfy new constraints it is difficult to make changes in the program ,instead new program must be added. This unassured the maintenance task.

3. Concurrency Access
Concurrency means ability to allow multiple users access to same record without affecting the transaction processing. In file system, when an application open a file, that file is locked and no one else can access that file at the same time.

4. Atomicity problems
Atomicity means ability to recover exact state in case of system failure. In file system. The system can not ensure the operation is completed or it is not in action resulting in the unambiguous state in case of system failure.


Database Approach

A database is a shared collection of related data or information. It can be viewed as a data repository that is defined once and accessed by various users.

A database has following properties:-
- IT is representation of some aspect of real world data.
- It is logical, coherent and internally consistent.
- It is designed , built and populated with data for specific purpose.
- Each data item is stored in a field.
- The combination of fields form a table.
- Database management system is a collection of programs that enables users to control all access to databases that makes data storage and retrieval efficient.


File system vs DBMS

- A database is self describing as it is also contains metadata that defines the data and relationship between tables.
- In file based system, data definition is embedded with application programs.
- In file system, structure of data files is defined in the programs. So if changes to file structure is needed, the program should also be changed.
- In DBMS , data structure is stored in system catalogue independent of programs.
- Multiple users can access the same database at the same time maintaining data integrity.
- Database controls redundancy as each data is stored in only one place in database.
- Data sharing among individuals having access for is allowed with a database.
- Database allows restriction of unauthorized access, A user can have access limited by system.
- DBMS allows data independence by separating metadata from application programs.


Data Abstraction and Data Independence

Data abstraction

Database system is a complex bulk of data structures, within a system,there may be many irrelevant details for the users. The process of hiding such irrelevant details from users is known as data abstraction.


Data abstraction levels

1. Physical Level
The physical level is the lowest data abstraction level, It describes the actual method of data storage in database revealing complex data structure details.

2. Logical Level
Logical Level provides higher data abstraction than physical level . It describes the type of data stored in database.

3. View Level
The view level is the highest level of data abstraction. It describes the user interaction with database
system.

3-levels-of-abstraction


A case study : data abstraction levels

- Let us consider that we are storing custom information in customer table.
- At physical level,these records are described as block of memory space.
- At logical level,these records are described as fields and attributes along with the logical relationship
- At view levels, the user just interact with the help of GUI and enter details at the screen


Data Independence

A database system contains a lot of data along with user’s data. A set of metadata needs to change over time to satisfy user’s needs. So, metadata follows a layered architecture so that change of data in one later does not affect data of another level. Such property of data is known as data independence.


Types of data independence

1. Logical Data Independence
Logical data represents the data about database such as how data is managed, relationship between tables and so on, logical data independence is the ability to change logical schema without changing external schema or user views. It implies that the function of application should not be affected on changing logical schema.
For e.g. if we change some table format, it should not change the data residing on the disk.

2. Physical data independence
Physical data independence is the ability to change the physical data or model without affecting logical data. It deals with hiding the details of storage structure from use applications.
For e.g.: if we want to upgrade the storage system to replace hard disks with SSD, it should not affect the logical schema.


Schema and Instance

Schema:

A schema is the skeleton structure of database representing its logical views. It defines the entities and relationships among them along with formulation of all the constraints.


Instance

A database instance is a state of operational database of any given time with data within it. It is the state in which user has input any operations.


Concept of DDL, DML and DCL

Data definition language

- DDL deals with database schemas and descriptions of how data should reside in the database.
- E.g. CREATE; - TO create database and its objects
ALTER: - to alter the structure of existing database
DROP: - to delete objects from database


Data manipulation language (DML)

- DML deals with data manipulation process such as to share, modify, retrieve, delete and update data in database
- E.g. select: - retrieve data from database
Insert: - insert data into table
Delete -> delete all records from database table


Data control language

- DCL deals with rights, permissions and other controls of the database system.
- E.g. GRANT: _ all user access privileges to database
REVOKE: - withdraw user’s access privileges.

Sponsored Ads