0% found this document useful (0 votes)
5 views13 pages

Introduction to DBMS textbook

The document introduces database management systems (DBMS), explaining their importance in organizing and managing data across various applications. It discusses the concepts of data and information, the structure of databases, and different data models including hierarchical, network, and relational models. Additionally, it highlights the advantages of using DBMS such as organized storage, data sharing, and increased accuracy and security.

Uploaded by

shayaaan27
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views13 pages

Introduction to DBMS textbook

The document introduces database management systems (DBMS), explaining their importance in organizing and managing data across various applications. It discusses the concepts of data and information, the structure of databases, and different data models including hierarchical, network, and relational models. Additionally, it highlights the advantages of using DBMS such as organized storage, data sharing, and increased accuracy and security.

Uploaded by

shayaaan27
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

8

CHAPTER Introduction to Database


Management System

IntroductIon
Databases and database systems are essential parts of
our life. We have been interacting with databases since
a time. Recall the process of looking for a word in a
dictionary or finding the telephone number of a friend
from the telephone directory. With the advancement
in ever changing technology, computerized databases
are being used to store, manipulate, and manage the
database. Today, we use databases in almost all spheres
of life. When we go to book railway tickets, to search
for a book in a library, to get the salary details, to get
the balance amount after withdrawal of money from the
ATM and so on, this list can run into several pages. Data
being stored in databases can be of varied types like
text, images, audio and video. This data is then stored
and/or processed so as to get meaningful information.

Data and Information


The raw facts constitutes data. The facts may be related
to any person, place, activity or things. It may be stored
in the form of text, graphics, audio or video. This data
must be processed by any computing machine in a
proper way to generate the useful and meaningful
information. The examples of data are marks scored by
the students, weights, prices, costs, numbers of items
sold, employee names, product names, addresses, tax
codes, registration, marks etc.
Information is the processed or organized form of
data. If data is not correct or accurate, the information
obtained by processing such data may not be correct.
For example, marks obtained by students and their roll
numbers is the data, while the report card/sheet is the

2023-24
information. Other forms of information are pay-slips, notes
schedules, worksheet, bar charts, invoices, account
returns etc. Similarly the temperature recorded is data
which can be processed to find out the maximum or
minimum temperature of day and night. Also this data
is generally organised in tabular form as shown in the
Table 8.1.
Table 8.1: Data Stored in Tabular Form

Day Day Temperature Night Temperature

Sunday 35 15
Monday 37 17
Tuesday 36 16
Wednesday 34 15
Thursday 35 17
Friday 35 16
Saturday 33 14

Databases and DBMS


A database is a collection of logically related data items
stored in an organised manner. The information being
stored in a database can be added, modified, deleted
or displayed according to the requirements of the user.
The software that is used to create, update and retrieve
data is known as database management system
(DBMS). It facilitates planning and maintenance of the
database for the user. Some of the common examples
base
of DBMS are MS Access, Open Office or LibreOffice
Base, Oracle, Ingress, MySQL. In this book, we will use
LibreOffice Base version 6.4 to learn various aspects
of DBMS.
We all know that it is easy to remember names of our
friends, but it is difficult to retain their phone numbers
in our memory. If details like names and phone numbers
are stored in a diary or mobile phone in an orderly
manner, then it becomes easy to retrieve the phone
number of a required person. Thus, the phone book
can be considered a simple database and to manage
this database electronically, we will require a database
management system or a DBMS.

Database ManageMent systeM Using LibreOffice Writer 145

