You are on page 1of 39

70 s

71 se
Unit – 1

97 as
Introduction
to Database Management System
09 Cl
94 a
or
Qu

Quora Classes For BCA , Diploma In Computers


Contact: 9409977170 Google us for more details
Topics to be covered

70 s
• Definitions and Concept of Database (DB)

71 se
• Differentiate Data and Information
• Database Systems and Database environment

97 as
• Operations Performed on Database Systems
• Applications
• Differentiate Data Administrator and Database Administrator

09 Cl
• Responsibilities of DBAs
• Advantages and Disadvantages of File Oriented System
• Advantages and Disadvantages of Database Management System (DBMS) over File Oriented System
94 a
or
Qu

Quora Classes For BCA , Diploma In Computers


Contact: 9409977170 Google us for more details
Data and Information

70 s
1. Data

71 se
• Data Means knows facts, that can be stored
• For Example, marks of 3 subject are given below, that is known as Data

97 as
DBMS = 25, DS = 23, C++ = 24 Data

2. Information

09 Cl
• Information means processed or organized data
• For Example, if we count the average of 3 subjects then it known as Information

(25+23+24)/3 = 24 Information
94 a
or
Qu

Quora Classes For BCA , Diploma In Computers


Contact: 9409977170 Google us for more details
Differentiate Data and Information

70 s
Data Information

71 se
Data Means knows facts, that can be recorded Information means processed or organized
and have implicit meaning data
Examples: Examples:

97 as
• Student No: 12 • Percentage : 81.31%
• Student Name: ABC (Derived from the marks of all subjects)
• City name : Rajkot • Run rate in cricket match : 5.3 run/over
• Account No: 123456789 (Derived from total runs and overs)

09 Cl
• Balance : 10000
Row materials used to derive information Product derived from Data
Less useful More useful
94 a
or
Qu

Quora Classes For BCA , Diploma In Computers


Contact: 9409977170 Google us for more details
Definitions & Concepts of DB
1. Data

70 s
• Data means known facts that can be stored.

71 se
• For example age, salary, result etc…
2. Database
• It is a collection of inter-related data

97 as
• For example student information database, book bank database, college database etc…
3. Management
• Manipulation, searching and security of data

09 Cl
• For example searching of product in amazon, viewing result in GTU website etc…
4. System
• Programs or tools used to manage database
• For example SQL Server Studio, Oracle 11g
94 a
5. DBMS (Database Management System)
or

• DBMS = Database + a set of programs (that manipulate the data)


• Data manipulation involves various operations like store data, modify data, remove data and retrieve
data.
Qu

Quora Classes For BCA , Diploma In Computers


Contact: 9409977170 Google us for more details
Operations Performed on Database Systems

70 s
• A database system can be considered as a container to store database. It also provides functionalities to manipulate

71 se
database.
• Various operations can be performed on such kind of database systems. Some of the basic operations are:

97 as
Creating containers for database such as tables, or files.
• Inserting new data into existing database.
• Modifying or updating data in existing database.

09 Cl
• Removing or deleting data from existing database.
• Retrieving data from existing database.
• Destroying containers for database such as tables, or files.
Along with these, a number of different operations can be performed on database systems depending upon the
94 a
requirements of the system. These operations may include database back-up and recovery, performance monitoring,
authorizing data access to provide safety to the database and so on.
or
Qu

Quora Classes For BCA , Diploma In Computers


Contact: 9409977170 Google us for more details
Applications

70 s
• Now a days, DBMS are used in number of applications. Some of the well-known applications are listed in table.

71 se
System Data/Information to be managed
Banking System Customers, Accounts, Loans, Employees,

97 as
Transactions…
Library System Books, Magazines, Authors, Publications,
Students, Staff, Faculties…

09 Cl
College/University Students, Subjects
Hospital Management System Patients, Doctors, Medicines, Employees,
Instrument, Beds….
94 a
or
Qu

Quora Classes For BCA , Diploma In Computers


Contact: 9409977170 Google us for more details
Data – Items (Fields), Records and Files
• Data – Item(Field):

70 s
A Data item is a character or group of characters that has a specific meaning.

71 se
It is also called a Data item.
It is represented in the database by a value.
For Example, customer id, society and city are all fields for customer.

97 as
• Record:
A Record is a collection of logically related fields.
Here, each field in a record contains a fixed size and fixed data type.

