Professional Documents
Culture Documents
Unit 1
Unit 1
UNIT I
Concept Outline:
• Data is the known fact that can be recorded and that have implicit meaning.
• A collection of data designed to be used by different people is called database.
• The collection of information stored in database at a particular time is known as instance.
Database Management System:
DBMS is a combination of hardware and software that can be used to set up and monitor
a database, and can manage the updation and retrieval of database that has been stored in it. The
database management system is the major software component of a database system. Some
commercially available DBMS are Ingress, ORACLE and Sybase.
Capabilities of database management system:
i) Creating a file, addition to data, deletion of data, modification of data, creation, addition and
d3eletion of entire files.
ii) Retrieving data collectively or selectively.
iii) The data stored can be sorted or indexed at the user’s discretion and direction.
iv) To maintain data integrity and database use.
v) Mathematical function can be performed and the data stored in the database can be
manipulated with these functions to perform the desire calculations.
Characteristics of database:
1. Self- describing nature of a database system
The information stored in the catalog is called meta-data. A DBMS should be of self
describing nature as it not only contains the database itself but also the metadata. A metadata
defines and describes not only the extent, type structure, and format of all data but also
relationship between data.
2. Sharing of data and multiuser transaction processing
A multiuser DBMS, as its name implies, must allow multiple users to access the database
at the same time. This is essential if data for multiple application is to be integrated and
maintained in a single database.
3. Support of multiple views of the data
A database typically has many types of users, each of whom may require a different
perspective or view of the database. Some users may not need to be aware of whether the data
they refer to is stored or derived.
4. Backup and Recovery
There are many chances of failure of the whole database. At that time no one will be able
to get the database back and for sure company will be in a big loss. The only solution is to take
backup of database and whenever it is needed, it can be stored back. A database must have this
characteristic to enable more effectiveness.
5. Data Integrity
This is one of the most important characteristics of database management system. Integrity
ensures the quality and reliability of database system. It protects unauthorized access to the
database and makes it more secure. It brings only consistent and accurate data into the database.
6. Stores Any Kind of Data
A database management system should be able to store any kind of data. It should not be
restricted to employee name, salary, and address. Any kind of data that exists in the real world
can be stored in DBMS because we need to work with all kinds of data that is present around us.
Application of DBMS:
There are different fields where a database management system is utilized. Following are a few
applications which utilize the information base administration framework –
1. Railway Reservation System –
In the rail route reservation framework, the information base is needed to store the record or
information of ticket appointments, status about train’s appearance. Additionally, if trains get
late, individuals become acquainted with it through the information base update.
2. Library Management System –
There are loads of books in the library so; it is difficult to store the record of the relative
multitude of books in a register or duplicate. Along these lines, the data set administration
framework (DBMS) is utilized to keep up all the data identified with the name of the book,
issue date, accessibility of the book, and its writer.
3. Banking –
Database the executive’s framework is utilized to store the exchange data of the client in the
information base.
4. Education Sector –
Presently, assessments are led online by numerous schools and colleges. They deal with all
assessment information through the data set administration framework (DBMS). In spite of
that understudy’s enlistments subtleties, grades, courses, expense, participation, results, and
so forth all the data is put away in the information base.
5. Social Media Sites –
We all utilization of online media sites to associate with companions and to impart our
perspectives to the world. Every day, many people group pursue these online media accounts
like Facebook, Twitter, and Google in addition to. By the utilization of the data set
administration framework, all the data of clients are put away in the information base and,
we become ready to interface with others.
6. Online Shopping –
These days, web-based shopping has become a major pattern. Nobody needs to visit the shop
and burn through their time. Everybody needs to shop through web based shopping sites, (for
example, Amazon, Flipkart, Snapdeal) from home. So all the items are sold and added
uniquely with the assistance of the information base administration framework (DBMS).
Receipt charges, installments, buy data these are finished with the assistance of DBMS.
7. Human Resource Management –
Big firms or organizations have numerous specialists or representatives working under them.
They store data about worker’s compensation, assessment, and work with the assistance of
an information base administration framework (DBMS).
2. Conceptual Schema
This is the second 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). What is stored.
3. Internal level
This is the lowest level. This level is also known as physical level. This level describes
how and where 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 means that, when the logical structure of database changes,
application programs are only minimally affected and require very little modification. Data
independence programs need not be repeatedly revised, redesigned or rewritten as the database
involves to accommodate new requirement.
There are two levels of data independence: logical data independence and physical data
independence
1. Logical data independence
Logical data independence indicates that the conceptual schema can be changed without
affecting the existing external schema. The change would be absorbed by the mapping between
the external and conceptual level.
2. Physical data independence:
Physical data independence indicates that the physical storage structures or derived used
for storing could be changed without necessitating a change in the conceptual view of the
external views. The change would be absorbed by the mapping between the conceptual level and
internal levels.
Database states, instance and schema:
The data in the database at a particular moment in time is called a database state. The collection
of data/information stored in the database at a particular time is called an instance. The complete
design of the database is called the database schema schema. Design of a database is called the
schema. Schema is of three types: Physical schema, logical schema and view schema.
For example: In the following diagram, we have a schema that shows the relationship
between three tables: Course, Student and Section. The diagram only shows the design of the
database, it doesn’t show the data present in those tables. Schema is only a structural
view(design) of a database.
Definition of instance: The data stored in database at a particular moment of time is called
instance of database. Database schema defines the variable declarations in tables that belong to a
particular database; the value of these variables at a moment of time is called the instance of that
database.
For example, lets say we have a single table student in the database, today the table has
100 records, so today the instance of the database has 100 records. Lets say we are going to add
another 100 records in this table by tomorrow so the instance of database tomorrow will have
200 records in table. In short, at a particular moment the data stored in database is called the
instance, that changes over time when we add or delete data from the database.
DBMS Schema.
STUDENT
Name Student_number Class Major
COURSE
Course_name Course_number Credit_hours Department
SECTION
Course_number Semester Year Instructor
A database state provides the present state of the database and its data. The data in the database
at a particular moment of time is called database state. It can be considered as an extension of
the database schema. When a database is newly defined, the corresponding database state is
empty. Factors that affect a database state are entering, deleting or modifying information in the
database.
Database Users:
Database users are the ones who really use and take the benefits of the database. There will be
different types of users depending on their needs and way of accessing the database.
1. Database Administrator (DBA) :
Database Administrator (DBA) is a person/team who defines the schema and also controls the
3 levels of database.
The DBA will then create a new account id and password for the user if he/she need to access
the data base.
DBA is also responsible for providing security to the data base and he allows only the
authorized users to access/modify the data base.
2. Naive / Parametric End Users :
Parametric End Users are the unsophisticated who don’t have any DBMS knowledge but they
frequently use the data base applications in their daily life to get the desired results.
For examples, Railway’s ticket booking users are naive users. 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.
3. System Analyst :
System Analyst is a user who analyzes the requirements of parametric end users. They check
whether all the requirements of end users are satisfied.
4. Sophisticated Users :
Sophisticated users can be engineers, scientists, business analyst, who are familiar with the
database. They can develop their own data base applications according to their requirement.
They don’t write the program code but they interact the data base by writing SQL queries
directly through the query processor.
5. Database Designers :
Data Base Designers are the users who design the structure of data base which includes tables,
indexes, views, constraints, triggers, stored procedures. He/she controls what data must be
stored and how the data items to be related.
6. Application Program :
Application Program are the back end programmers who writes the code for the application
programs.They are the computer professionals. These programs could be written in
Programming languages such as Visual Basic, Developer, C, FORTRAN, COBOL etc.
7. Casual Users / Temporary Users :
Casual Users are the users who occasionally use/access the data base but each time when they
access the data base they require the new information, for example, Middle or higher level
manager.
Database Administrator (DBA) :
Database administrator is a person who creates updates and maintains the database. It is more
of a wide role as a data administrator might be someone who is hired to create, maintain, and
backup the database, optimize the database for high performance, or someone who helps in
integrating databases into applications. The major skills required to be an excellent database
administrator are troubleshooting, logical thought process, and a strong will to learn as it
involves a vast area. This role is also known as Database Coordinator or Database
Programmer.
Responsibilities:
• Create and design a database
• Analyze and monitor database requirements
• Ensures data security
2. Data administrator converts data into a Database administrator inputs data into the
convenient data model. database.
8. Main tasks include data planning, Main tasks include database design,
definition, architecture and management construction, security, backup and recovery,
etc. performance tuning etc.
9. It set policies and standards, coordinates It enforces policies and procedures, choose
and manages database design. and maintains technology.
11. It performs the high level function. It performs the technical function.
DBMS languages:
Database languages are used to read, update and store data in a database. There are several such
languages that can be used for this purpose; one of them is SQL (Structured Query Language). A
DBMS has appropriate languages and interfaces to express database queries and updates.
Types of DBMS languages:
DDL is used for specifying the database schema. It is used for creating tables, schema, indexes,
constraints etc. in database. Lets see the operations that we can perform on database using DDL:
All of these commands either defines or update the database schema that’s why they come under
Data Definition language.
DML is used for accessing and manipulating data in a database. The following operations on
database comes under DML:
DCL is used for granting and revoking user access on a database. The DCL execution is
transactional. It also has rollback parameters.
TCL is used to run the changes made by the DML statement. TCL can be grouped into a logical
transaction.