Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

Aditya Degree College, TADEPALLIGUDEM III BSc, DBMS

UNIT 1
DATA BASE SYSTEMS

Q. Define the following:


Data, Information, Database, DBMS
Ans: DATA: A Data is a raw fact. Data is the building blocks of Information.
Example of data are rollno, name, rama, 50000, age, Hyderabad, salary , address etc.,
INFORMATION: Meaning collection of data or processed data is known as information
For example: (rama , 50000, Hyderabad) gives information about a person.
DATABASE: A database is a collection of data about one particular organization. A
database contains one or more tables. A database is also known as “Schema”
SYMBOL of database:

DBMS: DBMS stands for Database Management System. It is a collection of programs


used to create a database structure, organize the database(add, modify or delete data
) and provide security for data in a database. We use SQL to work with DBMS.
Examples of DBMS Software’s are: Oracle, MY SQL , MS-SQL, MS-Access etc.,
2Q. Describe the differences between Data and Information

DATA INFORMATION
1. Data is raw fact. 1.Meaning collection of data or processed data
is known as information
2.Example of data are rollno, name, 2.Example of information are (rama , 50000,
rama, 50000, age, Hyderabad, salary , Hyderabad) gives information about a person.
address etc.,
3.Data does not help in decision making. 3. Information helps in decision making.

4.Input in a system may be treated as 4.Output in a system may be treated as


data. information.
5. data is difficult to understand 5. Information is easy to understand

6. data is not important to a business 6. Information is important to a business


system system.

1 K.KRISHNA, M.TECH
Aditya Degree College, TADEPALLIGUDEM III BSc, DBMS

Q. Write about Basic File Terminologies or Define the following : Table ,


Record, Field.
Ans: Field: A field is defined as a character or a group of characters that has a specific
meaning. A field is also known as “Attribute”.
Examples of fields are stno, sname, addr, fname, dob etc.,
Record: A record is defined as collection of related fields. A record is also known as
“Tuple”.
Examples of record are (1,rama,kkd,…..),(2,gita,rjy,….)
Table: A table is defined as collection of records. A table is also known as “Entity” or
“sub-schema” or “File”.
Ex: The records of STUDENT Table are given below

Student No. SName Addr Fname DOB


S01 Saritha KKD Rama Rao 11-11-2000
S02 Kavitha Kkd Mohan 10-10-2000
Rao
S03 Krishna KKD Raja Rao 8-8-2000

Q. What is File Processing System. What are drawbacks or limitation of File


Processing System.
File Processing System: A file processing system(FPS) is a method of storing and
organizing data in computer files.
In File processing system files are designed using programming languages like c,
cobol,c++,java etc.,
Here, Files are called “Flat Files”. It is best suited for small databases.
Drawbacks or limitations of File Processing System:
1. More Data Redundancy: “Redundancy” means repetition of data. In File
processing system , same data is stored in more than one place. This is known as
data redundancy. Data redundancy will decrease the efficiency of program.

2 K.KRISHNA, M.TECH
Aditya Degree College, TADEPALLIGUDEM III BSc, DBMS

2. More Data Inconsistency: “Inconsistency” means data appearing with different


values at different places. Data Inconsistency problem occur due to data redundancy
in FPS.
3. No Data Sharing: In FPS, data sharing is not possible.i.e., we cannot open a file at
a time in more than one computer.
4. Require more programming skills: A FPS , is created using 3GL like
java,c,c++,cobol. It is very difficult to store data using 3GL.
5. Less Data Security: It is difficult to provide security for data in FPS. Security
features like password protection, locking data in a file are difficult to implement.
6. Cannot Perform Adhoc Queries: It is not possible to retrieve or print data based
on complex conditions in FPS.

Representation of FILE PROCESSING SYSTEM is as follows:

Q. Define DBMS. What are the advantages of DBMS.


ANS: DBMS: DBMS stands for Database Management System. It is a collection of
programs used to create a database structure, organize the database(add, modify or
delete data ) and provide security for data in a database. We use SQL to work with
DBMS.
Examples of DBMS Software’s are: Oracle, MY SQL , MS-SQL, MS-Access etc.,
Role of DBMS: DBMS acts as an interface between user and the database. A database
is a collection of files(tables). We can access data in these tables only using DBMS.

3 K.KRISHNA, M.TECH
Aditya Degree College, TADEPALLIGUDEM III BSc, DBMS

