UNIT-3 (Database Management System)
CH-8 (Introduction to DBMS)
MCQ:-
1. Which of the following cannot 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 stand for:-
a. Data and Books Management System c. Database Management System
b. 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 c. Network Data Model
b. 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
6. A………………..is represented as rows in a table.
a. Field b. Attribute c. Record d. Candidate key
7. In which of the following forms can a 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
Question/Answers:-
1. Define the terms.
a. Database b. Data Redundancy c. Report
Ans. (a). Database:- A database is a collection of logically related data items stored in an
organized manner.
(b). Data Redundancy:- Data Redundancy is when multiple copies of the same
information are stored in more than one place at a time.
(c). Report:- The Report helps us to present the retrieved data in a user friendly,
understandable and formatted manner.
2. Give on point of difference between:-
a). Data and information
b). Form and Query
c). Network and hierarchical data model
a).
Data Information
The raw facts constitute data. Information is the processed or organized form
of data.
b.)
Form Query
Form is the user-friendly data entry screen that A query is used to retrieve the desired
allows entering the data in the table easily by information from the database based on some
any user. criteria.
c).
Network data model Hierarchical Data Model
In Network data model, multiple records are In Hierarchical data model, the data is
linked to same master file. organized into a tree like structure. The data is
stored in the form of linked records.
3 . Give any four advantages of a DBMS.
Ans. Four advantages of DBMS are:-
i. Organized Storage:- The data in the database is stored in an organized manner, so that
retrieval of the required data is fast and accurate.
ii. 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.
iii. Data Consistency:- By minimizing 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.
iv. Data Sharing:- If the same data set is required for different applications, then the database
can be shared with other applications. Hence using a data a database means making once
and using it repeatedly for multiple applications.
4. Consider the table given below and answer the questions that follows-
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.
Ans. Book_Id, Book Name, Author Name, Price and Publisher
b) Which field should made the primary key?
Ans. Book_id should be made as Primary key because it identifies each record in a table
uniquely.
c) Is there any alternate key in the table?
Ans. Book Name field can be an Alternate key in the given table.
d) How is primary key different from foreign key? Explain with example.
Ans.
Primary Key Foreign Key
Primary key is used to identify the record in a A foreign key establishes a relationship
table uniquely. between tables by referencing the primary key
of another table.
The field designated as primary key must It can contain duplicate values.
contain unique values.
It cannot contain NULL values. It can contain NULL values.
A table can have only one Primary key. A table can have more than one Foreign key.
Example:- Table(Student)
Table (Stream)
Roll No. Name Stream Code
1 Neha S101 Stream Stream_Name
2 Nisha S102 Code
3 Soniya S103 S101 Humanities
4 Pooja S101 S102 Commerce
S103 Non-Medical
UNIT-3 (Database Management System)
CH-9 (Starting with LibreOffice Base)
Multiple Choice Questions:-
1. Which of the following is NOT a type of text data type?
a. Memo b. Varchar c. Float d. Char
2. A currency data type can only store monetary data that is in dollars.
a. True b. False c. Neither a nor b d. Both a and b
3. Which of the following data can a date data type store?
a. Date b. Time c. Both a and b c. Neither a nor b
4. Which of the following is true about LibreOffice Writer?
a. It is a spreadsheet software c. It is a free and open source software
b. It can store only character data d. It is licensed software.
5. Which of the following methods can be used to create a table in base?
a. Using a table wizard b. Design View c. Both a and b d. Neither a and b
6. The related object of a database can be seen in ……….pane of the base database window.
a. Database b. Task c. Menu Bar d. Title bar
7. Which is the shortcut key to open an existing database?
a. Ctrl+D b. Ctrl+O c. Ctrl+E d. Ctrl+F
8. The design view of table creation window in LibreOffice base is divided into……..section
or pane?
a. 2 b. 3 c. 4 d. 5
9. While entering record in a table, we can move to the next field by pressing the ….key.
a. Tab b. Ctrl c. Enter d. Shift
10. Which of the following is true about primary key of a table?
a. Every table must have a primary key. C. The data value in primary key field cannot
be duplicate.
b. All primary key field cannot be blank d. All of the above.
Question/Answers:-
1. Differentiate between:-
a. Memo and varchar Data type.
b. Number and decimal Data type.
c. Design view and Datasheet view of a table.
a.
Memo Varchar
Memo is used to store some descriptive data It is used for relatively short entries.
It can store more than 255 characters. Memo data Varchar store upto the specified length. The
type allow to store text data up to 64000 characters. number of byte allocated depends on the number
of characters entered by the user.
b.
Number Decimal
Number data type is used to store integers or Decimal data type include decimal places,
whole numbers. making it ideal for financial calculations or
any calculation requiring precision.
c.
Design View Datasheet View
The design view allows you to view and modify The datasheet view is used to enter the data
the structure of your table and to set field into the table.
properties.
2. Name the menu items present on the Base User Interface.
Ans. The menu items present on the Base User Interface are:-
File, Edit, View, Insert, Tools, Window, Help
3. How can we define a primary key in a table?
Ans. Every table must have primary key that uniquely identify a record in the table. To
make the particular field as the primary key, place the mouse pointer before the field name
and right click. A popup menu appears. Select the primary key option from Popup menu. A
key icon appears before the field name indicating that it is a primary key.
4. Write the steps to sort the table in descending order of primary key.
Ans. Step 1. Open the table in datasheet view and Select the primary key field which you
want to sort.
Step 2. From the toolbar click sort descending icon to sort in the descending order of
selected field.
Step 3. The table will be sorted in the descending order of primary key.
5. What is the use of navigation box with respect to tables in a database?
Ans. The navigation box is used to navigate through various record of the table. Navigation
box is present at the bottom of the datasheet window.
Part-B (Unit-3)
CH-10(Working with Multiple Tables)
Multiple Choice Questions:-
1. Which of the following actions can be performed once the tables are created in a database?
a. Add a field in a table b. rename a table c. Delete a table d. All of above
2. Which of the following is checked by a DBMS?
a. Redundancy b. Inconsistency c. Both (a) and (b). d. Neither a and b.
3. Which of the following is required to set a relationship between the two tables?
a. Both the tables must be in different database b. both the tables must have a common field.
c. Both the tables must have the same name. d. Both tables must be stored in documents
folder only
4. If a record is added in a master table, which of the following is NOT true for transaction table,
a. The record in the master table is called the master record.
b. The corresponding record in transaction table can only be entered once.
c. The record in the transaction table is called the transaction record.
d. It is possible to add record in the master table.
5. Which type of relationship exists between a student and the subjects studied by him/her?
a. One to One b. One to Many c. Many to Many d. All of above.
6. Consider the following table. Which type of relationship can be established between the two tables?
a. One to one b. One to Many c. Many to Many d. All of the above.
Table 2: Item_Category
Table 1 Item
Item
Items Category_Code
Item_Code Cat_Name
Item_Name Item_Code
Price Cat_Disc
Qty
Category_Code
7. Which of the following menus contains the relationship options?
a. Edit b. File c. Tools d. View
8. The list of tables to be added is displayed in the …..dialog box in the Relationship screen.
a. Add tables b. Add Databases c. Both (a) and (b) d. none of above
9. In the relationship design screen the relationship between the two tables is done usig……operation.
a. Click b. Double click c. Drag & Drop d. Right Click
10. Which of the following is NOT an option that can be used to maintain referential integrity in a
database?
a. No action b. Set NULL c. Set Default d. Set value
Questions/Answers
Q.1. Give any two advantages of relating a table in a database:-
Ans. Advantages of relating a table in a database are:-
a). A relationship can help prevent data redundancy.
b). Creating relationship between table restrict the user from entering invalid data in the referential fields.
c). Any updation in the master table is automatically reflected in the transaction tables.
Q.2. How is redundancy or inconsistency controlled in a database? Explain with an example.
Ans. Relations are set up between the tables to control data redundancy and inconsistency. This helps in
proper maintenance of a database by checking that neither the records are duplicated nor there is variable
data value for a particular field in two or more tables. If you set up relations between tables, then adding
updating a record in one table reflect the changes in all the related tables.
Q.3. Define Referential Integrity. Who maintains referential integrity in a database?
Ans. Referential integrity is used to maintain accuracy and consistency of data in a relationship.
According to the principle of referential integrity, no unmatched foreign key values should exist in the
database.
The referential integrity in a database is maintained by DBMS.
Q.4. Difference between one –to-one relationship and one to many relationship. Give suitable
example to explain your answer.
Ans.
One-to-One Relationship One-to-Many Relationship
In this type of relationship, one specific record of a In this type of relationship, one specific record of
master table has one and only one corresponding the master table has more than one corresponding
record in the transaction table. records in the related transaction table.
Q.5. 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.
Example:- Table:- Department_incharge
Department Teacher’s ID
Examination T002
Discipline T765
Co-Curricular T056
Time table T002
Website Update T765
Table:-Activity-Duty
Activity Department Teacher_id
UT-1 Examination T002
TERM-1 Examination T002
Home Work Upload Website update T765
Timetable Upload Website update T765
Inter-house Dance Co-Curricular T056
Inter-class Debate Co-Curricular T056
Discipline duties Discipline T765
For example, a teacher in a school may hold multiple responsibilities such as class teacher, an activity in-
charge 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.
CH-11(Queries in Base)
MCQs-
1. Which of the following is refer to asking questions from the database?
a. Report b. Table c. Query d. Database
2. Which of the following are the ways to design a query?
a. Wizard b. Design View c. SQL d. All of the above.
3. Which is a flexible way to create a query?
a. Wizard b. Design View c. Both a and b d. Neither a and b.
4. In how many parts is the query design window divided?
a. One b. Two c. Three d. Four
5. Which of the following NOT true about queries?
a. It can be created using multiple tables.
b. Multiple queries can be created in a database.
c. A query can run multiple times.
d. A query once created cannot be edited.
6. Which of the following is the shortcut key to run the query?
a. F3 b. F4 c. F5 d. F6
7. Which of the following functions can be performed on numerical data while designing a
query?
a. Sum b. Minimum c. Maximum d. All of the above.
8. In a Query design wizard, which of the following buttons is clicked to move a field from
‘Available field’ list box to ‘Field in the query’ list box?
a. > b. < c. = d. {}
9. Which of the following relational operators canbe applied to set the criterion while
designing a query in LibreOffice Base?
a. > b. = c. != d. All of these
10. Which of the following dialog box is present when the Query Design window is opened
for the first time to design a query?
a. Add table b. Add Query c. Add Table or Query d. None
11. Which of the following step is not performed if there is no numerical data to be worked
upon in a query?
a. Selection of fields b. Giving Aliases
C Summarizing d. Selection of tables.
Quesiton/Answers:-
1. Define a query. What is need of creating a query in a database?
Ans. Query:- Query is used to retrieve the data from the database as per your
requirement by providing the desired specifications. Depending upon given
specifications, the specific records are searched from the database and then displayed in
the desired manner.
Need of creating a query in a database-As the number of record increases, finding the
desired information in a database becomes difficult. By using queries, we can retrieve the
data without going individually through each record in the table(s) and also display them
in desired format.
2. Rearrange the step given below so as to create a Query using a wizard.
a) Give Alias
b) Select the fields
c) Set the criterion
d) Set the sorting order
e) Give table name
Ans. a) Give table name b) Select the fields c) Set the sorting order
d) Set the criterion e) Give Alias
Q.3. What all information is seen in the overview (last step) of the query wizard?
Ans. The last step of the Query wizard displays the entire overview of the query. It includes the
following:-
a) Name of the Query:- if desired, type the new name in the text box,
b) The action to be performed after the wizard finishes:- By default display query option
will be selected. Click and select the modify query radio button if the query has to be
edited in the Design view.
c) Complete details of the query- This section contains a summary about the query that
has been created.
Q. 4 What is the use of Alias row in the Design grid of the Query Design window?
Ans. Alias row is used to display meaningful names in the output. An Alias is an alternative
name for a field in a query.
Q.5. Name any four mathematical functions that can be applied to numerical data in a
query.
Ans. Mathematical functions that can be applied to numerical data in a query are:-
*Count *Sum *Minimum *Maximum *Average
Q.6. Name the three way of creating a query in LibreOffice Base?
Ans. A query can be created in three ways:-
*Using a wizard * In Design View * In SQL View
CH-12(Forms and Reports)
Multiple Choice Questions:-
1. Which of the following toolbars contains the Label tool?
a. Standard Toolbar b. Forms Controls toolbar
C Records toolbar d. Formatting toolbar
2. The Record toolbar has the buttons to move to the
a. First Record b. Second Record c. Last Record d. All records
3. Which of the following is NOT true about forms?
a. It is the front end for data entry. B. It can contain only text fields.
C Graphics can be inserted on the form. D. It can contain only fixed num. of record.
4. Which of the following keys is pressed to select only textbox on the form?
a. Alt b. shift c. Ctrl d. Tab
5. Which of the following properties in the properties: Label Field text box is used to insert
a tool-tip on the form?
a. Tool Text b. Help Text c. Tool Tip d. Help Tip
6. Which of the following objects of LibreOffice Base is used to display data retrieved from
one or more tables in a presentable manner?
a. Query b. Form c. Report d. Panel
7. Which of the following values of Date Format property is selected to view a calendar on
the form?
a. Standard (short) b. Standard(long) c. Default d. Standard(Medium)
8. Which of the following commands on the Forms control toolbar is used to toggle between
Design View and Report view?
a. Design Mode b. Toggle Mode c. View Mode d. Print Mode
9. Using which of the following objects in a database, can a report be generated?
a. Tables b. Queries c. Both a and b d. Neither a nor b
10. Which of the following components open along with the Report Wizard?
a. Report Builder b. Add Fields dialog box c. Both a and b d. None of these
Answer the following questions:-
1. Give on difference between a form and a report
Ans.
Form Report
Form is the user-friendly data entry that The report helps to present the retrieved data
allow to enter the data in the easily by any in a user friendly, understandable and
user. formatted manner.
Q.2. What is a field control with respect to forms?
Ans. A form contains field controls arranged in a presentable and user-friendly manner. Each
field control consists of a label and the field value text box.
A label is a piece of text specifies the data that should be entered in the field value text box.
A field value text box is linked to the respective field in the table.
Q.3. Which tool on the Forms Record toolbar is used to insert text on the form?
Ans. Text Box tool is used to insert text on the form.
Q.4. Name the two ways to create a form in Libreoffice Base.
Ans. There are two ways to create a form:-
1. Using a wizard 2. Using the Design View.
Q.5. What is the difference between Static and Dynamic Report?
Ans.
Static Report Dynamic Report
Static Reports are the fixed snapshot of data Dynamic Report updates automatically based
at a specific time. on database changes.
In static report, as the field values in the base In static report, as the field values in the base
table or query changes, the report will not table or query changes, the report will
change automatically. change automatically.
It contains pre-defined set of data. It reflects current state of the database
It require manual re-running or editing It gets updated automatically base on user
interaction.
Q.6. Write the functions of Forms controls toolbar and Records toolbar.
Ans. Forms Control Toolbar:- This toolbar contains various controls that can be added to
the form. E.g. Adding a calendar to a data field, Adding text to the form, Adding a new
record using a form.
Records Toolbar:- The Records toolbar contains the navigation control buttons in the
extreme left, with help of these buttons we can traverse and view the records I the file, As we
update one record to another, the record number in the record toolbar changes.