09 Cl
For Example, collection of fields- id, name, society and city- forms a record for customer.
A record consists of values for each field. So, a record consisting of id, name, society and city fields represents a
customer.
• Files:
A file is collection of related records.
94 a
These records are generally arranged in specific sequence.
or

If all records in a file have same size, then it is said that a file consists of fixed-length records.
If different records in a file have different sizes, then it is said that a file consists of variable-length records.
Qu

Quora Classes For BCA , Diploma In Computers


Contact: 9409977170 Google us for more details
70 s
Figure: Fields, Records and File

71 se
97 as
09 Cl
94 a
or
Qu

Quora Classes For BCA , Diploma In Computers


Contact: 9409977170 Google us for more details
Data Storage

70 s
Paper Based System

71 se
97 as
09 Cl
• Too much space required
• Tedious task to find or
modify data
94 a
or
Qu

Quora Classes For BCA , Diploma In Computers


Contact: 9409977170 Google us for more details
Data Storage

70 s
File Based System

71 se
97 as
09 Cl
• Data will not consistent
• Data redundancy will be
there
• Tuff task to search
94 a
or
Qu

Quora Classes For BCA , Diploma In Computers


Contact: 9409977170 Google us for more details
Data Storage

70 s
71 se
Database Management System

97 as
09 Cl
• Data will consistent
• Data redundancy will be
removed
• Centrally data can be access
94 a
or
Qu

Quora Classes For BCA , Diploma In Computers


Contact: 9409977170 Google us for more details
Advantages of File oriented system

70 s
• File oriented system have some advantages over paper based system,

71 se
1. Backup – Possible to take faster and automatic backup of database.
2. Compactness – It is possible to store data compactly.

97 as
3. Data retrieval – Provides enhanced data retrieved techniques to retrieve data stored in file.
4. Editing – It is easy to edit any information stored in computers in the form of files.
5. Remote access – In Computer based system it is possible to access data remotely.

09 Cl
6. Sharing – Data stored in files systems can be shared among multiple users at a same time
94 a
or
Qu

Quora Classes For BCA , Diploma In Computers


Contact: 9409977170 Google us for more details
Disadvantages of File oriented system
1. Data redundancy – It results in memory wastage

70 s
71 se
Computer Electrical
1 101 YD 123456 1 101 YD 123456

97 as
T T

Mathematics

09 Cl
Subject Faculty

1 101 YD 123456 1 101 YD 123456


94 a
T T
or

Civil Mechanical
Qu

Quora Classes For BCA , Diploma In Computers


Contact: 9409977170 Google us for more details
2. Data inconsistency – It is possible that data may be not in consistent state due to data redundancy.

70 s
71 se
Computer Electrical

97 as
1 101 YD 123456 1 101 YD 456789 1 101 YD 123456
T T T

09 Cl
Mathematics
Subject Faculty
94 a
or

1 101 YD 123456
1 101 YDT 123456 1 101 YDT 456789 T

Civil Mechanical
Qu

Quora Classes For BCA , Diploma In Computers


Contact: 9409977170 Google us for more details
3. Difficulty in accessing data – Accessing data is not convenient and efficient in the file processing
system.

70 s
71 se
97 as
Now if we want to find the faculties from ‘Rajkot’ then we have to create a new file from the scratch
file or create a file of all faculties and then find the faculties from ‘Rajkot’ only.

09 Cl
94 a
or
Qu

Quora Classes For BCA , Diploma In Computers


Contact: 9409977170 Google us for more details
4. Limited Data Sharing – Due to data isolation, it is difficult to share data among different applications.

70 s
Different kinds of file format available, so not easy task.

71 se
97 as
09 Cl
94 a
or
Qu

Quora Classes For BCA , Diploma In Computers


Contact: 9409977170 Google us for more details
5. Integrity problems – Means that the data contained in the database is both correct and consistent.

70 s
71 se
CustomerID Name Balance Bank MobileNo.
101 Nitin Rola 10000 SBI 123456
102 Chintan Kanani 5000 HDFC 123789

97 as
103 Akash Siddhpura 599 ICICI 123478
104 Vishal Makwana 7000 HSBC 123459

09 Cl
Not Correct data
CustomerID Name Balance Bank MobileNo.
103 Akash Siddhpura 599 ICICI 123478
Not Consisting
94 a
data
CustomerID Name Balance Branch MobileNo.
or