Advantages of DBMS:
1. Reduced Data Redundancy: “Redundancy” means repetition of data. In DBMS, no
data is duplicated. So dbms avoids data redundancy. Hence it works efficiently.
2. Reduced Data Inconsistency: “Inconsistency” means data appearing with different
values at different places. In DBMS, no data is duplicated . So it doesnot allow data
inconsistency in database.
3. Improved Data Sharing: In DBMS, a any data can be accessed at a time in more
than one computer. Multiple users or persons can work on the database
simultaneously. Changes made for data by one user are updated to other user
simultaneously.
4.Require less programming skills: We use SQL( Structured Query Language) in
DBMS. It is a 4TH generation language. SQL is a command based language to work
with database.
5. Improved Data Security: DBMS provides a set of SQL commands to provide
security for the database. Security features like password protection, locking data in a
table are used to provide security for database.The DBA (database administrator) is
responsible for data security.
6. Can Perform Adhoc Queries: “Adhoc queries” means complex and difficult
queries. Using DBMS it is possible to retrieve or print data based on complex
conditions.
7. Backup & Recovery: DBMS supports the feature of backup & recovery. A DBMS
S/W automatically create backup for the database . A backup is used to recover data ,
if a system failure or crash occur.

4 K.KRISHNA, M.TECH
Aditya Degree College, TADEPALLIGUDEM III BSc, DBMS

Q. differentiate between file processing system and dbms


ANS:
FILE PROCESSING SYSTEM DBMS
1.More Data Redundancy: In file 1. No Data Redundancy: In DBMS, no
proessing system data duplication will data is duplicated. So dbms avoids data
occur. So Data redundancy is more in file redundancy.
processing system.
2. More Data Inconsistency: Data 2. No Reduced Data Inconsistency: In
Inconsistency problem occur due to data DBMS, no data is duplicated . So it doesn’t
redundancy in FPS. allow data inconsistency in database.
3. No Data Sharing: In FPS, data 3.Improved Data Sharing: In DBMS, a
sharing is not possible.i.e., we cannot database can be accessed at a time in more
open a file at a time in more than one than one computer. Changes made in data
computer. by one user are updated to other user
simultaneously.
4.Require more programming skills: A 4.Require less programming skills: We
FPS , is created using 3GL like use SQL( Structured Query Language) in
java,c,c++,cobol. DBMS. It is a 4TH generation language. SQL
is a command based language to work with
database.
5.Lack of Data Security: It is difficult to 5.Improved Data Security: DBMS
provide security for data in FPS. Security provides a set of SQL commands to enforce
features like password protection, locking security for the database. Security features
data in a file are difficult to implement. like password protection, locking data in a
table are used to provide security for
database
6. Cannot Perform Adhoc Queries: It 6.Can Perform Adhoc Queries: It is
is not possible to retrieve or print data possible to retrieve or print data based on
based on complex conditions in FPS. complex conditions in DBMS. This data is
useful in making better quality decisions by
the organization
5 K.KRISHNA, M.TECH
Aditya Degree College, TADEPALLIGUDEM III BSc, DBMS

Q. Write about classification of DBMS.


Ans: DBMS: DBMS stands for Database Management System. It is a collection of
programs used to create a database structure, organize the database(add, modify or
delete data ) and provide security for data in a database. We use SQL to work with
DBMS.
Examples of DBMS Software’s are: Oracle, MY SQL , MS-SQL, MS-Access etc.,
Types of Databases :DBMS is categorized into types based on the following:
i. Based on no.of users
ii. Based on location
iii. Based on extent of usage.
i. Based on no.of users: Based on no.of users it is classified into :
a. Single-user database b. Multi-user database
Single-user Database: A single user database supports only one user at a
time. A single-user database that runs on a personal computer is called a Desktop
Database.
Multi-User Database: A multi-user database supports multiple users at the same
time. It is again divided into : a. workgroup database b. Enterprise database
Workgroup Database: When a multi-user database supports a relatively small
number of users(less than 50users),it is called a workgroup database.
Ex: Database of Departments in a university, employees of a small business etc.,
Enterprise Database: When the database is used by the entire organization and
supports many users across many departments, the database is known as an
enterprise database.
Ex: Database of entire university, database of a big organization etc.,
ii.Based on location: Based on location it is classified into :
a. Centralized database b. Distributed database
Centralized Database: If a database supports data located at a single site is
called a centralized database.
Example of centralized database is database maintained in a reservation system.
Distributed Database: A database that supports data distributed across several
different sites or locations is called a distributed database.

6 K.KRISHNA, M.TECH
Aditya Degree College, TADEPALLIGUDEM III BSc, DBMS

