Module No 1 .Introduction to Database Concepts(4 hrs)
1)What is Database? Explain Characteristics of Database?(5M)
1)Data-A Data is collection of facts and figures.It can be any character ,including text
and numbers,pictures,sound,video etc.
2) Database is a collection of related data and data is a collection of facts and
figures that can be processed to produce information.
3) Mostly data represents recordable facts. Data aids in producing information, which
is based on facts. For example, if we have data about marks obtained by all students,
we can then conclude about toppers and average marks.
4) A database management system stores data in such a way that it becomes
easier to retrieve, manipulate, and produce information.
5)DBMS provides a interface to perform various operations like database
creation,storing data in it,updating data ,,creating a table etc
6)Database system is combination of Database and DBMS
7)Example -SQL SERVER,ORACLE,MYSQL,DB2 etc
Charecteristics of DBMS(RRMMSIRACQ)
• Real-world entity − A modern DBMS is more realistic and uses real-world
entities to design its architecture. It uses the behavior and attributes too. For
example, a school database may use students as an entity and their age as
an attribute.
• Relation-based tables − DBMS allows entities and relations among them to
form tables. A user can understand the architecture of a database just by
looking at the table names.
• Isolation of data and application − A database system is entirely different
than its data. A database is an active entity, whereas data is said to be passive,
on which the database works and organizes. DBMS also stores metadata,
which is data about data, to ease its own process.
• Less redundancy − DBMS follows the rules of normalization, which splits a
relation when any of its attributes is having redundancy in values.
Normalization is a mathematically rich and scientific process that reduces data
redundancy.
• Consistency − Consistency is a state where every relation in a database
remains consistent. There exist methods and techniques, which can detect
attempt of leaving database in inconsistent state. A DBMS can provide greater
consistency as compared to earlier forms of data storing applications like file-
processing systems.
• Query Language − DBMS is equipped with query language, which makes it
more efficient to retrieve and manipulate data. A user can apply as many and
as different filtering options as required to retrieve a set of data. Traditionally it
was not possible where file-processing system was used.
• ACID Properties − DBMS follows the concepts
of Atomicity, Consistency, Isolation, and Durability (normally shortened as
ACID). These concepts are applied on transactions, which manipulate data in
a database. ACID properties help the database stay healthy in multi-
transactional environments and in case of failure.
• Multiuser and Concurrent Access − DBMS supports multi-user environment
and allows them to access and manipulate data in parallel. Though there are
restrictions on transactions when users attempt to handle the same data item,
but users are always unaware of them.
• Multiple views − DBMS offers multiple views for different users. A user who is
in the Sales department will have a different view of database than a person
working in the Production department. This feature enables the users to have
a concentrate view of the database according to their requirements.
• Security − Features like multiple views offer security to some extent where
users are unable to access data of other users and departments. DBMS offers
methods to impose constraints while entering data into the database and
retrieving the same at a later stage. DBMS offers many different levels of
security features, which enables multiple users to have different views with
different features. For example, a user in the Sales department cannot see the
data that belongs to the Purchase department. Additionally, it can also be
managed how much data of the Sales department should be displayed to the
user. Since a DBMS is not saved on the disk as traditional file systems, it is
very hard for miscreants to break the code.
2) Diffrentiate between file system and database system with an example (5-
10M)
1. File System :
File system is basically a way of arranging the files in a storage medium like hard
disk. File system organizes the files and helps in retrieval of files when they are
required. File systems consists of different files which are grouped into directories.
The directories further contain other folders and files. File system performs basic
operations like management, file naming, giving access rules etc.
Example:
NTFS(New Technology File System), EXT(Extended File System).
2. DBMS(Database Management System) :
Database Management System is basically a software that manages the collection of
related data. It is used for storing data and retrieving the data effectively when it is
needed. It also provides proper security measures for protecting the data from
unauthorized access. In Database Management System the data can be fetched by
SQL queries and relational algebra. It also provides mechanisms for data recovery
and data backup.
S.NO. FILE SYSTEM DBMS
File system is a software that
manages and organizes the files in
a storage medium within a DBMS is a software for
1. computer. managing the database.
Redundant data can be present in In DBMS there is no
2. a file system. redundant data.
It doesn’t provide backup and It provides backup and
3. recovery of data if it is lost. recovery of data even if it is
lost.
There is no efficient query Efficient query processing is
4. processing in file system. there in DBMS.
There is less data consistency in There is more data
5. file system. consistency because of the
process of normalization.
It has more complexity in
It is less complex as compared to handling as compared to file
6. DBMS. system.
DBMS has more security
File systems provide less security mechanisms as compared to
7. in comparison to DBMS. file system.
S.NO. FILE SYSTEM DBMS
8. It is less expensive than DBMS. It has a comparatively higher
cost than a file system.
3) What is DBMS? Explain types of Users in Database system (5M)
1) A database management system stores data in such a way that it becomes
easier to retrieve, manipulate, and produce information.
2) DBMS provides a interface to perform various operations like database
creation,storing data in it,updating data ,,creating a table etc
Users
A typical DBMS has users with different rights and permissions who use it for
different purposes. Some users retrieve data and some back it up. The users of a
DBMS can be broadly categorized as follows –
• Administrators − Administrators maintain the DBMS and are responsible for
administrating the database. They are responsible to look after its usage and
by whom it should be used. They create access profiles for users and apply
limitations to maintain isolation and force security. Administrators also look
after DBMS resources like system license, required tools, and other software
and hardware related maintenance.
• Designers − Designers are the group of people who actually work on the
designing part of the database. They keep a close watch on what data should
be kept and in what format. They identify and design the whole set of entities,
relations, constraints, and views.
• End Users − End users are those who actually reap the benefits of having a
DBMS. End users can range from simple viewers who pay attention to the logs
or market rates to sophisticated users such as business analysts.
4) What are advantages and disadvantage of database system (5M)
Advantage of DBMS over file system(CRPFSR)
There are several advantages of Database management system over file
system. Few of them are as follows:
1) No redundant data: Redundancy removed by data normalization. No data
duplication saves storage and improves access time.
2) Data Consistency and Integrity: As we discussed earlier the root cause
of data inconsistency is data redundancy, since data normalization takes
care of the data redundancy, data inconsistency also been taken care of
as part of it
3) Data Security: It is easier to apply access constraints in database
systems so that only authorized user is able to access the data. Each user
has a different set of access thus data is secured from the issues such as
identity theft, data leaks and misuse of data.
4) Privacy: Limited access means privacy of data.
Easy access to data – Database systems manages data in such a way so that
the data is easily accessible with fast response times.
5) Easy recovery: Since database systems keeps the backup of data, it is
easier to do a full recovery of data in case of a failure.
6) Flexible: Database systems are more flexible than file processing
systems.
Disadvantages of DBMS:(CCP)
1)Cost -DBMS implementation cost is high compared to the file system
2) Complexity: Database systems are complex to understand
3) Performance: Database systems are generic, making them suitable for
various applications. However this feature affect their performance for some
applications
5.Write a short note on Data Independence (10M)
1) Data Independence is defined as a property of DBMS that helps you to change
the Database schema at one level of a database system without requiring to
change the schema at the next higher level. Data independence helps you to
keep data separated from all programs that make use of it.
2) Types of Data Independence
In DBMS there are two types of data independence
1) Physical data independence
2) Logical data independence.
Consider an Example of a University Database. At the different levels this is how the
implementation will look like:
Type of Schema Implementation
External Schema View 1: Course info(cid:int,cname:string)
View 2: studeninfo(id:int. name:string)
Conceptual Shema Students(id: int, name: string, login: string, age: integer)
Physical Schema Courses(id: int, cname.string, credits:integer)
Enrolled(id: int, grade:string)
• Relations stored as unordered files.
• Index on the first column of Students.
Physical Data Independence
1) Physical data independence helps you to separate conceptual levels from the
internal/physical levels. It allows you to provide a logical description of the database
without the need to specify physical structures. Compared to Logical Independence,
it is easy to achieve physical data independence.
2) With Physical independence, you can easily change the physical storage
structures or devices with an effect on the conceptual schema. Any change done
would be absorbed by the mapping between the conceptual and internal levels.
Examples of changes under Physical Data Independence
Due to Physical independence, any of the below change will not affect the
conceptual layer.
1) Using a new storage device like Hard Drive or Magnetic Tapes
2) Modifying the file organization technique in the Database
3) Switching to different data structures.
4)Changing the access method.
5) Change of Location of Database from say C drive to D Drive
Logical Data Independence
1) Logical Data Independence is the ability to change the conceptual scheme without
changing
1) External views
2) External API or programs
Any change made will be absorbed by the mapping between external and
conceptual levels.
2) When compared to Physical Data independence, it is challenging to achieve
logical data independence.
Examples of changes under Logical Data Independence
Due to Logical independence, any of the below change will not affect the external
layer.
1) Add/Modify/Delete a new attribute, entity or relationship is possible without a
rewrite of existing application programs
2) Merging two records into one
3) Breaking an existing record into two or more records
Importance of Data Independence
1) Helps you to improve the quality of the data
2) Database system maintenance becomes affordable
3) Enforcement of standards and improvement in database security
4) You don't need to alter data structure in application programs
5) Permit developers to focus on the general structure of the Database rather
than worrying about the internal implementation
2. Explain the Overall Architecture of DBMS in details (10M)
1)The architecture of DBMS depends on the computer system on which it runs. For
example, in a client-server DBMS architecture, the database systems at server
machine can run several requests made by client machine.
2) Types of DBMS Architecture
1. Single tier architecture
In this type of architecture, the database is readily available on the client machine,
any request made by client doesn’t require a network connection to perform the
action on the database.
For example, lets say you want to fetch the records of employee from the database
and the database is available on your computer system, so the request to fetch
employee details will be done by your computer and the records will be fetched from
the database by your computer as well. This type of system is generally referred as
local database system.
2. 2 Tier Architecture
In two-tier architecture, the Database system is present at the server machine and
the DBMS application is present at the client machine, these two machines are
connected with each other through a reliable network as shown in the above
diagram.
Whenever client machine makes a request to access the database present at server
using a query language like sql, the server perform the request on the database and
returns the result back to the client. The application connection interface such as
JDBC, ODBC are used for the interaction between server and client.
Advantage-Maintainence is easy
Disadvantage=-Scalabilty and Security.
3.3tier Architecture.
In three-tier architecture, another layer is present between the client machine
and server machine. In this architecture, the client application doesn’t
communicate directly with the database systems present at the server
machine, rather the client application communicates with server application
and the server application internally communicates with the database system
present at the server.
Advantage- Scalabilty and Security.
Disadvantage- Maintainence is difficult
7.Define DBA .Explain the role and responsibility of DBA (5M)
1) DBA-Database Administrator is a person or a group of person who are
responsible for managing all the activities related to database system. This job
requires a high level of expertise by a person or group of person. There are very
rare chances that only a single person can manage all the database system
activities so companies always have a group of people who take care of
database system.
2)Roles of DBA is as follows
1) Installing and Configuration of database:
DBA is responsible for installing the database software. He configure the
software of database and then upgrades it if needed. There are many database
software like oracle, Microsoft SQL and MySQL in the industry so DBA decides
how the installing and configuring of these database software will take place.
2. Deciding the hardware device
Depending upon the cost, performance and efficiency of the hardware, it is DBA
who have the duty of deciding which hardware devise will suit the company
requirement. It is hardware that is an interface between end users and database
so it needed to be of best quality.
3. Managing Data Integrity
Data integrity should be managed accurately because it protects the data from
unauthorized use. DBA manages relationship between the data to maintain data
consistency.
4. Decides Data Recovery and Back up method
If any company is having a big database, then it is likely to happen that database
may fail at any instance. It is require that a DBA takes backup of entire database
in regular time span. DBA has to decide that how much data should be backed
up and how frequently the back should be taken. Also the recovery of data base
is done by DBA if they have lost the database.
5. Tuning Database Performance
Database performance plays an important role for any business. If user is not
able to fetch data speedily then it may loss company business. So by tuning an
modifying sql commands a DBA can improves the performance of database.
6. Capacity Issues
All the databases have their limits of storing data in it and the physical memory
also has some limitations. DBA has to decide the limit and capacity of database
and all the issues related to it.
7. Database design
The logical design of the database is designed by the DBA. Also a DBA is
responsible for physical design, external model design, and integrity control.
8. Database accessibility
DBA writes subschema to decide the accessibility of database. He decides the
users of the database and also which data is to be used by which user. No user
has to power to access the entire database without the permission of DBA.
9. Monitoring performance
If database is working properly then it doesn’t mean that there is no task for the
DBA. Yes f course, he has to monitor the performance of the database. A DBA
monitors the CPU and memory usage.
10. Decides content of the database
A database system has many kind of content information in it. DBA decides
fields, types of fields, and range of values of the content in the database system.
One can say that DBA decides the structure of database files.