DATABASE MANAGEMENT SYSTEM
1. Define the different types integrity in Libre Office Base.
Ans: Here are some types of integrity in LibreOffice Base:
Entity integrity: Ensures that each row in a database table is uniquely identifiable. This is done
by ensuring that the primary key cannot be null.
Referential integrity: Ensures that data relationships in databases are consistent. This is done
by ensuring that for every foreign key value in a child table, that value has the same primary
key value in the parent table.
Domain integrity: A type of integrity constraint that is part of the relational data model.
User-defined integrity: A type of integrity that can be applied to database management.
2. Define the terms
(a) Database 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
of DBMS are MS Access, Open Office or LibreOffice Base, Oracle, Ingress, MySQL.
(b) Data redundancy: Data redundancy occurs when the same data field is repeated in multiple
tables in LibreOffice Base. To reduce data redundancy, you can use DBMS tools.
Minimizing data redundancy can help reduce the chances of storing inconsistent data. For
example, it's important that a student's name is changed in all tables, not just some.
(c) Report: 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.
3. Give one point of difference between-
(a) Data and Information:
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, schedules, worksheet,
bar charts, invoices, account returns etc.
(b) Form and Query: 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.
(c) Network and hierarchical 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.
4. Give any four advantages of a DBMS.
Ans: 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 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.
5. Differentiate between:
(a) Memo and Varchar data type
(b) Number and Date data type
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. For example,
10, -34.8, 90.6789 , -86 are of numeric data type.
Dates and time- For example 12/25/2019, 08:45 AM. The data and time can be stored in
various formats. Given Table list various forms of date data type.
(c) Design View and Datasheet view of a table
A design view provides access to create or modify tables, forms, or any other database
objects. Whereas in datasheet view all these functions cannot be seen easily. Datasheet view
allows data entry and editing, only data can be edited. The format of the data cannot be
changed.
6. Name the menu items present on the Base User Interface.
Ans: • Title Bar – The title bar displays the name of a database and an application in which it is
made. The windows buttons to maximize, minimize or close the window are located on the
right corner of the title bar.
• Menu Bar – The menu bar appears below the title bar. It consists of seven menu items – File,
Edit, View, Insert, Tools, Window and Help. All these menu items contain commands that help
to perform various operations on the database.
• Standard Toolbar – It is located below the menu bar. It is used to access frequently used tools.
• Status Bar – It is located at the bottom of the interface window. It displays information about
the type of view of the object in the database.
Database Pane – The database pane is located on the left side of the window. LibreOffice Base
is the collection of related data objects known as Tables, Forms, Queries, Reports and
application modules.
Depending on the object that is selected, the respective Task Pane and Object Area displaying
the created object appears.
7. What is a Primary Key? How can we define a primary key in a table?
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. 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 fields to identify a record, it is known as a composite key. For example, we
may form a composite key consisting of fields roll no. and name.
To make a particular field as the primary key-> place the mouse pointer before the field name,
say Event Id in our above example and right click. A pop up menu appears.
Select the Primary Key option from pop up menu. A key icon appears before the field name
indicating that it is a primary key.
8. Define:
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.
A candidate key is a minimal set of attributes that can uniquely identify a table record. A table
can have multiple candidate keys, but only one primary key.
Alternate key
An alternate key is a candidate key that is not chosen as the primary key. It is also known as a
secondary key. An alternate key's primary purpose is to provide an alternative unique identifier
for a record within a table
9. 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 – T his 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.
10. Give any two advantages of relating a table in a database.
There are various advantages of relating tables in a database. Few of them are as given below.
• 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. We will study in
detail about referential integrity later in the chapter.
• 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.
11. Explain referential integrity. How referential integrity is maintained in a database?
Referential integrity refers to the relationship between tables. Because each table in a database
must have a primary key, this primary key can appear in other tables because of its relationship
to data within those tables. When a primary key from one table appears in another table, it is
called a foreign key.
Foreign keys join tables and establish dependencies between tables. tables can form a hierarchy
of dependencies in such a way that if you change or delete a row in one table, you destroy the
meaning of rows in other tables.
LibreOffice Base gives us 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.
• Set default – This option assigns any fixed default value to all the related fields if the
master record is deleted or updated.
12. Explain in detail different types of relationships in Base.
Refer Sumita Arora book for the answer
13. Arun runs a small bookstore and wants to maintain an inventory of books. He needs to
record information such as book titles, authors, ISBNs, publication dates, prices, and
stock levels. However, he is not familiar with database management systems. Explain the
following concepts to help him understand DBMS:
a) What is DBMS?
b) What are the advantages of using DBMS?
c) Name any two database programs that can be used to create a table and store the data
according to his requirements.
d) Which field can be set as a Primary Key?
Refer Sumita Arora book for the answer