Example data maintained over internet.


iii. Based on Usage: Based on usage it is classified into :
a. Operational database b. Data Warehouse
Operational Database: A database that is designed primarily to support a company’s
day-to-day operations is classified as an operational database.
Example Banking Database, Sales database etc.,
Data warehouse: A data warehouse is a huge collection of data. It is also known as
“data repository”. Data warehouse is mainly used for “data analysis”. In a data
warehouse, analysis is done on data periodically i.e., weekly or monthly, quarterly.
Example: Banking Database, Database maintained at stockexchange etc.,

Q. Define DBMS. Explain components of DBMS.


Ans. DBMS: DBMS stands for Database Management System. It is a collection of
programs used to create a database structure, organize the database(add, modify or
delete data ) and provide security for data in a database. We use SQL to work with
DBMS.
Examples of DBMS Software’s are: Oracle, MY SQL , MS-SQL, MS-Access etc.,
Role of DBMS: DBMS acts as an interface between user and the database. A database
is a collection of files(tables). We can access data in these tables only using DBMS.
Components of DBMS: The database system is composed of five major parts. They
are:
1. Hardware 2. Software 3. People 4. Procedures 5. Data.
1. Hardware: Hardware refers to all the system’s physical devices; for example,
computer, storage devices, Input devices, output devices and network devices(hub,
switch, routers etc).
2. Software: The DBMS needs three types of softwares. They are
a. Operating system software: Manages all hardware components and acts as
an interface between user and the computer. Ex: Microsoft Windows, Linux,
Unix.

7 K.KRISHNA, M.TECH
Aditya Degree College, TADEPALLIGUDEM III BSc, DBMS

b. DBMS software: Database s/w is used to create database structure and


organize the database. Ex: Oracle, MS SQL,MY SQL,MS Access etc.,
c. Application Software: Used to design an front-end application. Ex: Java, C,
C++, Python,HTML,JavaScript etc.,
3. People: There are five types of people identified in a database system, They are :
i. System analysts
ii. database designers
iii. Programmers
iv. DBA
v. end users.
i. System Analyst: System analyst are responsible for gathering required data
for the database and performs analysis on the database. They are also
known as “Database Analyst”.
ii. Database Designer: Database designer designs the structure of the
database. They are also known as “database architects”.
iii. Programmer: Programmers develop programs for the database design. They
use SQL & PL/SQL programming.
iv. DBA : DBA stands for Database Administrator. The DBA looks after all the
database system operations. The DBA also provide backup and security for
the database.
v. Endusers: Endusers are the people who uses application programs. For
example:- Clerk, Manager, Supervisors, Directors etc are all known as
endusers.
4. Procedures: Procedures are the block of statements to perform a task.
5. Data: Data is a raw fact. Data is major component in a database environment.

8 K.KRISHNA, M.TECH
Aditya Degree College, TADEPALLIGUDEM III BSc, DBMS

Q. EXPLAIN EVOLUTION OF DATABASE MANAGEMENT SYSTEM.


ANS: DBMS: DBMS stands for Database Management System. It is a collection of
programs used to create a database structure, organize the database(add, modify or
delete data ) and provide security for data in a database. We use SQL to work with
DBMS.
The data management had given several different data models inorder to overcome
disadvantages of file system. they are listed as follows:

Generation Time Data Model Name Examples Format


First 1960s to 1970s File System VMS/VSAM File Format
Hierarchical Data IMS , AD Tree Format
Second 1960s
Model ABAS, IDS-II
IMS , AD Graph Format
Second 1969 Network Data Model
ABAS, IDS-II
DB2,Oracle, Table Format
Third 1970 Relational Data Model MS-SQL,
MySQL
DB2UDB, Class &
Object-Oriented Oracle 10g, Object format
Fourth 1985
Relational Model MS-SQL,
MySQL
dbXML, Unstructured
Tamino, data format
Next XML (Extensible DB2UDB ,
Present to future
Generation Markup Language) Oracle 10g,
MS-SQL, MY-
SQL

9 K.KRISHNA, M.TECH
Aditya Degree College, TADEPALLIGUDEM III BSc, DBMS

Q. Define a data model. What are Building blocks of data models.


ANS: Data Model: Data is a raw fact. A data model is an abstraction of database. It
contains different entities used in a database & constraints(conditions) applied on
entities. A data model acts as a blue print for a database.
Building blocks of data models: The basic building blocks of all data models are
i. Entity ii. Attributes iii. constraints iv. Relationships