104 Vishal Makwana 7000 HSBC 123459


Qu

Quora Classes For BCA , Diploma In Computers


Contact: 9409977170 Google us for more details
70 s
6. Atomicity problem – Means activity must happen in its entirely or not at all.

71 se
Say for example customer1 want to transfer 1000 Rs. to customer2.

97 as
Transfer 1000 rs

09 Cl
Available Balance: 5000 Available Balance: 1000
94 a
Available Balance: 4000 Available Balance: 2000

• Step 1: Debit 1000 rs. from customer1’s bank account


or

• Step 2: Credit 1000 rs. from customer2’s bank account


Qu

Quora Classes For BCA , Diploma In Computers


Contact: 9409977170 Google us for more details
70 s
71 se
Transfer 1000 rs

97 as
Available Balance: 5000
Available Balance: 1000

09 Cl
Available Balance: 4000

Available Balance: 5000

Total Available Balance in: 6000


94 a
?????
• Step 1: Debit 1000 rs. from customer1’s bank account
or

• Due to power cut off transaction not completed successfully…


• Step 2: Again Credit 1000 rs. from customer1’s bank account
Qu

Quora Classes For BCA , Diploma In Computers


Contact: 9409977170 Google us for more details
7. Concurrent access – multiple users are not allowed to access data simultaneously.

70 s
CustomerID Name Balance Bank MobileNo.

71 se
101 Nitin Rola 10000 SBI 1234567890

97 as
At the same time, another

09 Cl
Accessing
department also want to
the data
access the data

Computer
Electrical
94 a
or
Qu

Quora Classes For BCA , Diploma In Computers


Contact: 9409977170 Google us for more details
70 s
8. Security Problems - Database should be accessible in limited way only.

71 se
Wants
EmpName Addres Mob Subject to
s

97 as
access
Nitin Rola Rajkot 1234 C++
EmpName Salary Load Atmiya user

09 Cl
Nitin Rola 50000 10
Wants
to
EmpName Teaching Knowledge Discipline access
Nitin Rola Good V Good Excellent Kalyan
94 a
user
or
Qu

Quora Classes For BCA , Diploma In Computers


Contact: 9409977170 Google us for more details
Database System Environment

70 s
Database
System

71 se
Application  Database System Environment can be
Programs/Queries divide in to 4 parts,
1. Data
2. Hardware

97 as
DBMS Software to process 3. Software
Soft- Queries/Programs 4. User
ware I. Database Administrator

09 Cl
II. Database Designer
Software to access III. Application Programmers
Programmers Stored Database IV. End Users
94 a
or

Stored
Stored
Database
Database
Definition
Qu

Quora Classes For BCA , Diploma In Computers


Contact: 9409977170 Google us for more details
1. Data

70 s
• Data is the most important component of the database system.

71 se
• Data Means knows facts, that can be stored
• Collection of related data is referred as database.
• Data in a database are integrated and shared.

97 as
09 Cl
94 a
or
Qu

Quora Classes For BCA , Diploma In Computers


Contact: 9409977170 Google us for more details
2. Hardware

70 s
• All the physical devices of a computer system are referred as hardware.

71 se
• A computer system can have number of different hardware such as processor, memory, hard disk,
monitor, keyboard, mouse etc.
• From the database point of view hardware can be divided into 2 categories;

97 as
1. The processor and main memory
• Supports the execution of the database software
2. The secondary storage devices

09 Cl
• Used to store data of system permanently
• These includes hard disks, magnetic tapes, compact disks, pen drive etc…
94 a
or
Qu

Quora Classes For BCA , Diploma In Computers


Contact: 9409977170 Google us for more details
3. Software

70 s
Software provides the interface between users and database stored in physical devices.
• Application program, DBMS and OS together generate the software component here.

71 se
• Application program are developed using programming languages like C, C++, Java and etc…
• These application programs use the functionalities of the DBMS software to perform various

97 as
operations on the database.
• The OS (Operating System) manages all hardware of the computer.

09 Cl
94 a
or
Qu

Quora Classes For BCA , Diploma In Computers


Contact: 9409977170 Google us for more details
4. Users

70 s
• Any person who communicate with the database is known as Database User.

71 se
1. Database administrator
• Has central control over the database system including data & programs.

97 as
DBA is responsible for proper functioning of the database system.
2. Database designer
• Identify the data to be stored in database and designs structure of the database for an organization.