2023-24
Let us discuss some of the advantages of DBMS:
• Organised Storage – The data in the database is
stored in an organised manner, so that retrieval
of the required data is fast and accurate.
• Data Analysis – A database helps in analysis of
data based on certain criteria. It is easy to find
out maximum or minimum value, average or
mean using a database.
• Data Sharing – If the same data set is required
for different applications then the database can
be shared with other applications. Hence using
a database means making once and using it
repeatedly for multiple applications.
• Minimal Data Redundancy – In the event of
requiring the same data field in several tables the
data field might get repeated in number of tables.
This is called as data redundancy. This can be
reduced by using DBMS tools.
• Data Consistency – By minimising data
Data Consistency: By
minimizing data redundancy,
redundancy, chances of inconsistent data being
the chances of storing stored is reduced. For example, it should not
inconsistent data are reduced. happen that the name of the student is changed in
For instance, if a student's one table and not in another. Such inconsistency
name is changed, a DBMS is reduced by using a DBMS.
can automatically reflect this
Let us consider a situation where, for example,
change in all related tables by
setting a relation between Murugan looks after the data management of ABC
them, preventing the name School. There are two tables in his database– Admission
from being updated in one table and Library table. ‘Ram Lal Kumar’ wants to
table but not another. change his name to ‘Ram Kumar’ has recently shifted
his house. So, he hands over the application for the
same to Murugan. In the absence of a DBMS, Murugan
has to change the name of the student separately in the
admission table and also in the library table. But as we
can set a relation between the two tables using a DBMS,
any change in one table is automatically reflected in
all the related tables. There is no need to add another
record with the changed name. The same record will
be updated. Hence, this reduces the chances of data
redundancy and inconsistency.
Admission Table
Roll Number Student Name Class Date of Birth Date of Admission
913 Dipak Kumar 10 06/04/2004 25/06/2018
914 Ram Lal Kumar 10 01/03/2004 24/06/2018

146 Domestic Data entry operator – class X

2023-24
Library Table
Student Name Name of the Book Date of Borrow Date of Return
Dipak Kumar IT 10/12/2018 25/12/2018
Ram Lal Kumar Science 11/11/2018 24/11/2018
Sham Lal Mathematics 12/11/2018 30/12/2018

• Increases Efficiency – Since database tables are


properly organised, saving, reading and searching
data can be carried out efficiently.
• Increases Accuracy – Since data redundancy and
inconsistency can be minimised in a database,
the data is retrieved accurately from the database.
• Increases Validity – Properties of different data Increases Validity- Properties can be
fields can be assigned when a database is planned. assigned to different data fields during the
So whether or not valid data is being entered can database planning stage. This allows for
checking whether valid data is being
be checked at the data entry stage. This increases
entered at the data entry stage, thereby
the validity of the database. For instance, we may increasing the validity of the database. For
set up a restriction while creating the table that example, a restriction can be set so that
the amount of fees being entered should be more the fees entered must be more than a
than 1000. certain amount

• Security – Unauthorised access can be controlled


by assigning passwords to the users. The data
might be translated in such a manner that
unauthorised users are not able to read it. This
is known as encryption. Both these measures
increase the security of the database.

Data Models
A database can be designed in different ways depending
on the data being stored. This structure of database A data model is the structure of a
database that describes the manner in
is known as data model that describes the manner in which data will be stored and retrieved. A
which data will be stored and retrieved. database can be designed in different
A data model consists of components for describing ways depending on the data being
stored, and this structure is known as a
the data, relationships among them and the constraints data model.
that hold data. There are different data models such Data Model- It describes the manner in
as hierarchical data model, network data model and which data will be stored and retrieved.
relational data model.

Hierarchical Data Model


In this model the data is organized into a tree like
structure. The data is stored in the form of records.
A record is a collection of fields and its data values.
Database ManageMent systeM Using LibreOffice Writer 147

2023-24
notes All these records are linked to each other at various
levels, thereby forming a hierarchy. For example, in
Fig. 8.1 the data of a company is stored using a
hierarchical data model.
problem: rigidity and cant
Likes Ltd. be flexible

Personal Information Project Information

Emp Name Project Number

Salary Project Deadline

Designation Employee Incharge

Fig. 8.1: Hierarchical Data Model

Network Data Model


In this model, multiple records are linked to same
master file. It is also considered as an inverted tree
where master is present in the bottom of the tree and
the branches contain information linked to the master.
In Fig. 8.2, the data of the company is represented using
the network data model. problem: can get complex and really
messy
Likes Ltd. it was proposed to solve the problem
of ridigity of the hierachical data model

Personal Project
Information Information

