0% found this document useful (0 votes)
0 views

Unit 3 (Database Management System)

The document provides an introduction to Database Management Systems (DBMS), defining key terms such as database, data redundancy, and report. It discusses the advantages of DBMS, differentiates between data types, and explains concepts like primary keys, foreign keys, and data models. Additionally, it covers practical aspects of using LibreOffice Base, including creating queries, forms, and reports.

Uploaded by

n47438032
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

Unit 3 (Database Management System)

The document provides an introduction to Database Management Systems (DBMS), defining key terms such as database, data redundancy, and report. It discusses the advantages of DBMS, differentiates between data types, and explains concepts like primary keys, foreign keys, and data models. Additionally, it covers practical aspects of using LibreOffice Base, including creating queries, forms, and reports.

Uploaded by

n47438032
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Unit-3

Session-1
(Introduction to Database Management System)
1. Define the terms

(a) Database

Answer: A database is a collection of logically related data items stored in an organised manner.

(b) Data redundancy

Answer: Data redundancy refers to the unnecessary repetition of data within a database. This can lead to
inconsistencies and increased storage costs.

(c) Report

Answer: A report is a formatted and organized presentation of data extracted from a database, typically used for
analysis, decision-making, and communication of information.

2. Give one point of difference between

(a) Data and Information

Answer:

Data Information
The raw facts constitute data. Information is the processed or
organized form of data.
For example: marks obtained by the report card/sheet is the information
students and their roll numbers is the
data

(b) Form and Query

Answer:

Form Query
A user interface in a database that allows A request to retrieve specific data from a
users to enter and modify data easily. database, often using a structured query
language (SQL).

(c) Network and hierarchical data model

Answer:

Network model Hierarchical model


In this model multiple records are linked In this model the data is organized into a
to same master file. tree, like structure. The data is stored in
the form of records.
3. Give any four advantages of a 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.

RAHUL SHARMA (ANAND SCHOOL FOR EXCELLENCE) P.G.T COMPUTER 1


• Security – Unauthorised access can be controlled by assigning passwords to the users.
• Increases Accuracy – Since data redundancy and inconsistency can be minimised in a database, the data is
retrieved accurately from the database.

4. Consider the table given below and answer the questions that follow Table:
Library
Book_ID Book_Name Author Name Price Publisher
F001 Basic of I.T R.K Verma 500 ABC
S004 python R.S Agarwal 800 ND
C005 C++ T.R Jain 400 RK

(a) Name the fields in the given table.


Book_ID, Book_Name , Author Name , Price , Publisher
(b) Which field should be made the primary key?
Book_ID
(c) Is there any alternate key in the table?
Yes, Book_Name can be set as a alternate key
(d) How is primary key different from foreign key? Explain with example

Primary Key Foreign key


A primary key is a field that uniquely This foreign key helps to build a relation
identifies a row in a table. between two or more tables in a database.
A table can have only one primary key A table can have multiple foreign key
It cannot contain null value It can contain null value
The field designed as a primary key must It can contain duplicate value
contain unique value

• The software that is used to create, update and retrieve data is known as database management system (DBMS).

• Some of the common examples of DBMS are MS Access, Open Office or LibreOffice Base, Oracle, Ingress, MySQL.

• 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 linked to same master file.

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

• A field is the smallest entity in the database.

• Data values are the raw data represented in numeric, character or alphanumeric form.

• The data values for all the fields related to a person or object is called a record. It is presented as rows within a
table.

RAHUL SHARMA (ANAND SCHOOL FOR EXCELLENCE) P.G.T COMPUTER 2


• A primary key is a field that uniquely identifies a row in a table.

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

• All the field values that are eligible to be the primary key are the candidate keys for that table.

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

RAHUL SHARMA (ANAND SCHOOL FOR EXCELLENCE) P.G.T COMPUTER 3


Session-2
(Starting with LibreOffice Base)
1. Differentiate between:

(a) Memo and Varchar data type


Answer:

Memo: Used for large text entries; can store up to 2 GB of data.

Varchar: Used for shorter text entries; stores a specified maximum length of characters, typically up to 255 characters.

(b) Number and Decimal data type

Answer:

Number: Used for general numeric values, including integers and floating-point numbers.

Decimal: Used for precise numeric values with a fixed number of decimal places, ideal for financial calculations.

(c) Design View and Datasheet view of a table

Answer:

Design View: Used to define and modify the structure of a table, including fields, data types, and primary keys.

Datasheet View: Used to enter, edit, and view data in the table, displaying data in a grid format similar to a
spreadsheet.

2. Name the menu items present on the Base User Interface


Answer:

• File *Edit *View * Insert *Format

• Tools *Window *Help

3. How can we define a primary key in a table?

Answer:

• Open the table in Design View.


• Select the field (or combination of fields) to be the primary key.
• Right-click on the selected field(s) and choose Primary Key from the context menu, or click the Primary Key
icon in the toolbar.
4. Write steps to sort the table in descending order of primary key.