09 Cl
3. Application programmers
• These users write application programs to interact with the database.
• Application programs can be written in some programming languages such as C++, Java, .NET etc…
4. End Users
94 a
or
Qu

Quora Classes For BCA , Diploma In Computers


Contact: 9409977170 Google us for more details
Advantages of DBMS

70 s
1. Remove Data Redundancy – Due to centralized database, it is possible to avoid

71 se
unnecessary duplication of information
2. Remove Data Consistency – Data consistency occurs due to the data redundancy, if we
reduce data redundancy then it is oblivious that data will be consistent

97 as
3. Efficient Data access – Required amount of data can be retrieved by providing
appropriate query to the DBMS.
4. Improved Data Sharing – Data in database must be correct and consistent.

09 Cl
5. Improved Data Integrity – Data integrity means that the data contained in the database is
both correct and consistent. The data stored in database must satisfy certain types of
constraints.
6. Guaranteed atomicity – Any operation in database executed either 100% or 0%
94 a
7. Improved Concurrent Access – Multiple users are allowed to access data simultaneously.
This is for better and faster performance.
or

8. Improved Data Security – DBMS provides way to control the access to data for different
user according to their requirement
Qu

Quora Classes For BCA , Diploma In Computers


Contact: 9409977170 Google us for more details
Disadvantages of DBMS

70 s
1. High Cost – High initial cost is required to implement database and application programs.

71 se
2. Specialized Man power – DBMS requires specialized manpower to design, develop and to
provide database administration services.
3. Increased Complexity – It is necessary to understand the requirements of the

97 as
organization and different kinds of users to design and implement efficient database.

4. Security Risks – Database is kept centrally and can be used by multiple users remotely

09 Cl
at the same time. This requires to authorize access to data among users to prevent misuse
of the confidential and important data.
5. Need of Explicit backup and Recovery – As entire database is maintained centrally it is
must to provide efficient backup and recovery facility.
94 a
or
Qu

Quora Classes For BCA , Diploma In Computers


Contact: 9409977170 Google us for more details
Differentiate DA and DBA

70 s
DA (Data Administrator) DBA (Database Administrator)

71 se
It is a person in the organization who It is a person in the organization who
controls the data of the database controls the design & use of the
database

97 as
It determines what data to be stored in It provides necessary technical support
database based on requirements of the for implementing a database
organization

09 Cl
It involves more in the requirements It is involved more in the design,
gathering, analysis of data development, testing and operational
phases
It is a manager or some senior level It is a technical person who have the
person in an organization who knowledge of database technology
94 a
understands organizational requirements
or

with respect to data


It is a business focused person It is a technically focused person
Qu

Quora Classes For BCA , Diploma In Computers


Contact: 9409977170 Google us for more details
Functions and Responsibility of DBA

70 s
1. Schema Definition – DBA defines the logical schema of the database. A Schema refers to the overall logical structure
of DB.

71 se
2. Storage structure and access method definition – DBA decides how the data is to be represented and on that basic
how they are going to be access the data with different methods.
3. Assisting Application Programmers – The DBA provides assistance to application programmers to develop
application programs.

97 as
4. Physical Organization Modification - The DBA modifies the physical organization of the database to reflect the
changing needs of the organization or to improve performance.
5. Granting of authorization for data access – DBA decides which user needs access to which part of the database.

09 Cl
6. Monitoring performance – DBA monitors the performance of system.
7. Backup and recovery – Data should not be lost or damaged.
94 a
or
Qu

Quora Classes For BCA , Diploma In Computers


Contact: 9409977170 Google us for more details
Metadata
• It is data about data.

70 s
• Data such as table name, column name, data type, authorized user for any table is called metadata for
that table.

71 se
Fac_ID Name From Initial Mobile
Faculty
101 Nitin Rola Rajkot NJR 123456

97 as
102 Chintan Kanani Rajkot CNK 456789
103 Akash Siddhpura Jamnagar ANS 456123

09 Cl
104 Umesh Thoriya Morbi UHT 123789

Table Name – Faculty


Column Name – Fac_ID, Name, From, Initial, Mobile
Data Type – Varchar,Number
94 a
Authorized User – Retrieve and Update authentication given
or
Qu

Quora Classes For BCA , Diploma In Computers


Contact: 9409977170 Google us for more details
System Catalog
• A system Catalog is a repository for a metadata