Emp Project Project


Salary Designation
Name Number Deadline

Fig. 8.2: Network model

Relational Data Model


This data model is based on the principle of setting
relationships between two or more tables of the same
database. It is the most commonly used database model.
Let us study about this model in detail.

148 Domestic Data entry operator – class X

2023-24
Relational Database Model notes
The Relational Database Model was proposed in 1970
by E. F. Codd. Relational database model is the most
common type of database model. The data elements are
stored in different tables made up of rows and columns.
The data in different tables are related through the use
of common fields. So relations are set between tables
based on common fields. That is why this model is
termed as relational database model.

Relational Database Terminology


Let us get familiar with some of the common terms used
in RDBMS.
• Entity – It is a real world object about which
information is to be stored in a database. For
example, if we want to store information about an
entity Student in a school, then we need to have his
admission number, roll number, name, father’s
name, date of birth, etc. These details associated
with the entity are called attributes. Each entity
is a collection of these attributes associated with
it. So roll number, name, admission number,
etc., are attributes associated with the entity
student. These attributes are represented in the means that a field defines one specific
form of columns. piece of information about each item or
entity that a record describes. For
• Table – A table is a collection of logically related example, in a table storing information
records. It is organised as a set of columns, and about students, characteristics could be
can have any number of rows. For example, the their name, roll number, class, or date
Employee table can have columns, namely name, of birth. Each of these would be
designation, department and have records or represented by a separate field
rows having data of 100 employees. (column).
explanation
• Field or Columns or attributes – A field is the a field, also known as a column or
smallest entity in the database. A collection of attribute, is the smallest entity in the
fields make a record, a collection of records make database, representing an individual
a table and a collection of tables make a database. record characteristic presented as a
Fields are individual record characteristics and column within a table where data values
are presented as columns within a table. Data of one type are stored. A collection of
fields make a record, a collection of
values are stored in a database as fields. A field records make a table, and a collection
holds the data values of one type of data for of tables make a database
several persons. For example, in the Employee
table the field “Emp Name” will hold the names of
employees of an organisation.
• Data Values – Data values are the raw
data represented in numeric, character or
Database ManageMent systeM Using LibreOffice Writer 149

2023-24
alphanumeric form. Examples of data values are
‘Abhinav Bindra’, ‘26’ ‘shooting’, “Chandigarh”,
“10-12-2018”, etc.
• Record or Row – The data values for all the fields
A record, also known as a row, is the collection
of data values for all the fields related to a related to a person or object is called a record. It is
single person or object, presented as a row presented as rows within a table. A record holds
within a table the data values of all the fields for a single person
or object in a table. For example, in the Employee
table with the field names as Name, Designation,
Department, the data values of all the fields for an
employee may be (‘Abhinav’, ‘Manager’, ‘Finance’)
A primary key or simply a key is and this forms one record.
a field that uniquely identifies a row in a • Primary Key – A primary key or simply a key is
table. a field that uniquely identifies a row in a table.
•It acts as a unique identifier for the table. The key identifier can be the value of a single
column or of multiple columns. The primary key
•The value of the primary key must be is a unique identifier for the table. The column or
unique for each different row. This means no combinations of columns that form the primary
two rows in the table can have the same key have unique values. At any time, no two rows
value for the primary key at any time.
in the table can neither have same values for the
•Also, the primary key field cannot be left primary key nor can data value for such field be
blank left blank. For example, in a student table, each
student has a unique roll no., which forms the
If, in a table we use more than one primary key. If, in a table we use more than one read the
fields to identify a record, it is known as a
fields to identify a record, it is known as a composite examples
composite
key. key. For example, we may form a composite key
consisting of fields roll no. and name.
• Relational Database – A relational database is
a collection of related tables. For example, in
Fig. 8.3, the database contains two related tables.
Relational Database
Fields
fields
Roll Number Student Name Class Date of Birth Date of Admission
913 Dipak Kumar 10 06/04/2004 25/06/2018
record 914 Ram Lal Kumar 10 01/03/2004 24/06/2018

