Delhi Public School
Nacharam
Class X
Subject-IT(402)
Topic:DBMS
Notes
Answer the following questions
1. Write the advantages of Database Management System
Ans:
● 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 the number of tables.
This is called as data redundancy. This can be reduced by using DBMS
tools.
● Data Consistency – By minimising data redundancy, chances of
inconsistent data being stored is reduced. For example, it should not
happen that the name of the student is changed in one table and not in
another. Such inconsistency is reduced by using a DBMS.
● 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 fields can be assigned
when a database is planned. So, whether or not valid data is being entered
can be checked at the data entry stage. This increases the validity of the
database.
● Security – Unauthorized access can be controlled by assigning passwords
to the users. The data might be translated in such a manner that
unauthorized users are not able to read it. This is known as encryption.
Both these measures increase the security of the database.
2. What do you understand by Data Model. Explain different Data Models
Ans: A database can be designed in different ways depending on the data being
stored. This structure of database is known as data model.
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. A record is a collection of
fields and its data values. All these records are linked to each other at various
levels, thereby forming a hierarchy.
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.
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 this model in detail.
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.
3. Define the following terms with respect to Objects of RDBMS
a. Table – As mentioned before, a table is the basic unit of any DBMS.
The data is first stored in tables in row and column format. A column
represents a field or an attribute while a row represents a record.
b. 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.
c. Queries – A query is used to retrieve the desired information from
the database. In simple terms, it is a question asked from the
database
d. 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
4. Explain the following Keys in RDBMS
a. Primary Key – A primary key or simply a key is a field that uniquely
identifies a row in a table. The key identifier can be the value of a
single column or of multiple columns. The primary key is a unique
identifier for the table. The column or 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 primary key nor
can data value for such field be left blank. If, in a table we use more
than one fields to identify a record, it is known as a composite key.
b. 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 is known as the foreign key. This foreign key helps to build a
relation between two tables.
c. 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
d. 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.
Starting with LibreOffice Base
5. What is a Data type? List the various data types
Ans: A data type refers to the type of data that will be stored in that
particular field. The memory size of a field varies according to its data type
Text Data Type – The text data is a combination of letters, numbers or
special characters. No arithmetic calculations can be performed on text
data
Numeric Data Type – Numeric data types consists of numbers. The numbers can
be integer or real numbers on which any type of arithmetic calculations can be
performed.
Currency Data Type – The currency data type indicates the monetary values and
can be stored using currencies of various countries. For example, $100, £ 500 or
Rs. 25.50.
Date Data Type – This data type is used to indicate dates and time. For example,
12/25/2019, 08:45 AM. The data and time can be stored in various formats.
Table 9.3 list various forms of date data type.
Boolean – In Boolean data type there can be only two values- True or False. This
also can be given in multiple formats like Yes/No, True/False, On/Off.
Binary – The Binary data type used to store digitized images and sounds that
comes as long string of zeros and ones. It is possible to store photos of the
products or employees, or sound snippets or voice messages in Base database.
6. What is the use of navigation box with respect to tables in a database?
Ans: The black pointing arrow just before the field name is the record pointer. To
navigate through various records of the table, we use the navigation box present
at the bottom of the datasheet window.
The various components of Navigation Box are as follows:
Record Selector Box – This is the text box where the currently active record
number is displayed. We may enter the record number that we want to see in this
text box.
Navigation Buttons – These are used to scroll vertically in the table.
Working with Multiple Tables
7. Give any two advantages of relating a table in a database
Ans: There are various advantages of relating tables in a database
● A relationship can help prevent data redundancy.
● It helps prevent missing data by keeping deleted data from getting out
of synch. This is called referential integrity.
● Creating relationships between tables restricts the user from entering
invalid data in the referenced fields.
● Any updation in the master table is automatically reflected in the
transaction tables.
8. How is redundancy or inconsistency controlled in a database? Explain
with an example.
Ans: While working with multiple tables, you need to check the redundancy
and inconsistency of data. The record for a particular entity should neither
be repeated nor different data values should appear for a single entity in
the database. This is done by setting relationship between the tables of a
database. The most important prerequisite for setting a relationship is that
there must be a common field(s) between the two tables to create a
relationship.
consider an example of a database containing following two tables–
Student_Details and Student_Result
Student_Details Table
Student_Result
Once the relationship between the two tables has been set, the integrity of
data will be managed by the DBMS. That means once a student’s record
has been entered in the Student_Details table, only then that particular
Admission No can be entered in the Student_ Result table. The record
pertaining to Admission No in Student_Details table is considered as the
master record while the corresponding record in the related table
(Student_Result) is the transaction record. Therefore Student_Details is
called the master table and Student_ Result is called the transaction table.
9. Define referential integrity. Who maintains referential integrity in a
database?
Ans: According to the principle of referential integrity, no unmatched foreign
key values should exist in the database.
Once the relationship between the two tables has been set, the integrity of
data will be managed by the DBMS. Once the relationship between the two
tables has been set, the integrity of data will be managed by the DBMS.
LibreOffice Base will allow only that corresponding record to be entered in
the transaction table which already exists in the master table.
LibreOffice Base gives us the following four options to choose from to
maintain referential integrity in such cases.
No action – This is the default option. This option states that a user
should not be allowed to update or delete any record in the master table if
any related record exists in the transaction table.
Update cascade – This option allows the user to delete or update the
referenced field but along with it all the related records in any of the
transaction tables will also be deleted or updated.
Set NULL – This option assigns NULL value to all the related fields if the
master record is deleted or updated.
Update cascade – This option allows the user to delete or update the
referenced field but along with it all the related records in any of the
transaction tables will also be deleted or updated.
Set NULL – This option assigns NULL value to all the related fields if the
master record is deleted or updated.
10. Differentiate between one to one relationship and one to many
relationship. Give suitable examples to explain your answer.
Ans:In this type of relationship, one specific record of a master table has
one and only one corresponding record in the transaction table. For
example, the record for Admission_No in the master table (Student_Detail)
will have only one corresponding record of same value of Admission No in
the transaction table of Student_ Result. This is because no two students
will be given same admission number. Similarly one person can have only
one ticket to get entry into a stadium to view the match. So relationship
between Student and Admission number and a person and his ticket
number will be one-to-one relationship
This is one of the most common types of relationship between the tables in
a database. As the name says, in this type of relationship, one specific
record of the master table has more than one corresponding records in the
related transaction table. For example, one teacher can teach multiple
students or multiple classes, or one person can sell multiple products. So
we can say that there is a one to may relationship between a teacher and
class or teacher and student or seller and products
11. Explain many to many relationship with an example.
Ans:In this type of relationship, there will be multiple records in the master
table that correspond to multiple records in the transaction table as well.
Generally this type of relationship is set when certain records have to be
saved more than once in both the related tables. For example, a teacher in
a school may hold multiple responsibilities such as class teacher, an
activity incharge or examination in-charge. For each responsibility the
teacher might be attached with multiple students. So this type of
relationship will be many to many relationship. Similarly a shopkeeper may
sell multiple products to multiple customers. So many-to-many relationship
exists between a product and a customer.
Queries in Base
12. Define a query? What is the need of creating a query in a database?
Ans:A query is used to retrieve and display data from one or more tables in
a database.
LibreOffice Base allows us to create a query and even save it as an object
in a database.It helps us to run the query multiple times as and when
required. Using a query, we can specify the fields that we want to display
and also the criterion based on which the records to be filtered. The
information may be retrieved from a single table or from multiple tables.
Also the result of the query is displayed in tabular form with field names in
columns and the records in rows.
13. Name any four mathematical functions that can be applied to numerical
data in a query.
Ans:
Four mathematical functions that can be applied to numerical data in a
query from the document are:
1. SUM - Calculates the total of a range of values.
2. AVERAGE - Computes the mean of selected values.
3. COUNT - Counts the number of values within a specified range.
4. MAX/MIN - Identifies the maximum or minimum value within a set.
These functions help in summarizing and analyzing numerical data
efficiently in database.
14. Name the three ways of creating a query in LibreOffice Base?
Ans:A query can be created in three ways.
(i) Using a Wizard
(ii) In Design View
(iii) In SQL view
15. What is the use of Alias row in the Design grid of the Query Design
window?
Ans:In the Query Design window, the **Alias row** in the Design grid is
used to assign an alternative name, or alias, to a field. This alias can
simplify or clarify column headings in query results, especially when field
names are long, complex, or not self-explanatory. By using an alias, you
can create more readable outputs without changing the actual field names
in the underlying table.
Forms and Reports
16. Give one difference between a form and a report.
Ans:
● A form is an object of the database that has a user friendly interface
where data can be entered and seen in an attractive and easy-to-
read format.A form contains field controls arranged in a presentable
and user friendly manner.
● A report is used to present the retrieved data in an attractive and
customized manner
17. What is a field control with respect to forms?
Ans;A field control in the context of forms refers to a component that
represents a data entry point on a form, typically consisting of a label and a
corresponding text box or input area for the field value. This setup guides
users on what type of data should be entered in each part of the form,
where the label describes the field, and the text box is linked to the
corresponding field in the underlying database table.
18. Which tool on the Forms Record toolbar is used to insert text on the
form?
Ans:Adding text to the form While designing a form, we may need to enter
titles, headings or subheadings. It is called as Labels.It is possible to create
Labels in the form while designing.
● Click the Label ( ) tool on the Form Controls tool box
● Double click on box to open the Properties: Label Field dialog box.
● Type the title in the Label property
19. Name the two ways to create a form in LibreOffice Base.
Ans:There are two ways to create a form:
● Using a wizard
● Using the Design View
20. What is the difference between a static and a dynamic report?
Ans:s Dynamic report means as the field values in the base table or query
change, the report will also change automatically. If you don’t want
automatic updation of the report, choose the Static option.. By default the
type of report is Dynamic.
21. Write the function of Forms Controls toolbar and Records toolbar.
Ans:
● The forms control toolbar contains various tools to add or edit
controls on the form.For example we can add a calendar for the date
field,Adding text to the form etc.
● The Records toolbar contains the navigation control buttons in the
extreme left. With the help of these buttons, we can traverse and view
the records in the file. As we move from one record to another, the
record number in the record text boxes changes. It also shows the
navigation control buttons, there are commands to add a new record,
save a record, delete a record and so on.