1 Introduction
1 Introduction
• Data means know facts that can be recorded and that have implicit meaning
• In simple word Data is information
• In software system we manage data
• Manage data means storing ,processing and extracting data
Files
• When data is stored in the secondary memory it is bound to reside in a le
• File is an operating system concept ,which makes separation among bundles of heterogeneous
data (song, photo etc)stored in the storage
What is Database
• A software application most of the times required to store relevant information in the secondary
storage(in the form of les)
• A database is a place where all your application related data is stored.
• One application data can be stored in a bunch of les
• We can say, database is a collection of les.
DBMS is Database
Management System
• It is a collection of programs that enabes users to create & maintain a database
• DBMS is a general purpose(not related to the application directly, application may be library
management, railway management) s/w system
1

fi
fi
fi
fi
• DBMS facilitates the process of de ning(as a programmer/user we can use DBMS to de ne the
structrue where we can store our data, we can also mention datatype.)
• Constructing(we store data in the database )
• Manipulating (update database)
• & sharing databases( among various users and applications )
Example:
• in case of le processing system there are suppose some programming has been made
• to nd out the maximum marks in mathematics:
• But if the respective user want to nd out maximum marks in physics
• in that case i shall have to do manually or shall have to rewrite the program
• In case of DBMS we can easily execute SQL query
2

ff
ff
fi
ffi
fi
fi
ffi
ff
fi
ffi
fi
fi
fi
fi
fl
ffi
fi
fi
fi
fi
fi
fi
ff
fi
fi
- Isolation:
• Data are scattered in various les, les may be in di erent format
• Writing new application program to retrieve the appropriate data is di cult.
Example:
• Sex of a person in one data le written as male/female of the type text/string or varchar But in
other data le M/F of the type char
• So,whenever we are trying to fetch value of sex then I shall have to notice that from which data le
I am reading sex ,accordingly the data type will be decided. This sort of data isolation problem are
there.
• But in the case of DBMS,we shall de ne the sex in rst table,and in other table where we require
the eld sex we can go for attribute inheritance.So there will be no mismatch of the format of sex.
- Atomicity:
• DBMS makes sure either the transaction is fully complete or it is rolled back to the previous
committed state.
• It does not allow the system to be in a partially committed state.
Example:
- Security problem
• Di erent access privileges has to be provided for di erent users.This is di cult while
• dealing with at les
• In DBMS this problem is resolved by providing di erent views of the database
3

ff
fi
fi
fl
fi
fi
fi
fi
fi
ff
ff
fi
ff
ffi
ffi
fi
-Instances
and schemas
Instances:
• Database change over time as imformation is inserted & deleted.
• The collection of information stored in the database at a particular moment is called an instances
of the database.
Schema:
• The overall design of the database is called the database schema
Data models
1.Relational Data Model
2.Entity Relationship Model
3.Object Based Data Model
4.Semi structured Data Model
Data models
Database model is a logical frame in which data is stored
The model also describes the relationships between di erent parts of the data
- Relational model:
• In this model data is organised in two dimensional tables called relations
• It was a collection of table to represent both data and the relationships among those data.
• If one attribute is common for both the table,through this attribute,these two tables are
• related.
Tables are known as relations
- The
Entity-
Relationship model:
• Entity: A set of objects that are distinguishable from others
4

ff
• Relationship:among entities are expressed using E-Rdagram
• Components:
1. Rectangle:Which represent entity sets
2. Ellipse or ovals: attributes of the entity
3. Diamonds: relationship among entity sets
4. Lines: Which link attributes to entity sets & entity sets to relationship
Database languages
5

fi
fi
fi
DDL(Data De nation Language): DDL is used for specifying database schema
• To create database instance-CREATE
• To alter structure of database-ALTER
• To drop database instance-DROP
• To delete tables in a data-TRUNCATE
• To rename database instance-RENAME
Database Administrator(DBA)-
Schema De nition : The DBA creates the original database schema by executing a
set of data de nition statements in the DDL
Storage structure & data access method :What will be the storage structure
format, what will be the amount of storage required that will be handled/determined by DBA
Schema & Physical organization modi cation: The DBA carries out
changes to the schema & physical organization to re ect the changing needs of the
organization, or to alter the physical organization to improve performance
Granting of authorization for data access:By granting di erent types of
organization, the database administrator can regulate which part of the database various
user can access.
Routine maintainence:
• What will be the frequency/schedule for taking backup?
• Ensure whether the enough free storage is available for proper and successful operation
• Whether the system performance is getting degraded or not
• The system performance should be adequate so that the higher priority transaction will have
• successful compilation at earliest. etc are checked by DBA.
Database Users
Naive user:
6

fi
fi
fi
fi
fl
ff
• Are unsophisticated users
• Who interact with the system by invoking one of the applicationprograms that have been written
previously
• Clerks in any bank is a naive user because they don’t have any DBMS knowledge but they still
use the database and perform their given task.
Application programmers:
• Are computer professionals,who writes application programs
• Application programmers can choose from many tools to develop user interfaces
• They are the developers who interact with the database by means of DML queries.
Sophisticated user:
• They can develop their own data base applications according to their requirement.
• Sophisticated users can be engineers, scientists, business analyst, who are familiar with the
database.
Specialized users:
• Are sophisticated users who write specialized database applications
• This applications do not t into traditional data processing frame work
• Example:The users of CAD/CAM oriented appications, they are interacting with the database for a
certain speci c purpose only related to CAD/CAM .So they can be categorized as specialized user.
1. External level
• It is also called view level.
• The reason this level is called “view” is because
several users can view their desired data from this
level
• The user doesn’t need to know the database
schema details such as data structure, table
de nition etc.
• User is only concerned about data which is what returned back to the view level after it has been
fetched from database (present at the internal level).
• External level is the “top level” of the Three Level DBMS Architecture.
2. Conceptual level
• It is also called logical level.
• The whole design of the database such as relationship among data, schema of data etc. are
described in this level.
• Database constraints and security are also implemented in this level of architecture.
• This level is maintained by DBA (database administrator)
7

fi
fi
fi
3. Internal level
• This level is also known as physical level.
• This level describes how the data is actually stored in the storage devices.
• This level is also responsible for allocating space to the data.
• This is the lowest level of the architecture.
Data Independence
Data independence can be explained using the three-
schema architecture.
Data independence refers characteristic of being able to
modify the schema at
one level of the database system without altering the
schema at the next higher level.
Data Dictionaries
• A data dictionary is a le or a set of les that includes a database's metadata.
• The data dictionary hold records about other objects in the database, such as data ownership,
data relationships to other objects, and other data.
• The data dictionary is an essential component of any relational database.
• Because of its importance, it is invisible to most database users. Typically, only database
administrators interact with the data dictionary.
Why Data dictionary is essential ?
• There are less information and details provided by data models. So, a data dictionary is very
essential and needed to have proper knowledge and usage of contents.
• Data Dictionary provides all information about names that are used in system models.
• Data Dictionary also provides information about entities, relationships, and attributes that are
present in system model.
• As a part of structured analysis and design tool, implementation of a data dictionary is done
8

ff
fi
fi
ff
fi
9