Entity: An entity is defined as real world object. It can be anything like a student,
faculty, doctor, patient , product etc.,. An entity stores collection of records. An entity is
represented by “rectangle” symbol in a database design.

Entity

Attribute: Attributes is defined as a charater or a group of characters that has a


specific meaning. It is also known as “Field” in file systems. An attribute is represented
by “oval” symbol in a database design.

Attribute

Constraints: Constraints are “set of rules” which we enforce on data in a database.


Relationship: A relationship is defined as an association among entities . A relationship
is represented by “diamond” symbol in a database design.

Relationship

Types of Relationships: There are three types of relationships they are:


1. one-to-one (1:1 or 1.. 1)
2. one-to-many (1:M or 1..*)
3. many-to-many (M:N or *..*)

10 K.KRISHNA, M.TECH
Aditya Degree College, TADEPALLIGUDEM III BSc, DBMS

Q. Define a data model. What are types of data models.


ANS: Data Model: Data is a raw fact. A data model is an abstraction of database. It
contains different entities used in a database & constraints(conditions) applied on
entities. A data model acts as a blue print for a database.
Types of Data Models:
1. Hierarchial Data Model
2. Network Data Model
3. Relational Data Model
4. Entity Relational Data Model
5. Object Oriented Data Model
1. Hierarchial Data Model : The hierarchical model was developed in the 1960s to
manage large amounts of data.
 In hierarchical data model data is organized in a “top-down structure” or “tree-
structure”.
 In this model the top file is known as “root node”. Bottom file is called as “Child
nodes”. Intermediate files are called as “Parent nodes”.

Disadvantages:
1. It supports only “one-to-many” relationship.
2. It doesn’t support many-to-many relationship & many-to-one relationship.
3. We cannot establish relationship between two parent tables.
4. A childnode cannot have two parents.

11 K.KRISHNA, M.TECH
Aditya Degree College, TADEPALLIGUDEM III BSc, DBMS

Network Data Model: The network data model was developed in the 1969s at
CODASYL(Conference on Database System Languages) by DBTG (Database Task
Group).
In network data model data is organized in a “Graph- structure”.
A network data model supports all types of relationships i.e., 1:1, 1:M, M:1, M:M
In network data model, a relationship is called a set. A set represents a 1:M relationship .
Each set is composed of at least two entities types: an owner (or Master) entity and a
member (or Detail) entity. A set represents a 1:M relationship between the owner and the
member.

Disadvantages:
1. As the size of database increases, designing of network data model becomes
too complex.
2. Difficult to develop network datamodel for large databases.
3. Cannot perform adhoc queries.
Relational Data Model: The relational model was introduced in 1970 by E. F. Codd. The
relational data model is implemented through relational database management system
(RDBMS).
 In Relational data model, data is represented in the form of “Tables”. A Table
cotains rows & columns. Each row is known as “Tuple”. Each column is known as
“attribute”.
 We can establish relationship between two tables , but “ a common field “ must
exist between two tables.
 SQL Language is used to perform adhoc queries.

12 K.KRISHNA, M.TECH
Aditya Degree College, TADEPALLIGUDEM III BSc, DBMS

Entity Relational Data Model: The Entity Relationship Model is also called ER
model , or ERD (Entity Relationship Diagram).
In entity relational data model, a database is represented in graphical form. So it is
very easy to understand.
ER –Model was introduced by scientist “Chen” in 1976.

Object Oriented Data Model: It is also known as OODBMS(Object Oriented Database


Management System). It was introduced in 1985.
In object oriented data model entities are represented in the
form of classes & objects.
In the object-oriented data model (OODM), both data and
their relationships with other entities are contained in a
single object.

13 K.KRISHNA, M.TECH
Aditya Degree College, TADEPALLIGUDEM III BSc, DBMS

Q. Explain about database architecture.


Ans: Database: A database is a collection of data about one particular organization. A
database contains one or more tables. A database is also known as “Schema”
SYMBOL of database:

We use SQL to work with Databases.


Examples of DBMS Software’s are: Oracle, MY SQL , MS-SQL, MS-Access etc.,
Types of database architectures:
a. 1-tier architecture
b. 2- tier architecture
c. 3- tier architecture
1- Tier Architecture : This is also known as “Single-tier” architecture.
 In this architecture, the database is directly available to the user. The user can
directly use DBMS software.
 It is similar to single-user database system.
 The 1-Tier architecture is used for development of the local application or
desktop applications , where user can store data and application on only one
computer.
2 - Tier Architecture : The 2-Tier architecture is also known as “client-server”
system.
 In 2-Tier archictecture, database is stored on “server