Answer:

• Open the table in Datasheet View.


• Click on the column header of the primary key field to select it.
• Click the Sort Descending button (Z→A) in the toolbar, or right-click on the column header and select Sort
Descending from the context menu.

6. What is the use of navigation box with respect to tables in a database?

Answer: The navigation box allows users to move through the records in a table. It provides buttons to go to the first,
previous, next, and last record, as well as options to add new records and search for specific records. This facilitates
easy data entry and browsing within the table.

RAHUL SHARMA (ANAND SCHOOL FOR EXCELLENCE) P.G.T COMPUTER 4


Session-3
(Working with Multiple Tables)
D. Answer the following questions
1. Give any two advantages of relating a table in a database.
2. How is redundancy or inconsistency controlled in a database? Explain with
an example.
3. Define referential integrity. Who maintains referential integrity in a
database?
4. Differentiate between one to one relationship and one to many
relationship. Give suitable examples to explain your answer.

5. Explain many to many relationship with an example.

RAHUL SHARMA (ANAND SCHOOL FOR EXCELLENCE) P.G.T COMPUTER 5


Session-4
(Queries in Base)

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

A query is a request to a database system to retrieve specific information. It allows you to extract relevant data from
one or more tables based on certain conditions.

Need for creating a query:

• Data Retrieval: To extract specific data from the database.


• Data Analysis: To analyze data by applying various functions and calculations.
• Data Manipulation: To modify data by updating, inserting, or deleting records.
• Report Generation: To generate reports based on the extracted data.

2. Rearrange the steps given below so as to create a query using a wizard.


Give Alias
Select the fields
Set the criterion
Set the sorting order
Give table name

• Give table name


• Select the fields
• Set the criterion
• Set the sorting order
• Give Alias

3. What all information is seen in the overview (last step) of the Query wizard?

In the overview step of the Query wizard, you typically see:

• Table and Field Names: A list of the tables and fields included in the query.
• Criteria: The conditions used to filter the data.
• Sort Order: The order in which the results will be sorted.
• Alias Names: The alternative names given to fields or tables.
• SQL Statement: The underlying SQL query that will be executed.

4. What is the use of Alias row in the Design grid of the Query Design window?

The Alias row in the Query Design window allows you to assign alternative names to fields or tables. This can be
useful for:

• Clarity: Making the query more readable by using shorter or more descriptive names.
• Avoiding Ambiguity: Resolving naming conflicts when multiple tables have fields with the same name.
• Customization: Tailoring the output to specific needs.

RAHUL SHARMA (ANAND SCHOOL FOR EXCELLENCE) P.G.T COMPUTER 6


5. Name any four mathematical functions that can be applied to numerical data in a query.

• SUM: Calculates the sum of values.


• AVG: Calculates the average of values.
• COUNT: Counts the number of values.
• MAX: Finds the maximum value.
• MIN: Finds the minimum value.

6. Name the three ways of creating a query in LibreOffice Base?

• Query Wizard: A step-by-step wizard that guides you through the query creation process.
• SQL View: Allows you to write SQL queries directly.
• Query Design: A visual interface where you can drag and drop fields and set criteria.

RAHUL SHARMA (ANAND SCHOOL FOR EXCELLENCE) P.G.T COMPUTER 7


Session-4
(Forms and Reports)
D. Answer the following questions.
1. Give one difference between a form and a report.
Form:
• Used for data entry and editing.
• Focuses on input and modification of data.
• Typically displays one record at a time.

Report:
• Used for displaying and printing data.
• Focuses on presentation of data in a structured format.
• Can display multiple records at once, often grouped and summarized.

2. What is a field control with respect to forms?


A field control is an object on a form that represents a specific field in a database table. It allows users to input,
edit, and view data for that field. Common field controls include text boxes, checkboxes, radio buttons, and
combo boxes.

3. Which tool on the Forms Record toolbar is used to insert text on the form?
The Text tool on the Forms Record toolbar is used to insert text on a form. This text can be used for labels, titles,
or other descriptive information.

4. Name the two ways to create a form in LibreOffice Base.


Form Wizard: A step-by-step wizard that guides you through the form creation process.
Form Designer: A more flexible approach that allows you to manually design the form layout and add controls.

5. What is the difference between a static and a dynamic report?


Static Report:
• A fixed report that displays a specific set of data at a particular point in time.
• It does not update automatically when the underlying data changes.
Dynamic Report:
• A report that can be updated automatically based on changes in the database.
• It allows for filtering, sorting, and grouping data to generate different views of the same data.

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


Forms Controls Toolbar:
• Provides tools to add various controls (text boxes, labels, buttons, etc.) to a form.
• Used for designing the layout and functionality of the form.
Records Toolbar:
• Provides tools to navigate through records, add new records, edit existing records, and delete records.
• Used for interacting with the data within the form.

RAHUL SHARMA (ANAND SCHOOL FOR EXCELLENCE) P.G.T COMPUTER 8

You might also like