Roll Number Book Number Date of Barrow Date of Admission


913 555 10/12/2018 25/12/2018 Tables
914 333 11/11/2018 24/11/2018 Records
915 444 12/11/2018 30/12/2018

Fig. 8.3: Relational database

150 Domestic Data entry operator – class X

2023-24
• Foreign Key – If a field or a combination of fields
of one table can be used to uniquely identify
records of another table, then that particular field Helps build the relation between
is known as the foreign key. This foreign key helps the tables
to build a relation between two tables. Consider
the example given below.
Student Registration Table
Enrolment Number Student Name Class Date of Birth Date of Admission
XX1234567890 Dipak Kumar 10 06/04/2004 25/06/2018
XX1234567891 Ram Kumar 10 01/03/2004 24/06/2018
Primary key: Enrollment Number
Student Marks Table
builds relation
Roll Number Maths Science Vocational Enrolment Number
44983 87 75 80 XX1234567890
44990 74 45 75 XX1234567891
Primary key – Roll Number, Foreign key – Enrollment Number
A primary key uniquely identifies records
within a table, while foreign key establishes
In Student Registration Table, ‘Enrolment_Number’ relationships between tables by referencing
is the primary key and in the Student Marks Table, the primary key of another table.
‘Roll_Number’ is the primary key, whereas ‘Enrollment_
Number’ is the foreign key. This foreign key can be used
to set a relation between two tables.
• Candidate Key – All the field values that are
eligible to be the primary key are the candidate
keys for that table. Such fields can neither be left
blank nor can have duplicate values. So in the
table Student Marks, Enrollment Number and
Roll Number both are candidate keys.
• Alternate Key – Out of the candidate keys, one
or two are made as primary keys. The others are
the alternate keys. Hence, if Roll Number is made
as the primary key, Admission Number is the
Alternate key.

Objects of an RDBMS
An object in a database is a structure or a feature that
is used to store, represent or retrieve data. In fact a building blocks
database is a collection of these objects that work on
multiple sets of data related to each other. Various
objects in a database are as discussed below:
• Table – As mentioned before, a table is the basic
unit of any DBMS. The data is first stored in tables
Database ManageMent systeM Using LibreOffice Writer 151

2023-24
notes in row and column format. A column represents
a field or an attribute while a row represents
a record.
• Forms – A form is a feature of a database using
which we can enter data in a table in an easy
and user friendly manner. A form consists of text
boxes, labels, radio buttons, list boxes, check
boxes etc. that give a user friendly interface for
entering data. The data entered through the forms
is stored in tables.
• Queries – A query is used to retrieve the desired
information from the database. In simple terms,
it is a question asked from the database. For
example, if we want to view the names of only
those students who have scored more than
50 marks, then we post a query. The data set
matching the given criterion is retrieved from the
table and displayed on the screen.
• Reports – The output of a query may be displayed
in the form of reports. The usual result of the
query is in the form of rows and columns. But
if we want the report to be formal and in proper
layout, then we can use the Reports feature
of RDBMS.
Let’s Practice
Consider the following table and answer the questions that
follow.
Item Discount
Name Price Quantity
No. (in%)
A001 Pen 20 12 0
A003 Pencil 15 5 1
A010 Notebook 50 25 5
From the above table, identify the primary key. Justify
your choice.
How many fields and how many records does the table have?

summary
• The raw facts constitutes data.
• Information is the processed or organised form
of data.
• A database is a collection of logically related data
items stored in an organised manner.
152 Domestic Data entry operator – class X

