0% found this document useful (0 votes)
43 views15 pages

Database Sinjini

The document provides an introduction to database management systems and describes different data models including hierarchical, network, and relational models. It explains that a database is a collection of logically related data stored in an organized manner. A database management system (DBMS) is software that allows users to create, access, manage, and control databases. Relational databases store data in related tables and allow data to be accessed and reassembled in many different ways without having to reorganize the database tables.

Uploaded by

S Karan
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)
43 views15 pages

Database Sinjini

The document provides an introduction to database management systems and describes different data models including hierarchical, network, and relational models. It explains that a database is a collection of logically related data stored in an organized manner. A database management system (DBMS) is software that allows users to create, access, manage, and control databases. Relational databases store data in related tables and allow data to be accessed and reassembled in many different ways without having to reorganize the database tables.

Uploaded by

S Karan
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/ 15

3 Database

Management System
using LibreOffice Base

INTRODUCTION
Management of data is of prime importance for any

storage, accurate and fast retrieval is the primary


objective of any database management system. In this
unit you will learn about various methodologies of data

source application.

database management system, different database model


with the focus on relational database. It explains the
concept of primary key and foreign key and the various

to create database and tables, enter and edit the data in

have also been discussed.


After creating a table, you can edit or delete the table
and set up relations between the tables to control data
redundancy and inconsistency for proper maintenance
of a database. In the third chapter, you will learn how
NOTES
setting up relations.
In the fourth chapter, you will learn to retrieve the
data from the database as per your requirement by

then displayed in the desired manner.


In the last chapter, you will learn to create Forms

friendly data entry screen that allows to enter the data


in the table easily by any user. The Report feature
helps to present the retrieved data in a user friendly,
understandable and formatted manner.

DATABASE MANAGEMENT SYSTEM USING LIBREOFFICE WRITER 143


Introduction to Database

8 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

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
information. Other forms of information are pay-slips, NOTES
schedules, worksheet, bar charts, invoices, account

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

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

Databases and DBMS


A database is a collection of logically related data items
stored in an organised manner. The information being

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

We all know that it is easy to remember names of our

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

DATABASE MANAGEMENT SYSTEM USING LIBREOFFICE WRITER 145


Let us discuss som

stored in an organised manner, so that retrieval


of the required data is fast and accurate.

out maximum or minimum value, average or


mean using a database.

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.

This is called as data redundancy. This can be

redundancy, chances of inconsistent data being


stored is reduced. For example, it should not
happen that the name of the student is changed in

Let us consider a situation where, for example,

table and Library table. ‘Ram Lal Kumar’ wants to


change his name to ‘Ram Kumar’ has recently shifted

has to change the name of the student separately in the

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


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 11/11/2018 24/11/2018
Mathematics 12/11/2018 30/12/2018

properly organised, saving, reading and searching

inconsistency can be minimised in a database,


the data is retrieved accurately from the database.

be checked at the data entry stage. This increases


the validity of the database. For instance, we may
set up a restriction while creating the table that
the amount of fees being entered should be more
than 1000.

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

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
is known as data model that describes the manner in
which data will be stored and retrieved.
A data model consists of components for describing
the data, relationships among them and the constraints
that hold data. There are different data models such
as hierarchical data model, network data model and
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.

DATABASE MANAGEMENT SYSTEM USING LIBREOFFICE WRITER 147


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.
Likes Ltd.

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

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.
Likes Ltd.

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


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

termed as relational database model.

Relational Database Terminology


Let us get familiar with some of the common terms used

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

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

etc., are attributes associated with the entity


student. These attributes are represented in the
form of columns.
Table – A table is a collection of logically related
records. It is organised as a set of columns, and
can have any number of rows. For example, the
Employee table can have columns, namely name,
designation, department and have records or
rows having data of 100 employees.
Field or Columns or attributes –
smallest entity in the database. A collection of

a table and a collection of tables make a database.


Fields are individual record characteristics and
are presented as columns within a table. Data

holds the data values of one type of data for


several persons. For example, in the Employee

employees of an organisation.
Data Values – Data values are the raw
data represented in numeric, character or
DATABASE MANAGEMENT SYSTEM USING LIBREOFFICE WRITER 149
alphanumeric form. Examples of data values are

Record or Row –
related to a person or object is called a record. It is
presented as rows within a table. A record holds

or object in a table. For example, in the Employee

and this forms one record.


Primary Key – A primary key or simply a key is

column or of multiple columns. The primary key

combinations of columns that form the primary


key have unique values. At any time, no two rows
in the table can neither have same values for the

left blank. For example, in a student table, each


student has a unique roll no., which forms the
primary key. If, in a table we use more than one

key. For example, we may form a composite key

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

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

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


Foreign Key –
of one table can be used to uniquely identify

is known as the foreign key. This foreign key helps


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
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

Number’ is the foreign key. This foreign key can be used


to set a relation between two tables.
Candidate Key – Al
eligible to be the primary key are the candidate

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
database is a collection of these objects that work on
multiple sets of data related to each other. Various
objects in a database are
Table

DATABASE MANAGEMENT SYSTEM USING LIBREOFFICE WRITER 151


NOTES in row and column format. A column 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

if we want the report to be formal and in proper


layout, then we can use the Reports feature

Let’s Practice
Consider the following table and answer the questions that
follow.
Item Discount
Name Price Quantity
No. (in%)
A001 20 12 0
A003 15 5 1
A010 Notebook 50 25 5
From the above table, identify the primary key. Justify
your choice.

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
The software that is used to create, update and NOTES
retrieve data is known as database management

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

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.

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.

person or object is called a record. It is presented


as rows within a table.

row in a table.
This foreign key helps to build a relation between
two or more tables in a database.

primary key are the candidate keys for that table.


DATABASE MANAGEMENT SYSTEM USING LIBREOFFICE WRITER 153
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

2.

3.

4. Which of the following data models sets a relation between

5. The details associated with an entity are called

154 DOMESTIC DATA ENTRY OPERATOR – CLASS X


6. NOTES

7. In which of the following forms can a data value be

8.

9.
enter data in a table in an easy and user friendly manner.

10.

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.

C. Fill in the blanks

1.
2.
information is to be stored in a database
3. The output of a query may be displayed in the form of

4.

5.

DATABASE MANAGEMENT SYSTEM USING LIBREOFFICE WRITER 155


NOTES D. Answer the following questions

1.

2. Give one point of difference between

3.
4. Consider the table given below and answer the questions
that follow
Table: Library
Book_Id Book Name Author Name Price Publisher
F001 Jane Austen 550
Amazing Astronomy 1050
C005 IT and Mankind MHA Diwaan 2500 HYM

with example.

156 DOMESTIC DATA ENTRY OPERATOR – CLASS X

You might also like