computer” and application development and application
running is done on “Client Computer” (or user end).
 Client computer can communicate with database at
server computer using a software known as
“ODBC”(Open Database Connectivity) or “JDBC” (Java
Database Connectivity)
 2-tier architecture is used to provide security for
database in multi-user database.

14 K.KRISHNA, M.TECH
Aditya Degree College, TADEPALLIGUDEM III BSc, DBMS

3 – Tier Architecture : This is also known as “Distributed Architecture”.


 3 – tier architecture is maily used in “Distributed Databases”.
 The 3-Tier architecture contains another layer between the client and server. In
this architecture, client can't directly communicate with the server.
 The application on the client-end interacts with an remote server which further
communicates with the database system.
 End user has no idea about the existence of the database.
 The 3-Tier architecture is used in case of web application.

Q. Explain situations where DBMS is not necessary. Or Explain about


disadvantages of DBMS.
Ans: Situations where DBMS is not necessary: DBMS is important for data
management, but in some situations it is not necessary, they are:
1. If computer system configuration is less,then it is not preferable to use DBMS,

as DBMS requires high memory , h/w and s/w requirements.


2. If traditional file processing is working well, and if it takes more money and time

to design database it is better not to go for the DBMS

15 K.KRISHNA, M.TECH
Aditya Degree College, Kakinada III BSc, DBMS

3. If only one person maintains the data and that person is not skilled in designing

a database , then it is not advisable to go for DBMS


4. Compared with file system, DBMS have some disadvantages.

 Cost of Hardware and Software : for DBMS, it is mandatory to have a high


speed processor and also a large memory size .
 Cost of Staff Training : For maintaining DBMS , we need to give training to
staff on DBMS. Inorder to use database all people working on it must have
knowledge about designing and coding of DBMS.
 DBMS is suitable only for large organizations. When the organization is small
cost of H/W,S/W and staff increase.
Q. DBMS Approach.
Ans: DBMS Approach: To overcome the drawbacks of file processing system , DBMS
approach was introduced. It contains the following main principles:
DATABASE: A database is a collection of data about one particular organization. A
database contains one or more tables. A database is also known as “Schema”
SYMBOL of database:

DBMS: DBMS stands for Database Management System. It is a collection of programs


used to create a database structure, organize the database ( add, modify or delete
data ) and provide security for data in a database. We use SQL to work with DBMS.
Examples of DBMS Software’s are: Oracle, MY SQL , MS-SQL, MS-Access etc.,
Data Dictionary: Data about the database is known as data dictionary. This is also
known as Meta data. The data dictionary stores the no.of tables in a database, name
of the tables, no.of records in each table and their relationships in a data dictionary.
Any changes made in a database structure are automatically recorded in the data
dictionary.
System catalog: The system catalog can be defined as a detailed system data
dictionary that describes all objects within the database, including data about table
names, the table’s creator and creation date, the number of column’s in each table,
index file names , index creators, authorized users ,and privileges.

16 G.VijayaLakshmi, ADCKKD
Aditya Degree College, Kakinada III BSc, DBMS

Q. DBMS Objectives:
Ans: DBMS DEFINITION DBMS stands for Database Management System. It is a
collection of programs used to create a database structure, organize the
database(add, modify or delete data ) and provide security for data in a database. We
use SQL to work with DBMS.
Examples of DBMS Software’s are: Oracle, MY SQL , MS-SQL, MS-Access etc.,
DBMS OBJECTIVES:
Data Redundancy: “Redundancy” means repetition of data. A DBMS must not allow
data redundancy in a database.
In DBMS, no data is duplicated. So it doesn’t allow data redundancy.
Data Inconsistency: “Inconsistency” means data appearing with different values at
different places.In DBMS, no data is duplicated . So it doesn’t allow data inconsistency
in database.
Data Integrity: Integrity refers to “Correctness and Consistency” of data. A DBMS
must provide data integrity.
Data Security: DBMS enforce(provide) security for the database using password. It
doesn’t allow unauthorized users to access the data.The DBA (database administrator)
is responsible for data security.
Data Independence: DBMS must ensure data independence for programs. Data
independence is two types Logical Data Independence and Physical Data Independence
Logical Independence-Change of database without affecting application programs
Physical Independence-Change of hardware or system software without affecting
application programs.
Data Sharing: In DBMS, a data can be accessed at a time in more than one computer.
Changes made in data by one user are updated to other user simultaneously.

17 G.VijayaLakshmi, ADCKKD

You might also like