2023-24
• The software that is used to create, update and notes
retrieve data is known as database management
system (DBMS).
• Some of the common examples of DBMS are MS
Access, Open Office or LibreOffice Base, Oracle,
Ingress, MySQL.
• Data Model is the structure of database and it
describes the manner in which data will be stored
and retrieved.
• There are different data models, such as
hierarchical data model, network data model and
relational data model.
• In Hierarchical Data Model, the data is organised
into a tree like structure. The data is stored in the
form of linked records.
• In Network Data model, multiple records are
linked to same master file.
• The Relational data model is based on the
principle of setting relationships between two or
more tables of the same database.
• Entity is a real world object about which
information is to be stored in a database.
• The details associated with the entity are called
attributes.
• A table is a collection of logically related records.
It is organised as a set of columns, and can have
any number of rows.
• A field is the smallest entity in the database.
These are individual record characteristics and
are presented as columns within a table.
• Data values are the raw data represented in
numeric, character or alphanumeric form.
• The data values for all the fields related to a
person or object is called a record. It is presented
as rows within a table.
• A primary key is a field that uniquely identifies a
row in a table.
• This foreign key helps to build a relation between
two or more tables in a database.
• All the field values that are eligible to be the
primary key are the candidate keys for that table.

Database ManageMent systeM Using LibreOffice Writer 153

2023-24
notes • Out of the candidate keys, one or two are made as
primary keys. The others are the alternate keys.
• An object in a database is a structure or a feature
that is used to store, represent or retrieve data.
The various objects in a database are tables,
forms, reports and queries.
• A form is a feature of a database using which
we can enter data in a table in an easy and user
friendly manner.
• A query is used to retrieve the desired information
from the database.
• The output of a query may be displayed in the
form of reports.

Check Your Progress


A. Multiple choice questions

1. Which of the following can be considered as an example


of a database?
(a) Dictionary
(b) Telephone directory
(c) Marks Register
(d) Newspaper
2. Which of the following is NOT a DBMS?
(a) MS Access
(b) Open Office Base
(c) MS Excel
(d) MySQL
3. DBMS stands for ______________________.
(a) Data and Books Management System
(b) Database Management System
(c) Duplicate Books Management System
(d) Data Management Multi System
4. Which of the following data models sets a relation between
the two or more tables?
(a) Relational Data Model
(b) Network Data Model
(c) Hierarchical Data Model
(d) Connection Data Model
5. The details associated with an entity are called
____________.
(a) Table
(b) Attributes
(c) Records
(d) Primary key

154 Domestic Data entry operator – class X

2023-24
6. A __________ is represented as rows in a table. notes
(a) field
(b) attribute
(c) record
(d) candidate key
7. In which of the following forms can a data value be
represented?
(a) Numeric
(b) Character
(c) Alphanumeric
(d) All of the above
8. Which of the following uniquely identifies a row in a table?
(a) Primary key
(b) Alternate key
(c) Foreign key
(d) Candidate key
9. A ___________is a feature of a database using which we can
enter data in a table in an easy and user friendly manner.
(a) query
(b) report
(c) form
(d) field
10. A _____________ is a question asked from a database.
(a) query
(b) report
(c) form
(d) field

B. State whether the following statements are True or False

1. A database cannot be organised.


2. Data is the collection of raw facts.
3. A table can be created without a primary key.
4. Two tables can be related in a network data model.
5. MS Access is an example of a database.

C. Fill in the blanks

1. The raw facts constitutes _____________.


2. An _____________ is a real world object about which
information is to be stored in a database
3. The output of a query may be displayed in the form of
________.
4. The data values for all the fields related to a person or
object is called a _________.
5. All the field values that are eligible to be the primary key
are the ___________ keys for that table

Database ManageMent systeM Using LibreOffice Writer 155

2023-24
notes D. Answer the following questions

1. Define the terms


(a) Database
(b) Data redundancy
(c) Report
2. Give one point of difference between
(a) Data and Information,
(b) Form and Query,
(c) Network and hierarchical data model
3. Give any four advantages of a DBMS.
4. Consider the table given below and answer the questions
that follow
Table: Library
Book_Id Book Name Author Name Price Publisher
F001 Pride and Prejudice Jane Austen 550 ABC
S004 Amazing Astronomy E. Shane 1050 ABC
C005 IT and Mankind MHA Diwaan 2500 HYM
(a) Name the fields in the given table.
(b) Which field should be made the primary key?
(c) Is there any alternate key in the table?
(d) How is primary key different from foreign key? Explain
with example.

156 Domestic Data entry operator – class X

2023-24

You might also like