Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Unit 3 Notes DBMS

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

Unit – 3: Database Management System Using LibreOffice Base

Chapter 8 – Introduction to Database Management System

Answer the following questions:


1. Define the terms.
a) Database
b) Data Redundancy
c) Report
a) Database: A database is a collection of logically related data items
stored in an organized manner.
b) Data Redundancy: Data redundancy is when multiples copy 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 one point of difference between:


a) Data and Information
b) Form and Query
c) Network and Hierarchical data model
Ans:
a) Data and Information
Data Information
The raw facts constitute data Information is the processed or
organized form of data.
b) Form and query
Form Query
Form is the user-friendly data A query is used to retrieve the
entry screen that allows to enter desired information from the
the data in the table easily by any database based on some criteria.
user.

c) Network and Hierarchical data model


Network Data Model Hierarchical Data Model
In Network data model, multiple In Hierarchical Data Model, the
records are linked to same master data is organized into a tree like
file. 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. Organised Storage- The data in the database is stored in an
organised manner, so that retrieval of the required data is fast and
accurate.
II. Minimal data Redundancy – In the event requiring the same data
field in several tables the data field might get repeated in number
of tables. This is called a 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 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 Jane Austen 550 ABC
Prejudice
S004 Amazing E. Shane 1050 ABC
Astronomy
C005 IT and MHA Diwaan 2500 HYM
Mankind
a) Name the field in the given table.
Ans: Book_Id, Book Name, Author Name, Price, Publisher
b) Which field should be 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 A foreign key establishes a
records in a table uniquely. relationship between tables by
referencing the primary key of
another table.
The field designated as Primary It can contain duplicate values.
Key must contain Unique Values
It cannot contain Null values. It can contain NULL values.
A table can have only one Primary A table can have more than one
key. Foreign key.
Example:
Table: Student
Foreign Key
Roll No Name Stream_Code
1 Neha S101
2 Nisha S102
3 Soniya S103
4 Pooja S101
5 Priya S102

Primary Key
Table: Stream
Stream_Code Stream_Name
S101 Humanities
S102 Commerce
S103 Non_Medical

*********************

Unit-3 Chapter – 9: Starting with LibreOffice Base

Answer the given questions

1. Differentiate between:
a) Memo and Varchar data type
Memo Varchar
Memo is used to store some It is used for relatively short
descriptive data. entries.
It can store more than 255 Varchar stores upto the
characters. Memo data type specified length. The number of
allows to store data up to 64,000 bytes allocated depend on the
characters. number of characters entered
by the user.
b) Number and Decimal
Ans:
Number Decimal
Number data type is used to Decimal data type includes
store integers or whole decimal places. Making it ideal
numbers. for financial calculations or any
calculation requiring precision.

c) Design View and Datasheet View


Design View Datasheet View
The Design view allows you to The Datasheet view is used to
view and modify the structure of enter the data into the table.
your table and to set field
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 a primary key that uniquely identifies a
record in the table. To make a particular field as the primary key, place
the mouse pointer before the field name, 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.

4. Write 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 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 records of
the table. Navigation box is present at the bottom of the datasheet
window.
****************

Unit-3_Chapter-10-Working with Multiple Tables


Answer the following questions.
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 relationships between tables restricts the user from entering
invalid data in the referenced fields.
c) Any updation in the master table is automatically reflected in the
transaction tables.
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 or updating a record in one table reflect the changes in all related
tables.
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.

3. Differentiate between one-to-one relationship and one to many


relationships. Give suitable examples to explain your answer.
Ans:
One- To – One Relationship One-To-Many Relationship
In this type of relationship, one In this type of relationship, one
specific record of a master table specific record of the master table
has one and only one has more than one corresponding
corresponding record in the records in related transaction
transaction table. table.

Example:
One –to-One
Table : Student Details

Admission Name Father’s Class DOB


No Name
10001 Abi D K Sona 10 12/3/2004
10002 Benny Taj 9 15/8/2005
11110 Simon B Reddy 10 6/4/2004

Here, Admission No is the Primary Key.

Table: Student_Result

Roll No Admission No Class Aggregate Marks


1 10001 10 87
2 11110 10 93

Here, Admission No is the Foreign Key, Roll No is the Primary Key


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.
One-to-Many:
Table: Teacher Details
Teacher_Id Teacher Name Subject
T002 Vanita English
T023 Annie Maths
T042 Benisha Chemistry
T054 Jency Biology
Table: Class Allocation
Class Section Subject Teacher_Id
10 A English T002
10 A Hindi T003
10 B English T002
10 A Maths T023

For Example, a teacher can teach multiple students or multiple classes. So we


can say that there is a one to many relationship between a teacher and class or
teacher and student.
4. Explain Many to Many relationships 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.

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
relationships.
Similarly, a shopkeeper may sell multiple products to multiple
customers. So, many – to- many relationships exist between a product
and a customer.

**********************

Unit – 3 Chapter – 11- Queries in Base

1. Define a query. What is the need of creating a query in a database?


Ans: 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 records
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 steps 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

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 detail of the query: This section contains a summary
about the query that has been created.
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.

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
6. Name the three ways 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

Unit-3-Chapter -12 – Forms and Reports

1. Give one difference between a form and a report.


Ans:
Form Report
Form is the user-friendly data The Report helps to present the
entry screen that allows to retrieved data in a user friendly,
enter the data in the table understandable and formatted
easily by any user. manner.
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 that specifies the data that should be entered in
the field value text box.
A field value textbox is linked to the respective field in the table.
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.
4. 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
5. What is the difference between a static and a dynamic report?
Static Report Dynamic Report
Static Reports are the fixed Dynamic Report Updates
snapshot of data at a specific automatically based on database
time. changes.
In Static Report, as the field values In Dynamic Report, as the field
in the base table or query values in the base table or query
changes, the report will not changes, the report will also
change automatically. change automatically.
It contains ore-defined set of It reflects current state of the
data. database.
It requires manual re-running or It gets updated automatically
editing. based on user interaction.
This is not the default value of This is the default value of report.
report.

6. Write the function of Forms Controls toolbar and Records toolbar.


Ans:
Forms Control Toolbar: This toolbar contains various controls that can
be added to the form.
Example: Adding a calendar to a date 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 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.
****************

You might also like