Database Management System Class 10 — Questions and Answers
Thank you for reading this post, don't forget to subscribe!Chapter 8: Introduction to Database Management System
1. What is a difference between data and information?
Answer –Data: The raw facts constitute data. The facts may be related to any person, place, activity, or thing. It may be stored in the form of text, graphics, audio, or video.Information: Information is the processed or organized form of data. If the 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 are data, while the report card/sheet is information.
2. What is a database?
Answer – A database is an organized collection of data. Databases can store, retrieve, and manage large amounts of data. The database stores the information in the form of a table.
3. What is a database management system?
Answer – A database management system (DBMS) is a software package that manages and maintains data in a database. A DBMS enables several user application programs to access the same database at the same time. It enables organizations to easily create databases for a variety of purposes.
4. How is data organized in a database?
Answer – There are two ways to organize data in a database:
- Flat File: It stores the data in a single table and is suitable for small amounts of data.Relational: It stores the data in multiple tables, and all the tables are connected to each other using a common field with the help of relationships.
- Hierarchical Data Model: Data is organized into a tree-like structure. The data is stored in the form of records, and all these records are linked to each other at various levels.Network Data Model: Multiple records are linked to the same master file. It is also considered an inverted tree where the master is present at the bottom and the branches contain information linked to the master.Relational Data Model: This data model is based on setting relationships between two or more tables of the same database. It is the most commonly used database model.
- Primary Key (PK): A primary key is a unique value that identifies a row in a table. Duplication is not allowed.Candidate Key (CK): All field values that are eligible to be the primary key are candidate keys. Such fields cannot be left blank or have duplicate values.Alternate Key (AK): When one key is selected as the primary key, the other candidate keys are called alternate keys.Foreign Key (FK): A foreign key is a field that refers to the primary key of another table.
- TableFormQueriesReport
Answer – The advantages of a database are:
- Reduce Data Redundancy: It helps prevent duplicate data from being stored in a database.Sharing of Data: Databases can share data with multiple users at the same time.Data Integrity: It maintains the accuracy and consistency of data.Data Security: It allows only authorized users to access the database.Privacy: Only authorized users are permitted to access the database.Backup and Recovery: Backup and recovery are handled by the database management system.Data Consistency: It ensures that modifications to data are reflected consistently for all users.
Chapter 9: Starting with LibreOffice Base
12. What is data type in a database?
Answer – Data types are used to define the type of data that will be stored in the database. Data types in LibreOffice Base include:a. Text Data Type: Text data is a combination of letters, numbers, or special characters. It is divided into:
- LONGVARCHAR: Allows text data up to 64,000 characters.CHAR: Used to enter a fixed number of characters.VARCHAR: The number of bytes allocated depends on the number of characters entered.
- TINYINTSMALLINTINTEGERBIGINTNUMERICDECIMALFLOATREALDOUBLE
- Date: Stores the year, month, and day.Time: Stores the hour, minute, and second.Timestamp: Stores date and time information together.
13. What are the ways to create a table in LibreOffice Base?
Answer – There are two ways to create a table in LibreOffice Base:
- Using Design ViewUsing Wizard
Answer – The navigation box helps to navigate from one record to another. Its components are:
- Record Selector Box: Displays the currently active record number.Navigation Buttons: Used to move through the records in the table.
15. What is a relationship in a database management system?
Answer – A relationship is a logical connection between two or more tables. It helps to reduce redundancy and inconsistency of data.
16. What is the advantage of relationships between two tables?
Answer –Saves time because the same data does not need to be entered in separate tables.Reduces data-entry errors.Helps summarize data from related tables.
17. What is the file extension of LibreOffice Base?
Answer – The file extension of LibreOffice Base is .odb.
18. How many types of relationships can be created in LibreOffice Base?
Answer – There are three types of relationships:
- One-to-One: Both tables in this relationship have primary key columns.One-to-Many or Many-to-One: One of the tables has a primary key column.Many-to-Many: Multiple records in one table can be related to multiple records in another table.
Answer – If a school wants to manage student fee collection in a database, it can create two tables: one for student details and another for fee details. The student details table is the master table, while the fee details table is the transaction table.20. What are the advantages of relationships in a database?Answer –
- A relationship helps prevent data redundancy.It helps prevent missing or inconsistent data.It helps maintain valid data between related tables.Any update in the master table can automatically be reflected in the transaction tables.
Answer – Referential integrity is used to keep data maintained, accurate, and consistent. Data in a database can be connected between two or more tables using primary key and foreign key constraints.For example, suppose there are two tables, Student_details and Fee_details. In the Student_details table, Grno is the primary key. In the Fee_details table, Grno is a foreign key. Since both tables have the common field Grno, referential integrity can be maintained between them.
22. What is referential integrity?
Answer – Referential integrity is used to keep data maintained, accurate, and consistent. Data in a database can be connected between two or more tables using primary key and foreign key constraints.Referential integrity helps to:
- Prevent records from being added to a related table without a corresponding record in the main table.Maintain consistency when primary key values are changed.Maintain consistency when records from a primary key table are deleted.
Answer – LibreOffice Base provides the following options:
- No Action: A user cannot update or delete a record in the master table if a related record exists in the transaction table.Update Cascade: Updates or deletes related records when the referenced field is updated or deleted.Set NULL: Assigns a NULL value to related fields when the master record is deleted or updated.Set Default: Assigns a fixed default value to related fields when the master record is deleted or updated.
24. What is a query in a database?
Answer – Queries help to retrieve and display data from one or more tables in a database. Specific search criteria are given to the DBMS to view the required information.
25. What are the different ways to create queries in LibreOffice Base?
Answer – A query can be created in three ways:
- Using a WizardIn Design ViewIn SQL View
Answer: A primary key is a field that uniquely identifies each record in a table. Duplication and NULL values are not allowed. For example, Book_Id can be a primary key.A foreign key is a field in one table that refers to the primary key of another table. It is used to create a relationship between two tables. For example, if Book_Id is the primary key in one table, it can be used as a foreign key in another table.
27. Write the SQL commands to answer the queries based on the Fabric table.
(a) Write a query to insert the following record: (“F005”, “Kurta”, “Woolen”, 5).
Answer:
INSERT INTO Fabric VALUES ('F005', 'Kurta', 'Woolen', 5); (b) Write a query to display only those fabrics whose discount is more than 10.Answer:
SELECT * FROM Fabric WHERE Disc > 10; (c) Write a query to display those records whose type is ‘Woolen’.
Answer:
SELECT * FROM Fabric WHERE Type = 'Woolen'; (d) Write a query to modify the fabric Shirt by increasing the discount by 10.Answer:
UPDATE Fabric SET Disc = Disc + 10 WHERE Fname = 'Shirt'; (e) Write a query to delete the record of fabric F003 from the table.Answer:
DELETE FROM Fabric WHERE FabricID = 'F003'; Chapter 12: Forms and Reports
28. What is a form in a database?
Answer – A form is a database object that provides a user-friendly interface where data can be entered and viewed in an attractive and easy-to-read format. It is also known as a front-end application
.29. How many ways are there to create a form in LibreOffice Base?
Answer – There are two ways to create a form:
- Using a WizardUsing Design View
Answer – The Forms Control Toolbar contains various controls related to a form. It can be used for:
- Adding a calendar for a date field.Adding text to the form.Adding a new record using a form.
Answer – The Records Toolbar contains navigation control buttons. These buttons help us move through and view the records in a file.
32. What is a tooltip in LibreOffice Base?
Answer – A tooltip is a small piece of text displayed when the mouse pointer is placed over a particular control. For example, placing the pointer over an EventID text box may display the message “Enter Event Identification number”.
33. What do you mean by report?
Answer – A report helps to present retrieved data in an attractive and customized manner. A report can be created based on a table, a query, or both.
34. What are the different types of reports in LibreOffice Base?
Answer – There are two types of reports:
- Dynamic Report: The report automatically changes when the field values in the base table or query change.Static Report: It is used when automatic updates are not required.
- Forms are used to enter and manage data.Data can be edited, deleted, and modified easily.Calculations can be performed easily.