70 s
• System catalog is a system-related database.

71 se
It contains table related description.
• System catalog is created by DBMS itself.

97 as
09 Cl
94 a
or
Qu

Quora Classes For BCA , Diploma In Computers


Contact: 9409977170 Google us for more details
Data dictionary

Fac_ID Name From Initial Mobile

70 s
101 Nitin Rola Rajkot NJR 123456

71 se
Faculty
102 Chintan Kanani Rajkot CNK 456789
103 Akash Siddhpura Jamnagar ANS 456123

97 as
• It is an information repository which contains metadata.
• This can involves information such as table name, owners, column names, data types, size and

09 Cl
constraints.

Table Name – Faculty


Owner – Database User (Admin, Faculty, Student etc.…)
94 a
Column Name – Fac_ID, Name, From, Initial, Mobile
Data Type – Varchar, Number
or

Size – 20, 10
Constraints – Not Null, Primary Key, Unique Key etc…
Qu

Quora Classes For BCA , Diploma In Computers


Contact: 9409977170 Google us for more details
Data Dictionary stores and manages following types of information:

70 s
Description of the schema.
• Detailed information on physical database design.

71 se
• Description of the database users, their responsibilities and access rights.
• Description of the database transactions.

97 as
• Relationships between transaction and data items to determine which transaction are affected when certain
data definitions are changed.
• Relationship among entities.

09 Cl
• Usage statistics
• Access counts to different parts of the database.
94 a
or
Qu

Quora Classes For BCA , Diploma In Computers


Contact: 9409977170 Google us for more details
Components of Data Dictionaries

70 s
• Entities – A thing or object or person in the real world, that is different from all other object.

71 se
• Attribute – Property or characteristics of an entity.
• Relation Ship – It is an association between several entities.

97 as
• Key – A data item or a field which is used to identify a record in a database is referred as key.

Attribute
Relation Ship

09 Cl
Fac_ID Name From Initial Mobile
Faculty 101 Nitin Rola Rajkot NJR 123456
102 Chintan Kanani Rajkot CNK 456789
94 a
103 Akash Siddhpura Jamnagar ANS 456123
or

Entity
Qu

Quora Classes For BCA , Diploma In Computers


Contact: 9409977170 Google us for more details
Active and Passive Data Dictionaries

70 s
Active Data Dictionary Passive Data Dictionary

71 se
If data dictionary is managed If data dictionary is managed by the user
automatically by database management of the system it is called a Passive data
software it is called an Active data dictionary.

97 as
dictionary.
It is also called integrated data dictionary. It is also called non-integrated data
dictionary.

09 Cl
It is always consistent with the current It may not be consistent with the current
definition and structure of the database definition and structure of the database
because, it is managed by database because, it requires explicit changes
system itself. whenever structure of the database
changes.
94 a
or
Qu

Quora Classes For BCA , Diploma In Computers


Contact: 9409977170 Google us for more details
Data Warehouse

70 s

71 se
Data stored in databases can be one of the two types:
1. operational data, which is used in day-to-day operations
2. decision making data, which is used occasionally to make decisions.

97 as
“A Data warehouse is a decision support database that is maintained separately from the organizations
operational database.”

09 Cl
• Data stored in data warehouse posses following characteristics:
1. Subject-oriented:
• Data warehouse is organized around the major subjects or topics of an organization.
• These subjects are those for which there may be a need to take some decision. For example.
94 a
Customers, products etc..
or
Qu

Quora Classes For BCA , Diploma In Computers


Contact: 9409977170 Google us for more details
2. Integrated:

70 s
• Data to be stored in a data warehouse might be coming from different locations, such as from

71 se
different branches of a company or bank.
• It is also possible that this data may have different structures according to their source.
• All such kind of data is integrated in data warehouse. This means, it is converted to some
homogenous structure.

97 as
3. Time-variant:
• Data warehouse provides information from a historical perspective.
• Data stored in data warehouse contains time element to reflect timing of the data.

09 Cl
• So, data in data warehouse indicates what happened previous day, last week, last month, during
past two years and so on.
4. Non-volatile:
• Data stored in data warehouse is never deleted or updated. New data is always added as a
supplement to the database on a regular basis.
94 a
or
Qu

Quora Classes For BCA , Diploma In Computers


Contact: 9409977170 Google us for more details

You might also like