03 Database Management System Important Questions Answers
03 Database Management System Important Questions Answers
03 Database Management System Important Questions Answers
TEXTBOOK QUESTIONS
B. Subjective Questions
1. In how many ways tables can be created in Base?
Ans. Tables can be created in two ways.
1. In Design view
2. Using Wizard
7. How many types of relationships can be created in Base? Explain each of them.
Ans. There are three types of relationship in OpenOffice Base.
➢ ONE to ONE: In this relationship, both the tables must have primary key columns. Example: In
the given tables EMP and DEPT, EMP_ID in EMP table and DEPT_ID in DEPT table are the
primary keys.
➢ ONE to MANY: In this relationship, one of the table must have primary key column. It signifies
that one column of primary key table is associated with all the columns of associated table.
➢ MANY to MANY: In this relationship, no table has the primary key column. It signifies that all
the columns of primary key table are associated with all the columns of associated table.
2. Which SQL command will increase the salary of all employees by 5000? (Table name is emp and
column name is salary).
a. UPDATE emp SET sal = salary + 5000;
b. UPDATE SET sal = salary + 5000;
c. UPDATE emp SET salary = 5000;
d. None of the above.
Ans: a. UPDATE emp SET sal = salary + 5000;
3. What is the purpose of the SQL query: “SELECT * FROM Stud ORDER BY Rollno ASC;”?
a. Display all record in ascending order followed by Rollno
b. To display all the records of the table.
c. Both of the above.
d. None of the above.
Ans: a. Display all record in ascending order followed by Rollno
10. Which data type is appropriate for storing information such as salary, fees, and price?
a. Binary data type
b. Alphanumeric data type
c. Date Time
d. Numerical data type
Ans: d. Numerical data type
13. Does data integrity mean that data is accurate and consistent in the database?
a. Yes
b. No
Ans: a. Yes
16. Which field in the “Student” table can act as the primary key?
a. Roll_No
b. Fee
c. Student_name
d. Marks
Ans: a. Roll_No
19. Which of the following data types will occupy more space in computer memory?
a. Bigint
b. Smallint
c. Tinyint
d. Integer
Ans: a. Bigint
20. In which view can data be entered in a table?
a. Data view
b. Datasheet view
c. Both a) and b)
d. None of the above
Ans: b. Datasheet view
22. Are queries commands that are used to define the structure and modify the data in a table?
a. True
b. False
Ans: a. True
23. Which SQL query will retrieve the details of all students whose favorite color is blue?
a. SELECT all FROM Stud WHERE fav_Color = ‘Blue’;
b. SELECT all FROM Stud WHERE fav_Color is ‘Blue’;
c. SELECT name FROM Stud WHERE fav_Color = ‘Blue’;
d. SELECT * FROM Stud WHERE fav_Color = ‘Blue’;
Ans: d. SELECT * FROM Stud WHERE fav_Color = ‘Blue’;
28. Which of the following field properties is for the Numeric data type in Base?
a. Default Value
b. AutoValue
c. Length
d. All of the above
Ans: d. All of the above
29. What is the default length of the Integer data type in Base?
a. 20
b. 40
c. 10
d. 50
Ans: c. 10
30. We can create a relationship between any two tables by selecting which option from the which
menu?
a. Relationships
b. Filter
c. Sort
d. All of the above
Ans: a. Relationships
31. In which relationship, both the tables must have primary key columns?
a. One to Many
b. One to One
c. Many to Many
d. Many to All
Ans: b. One to One
32. What are the commands that define the data structure and manipulate the data in a database?
a. Reports
b. Queries
c. Forms
d. Tables
Ans: b. Queries
34. Can ‘Where’ and ‘Order by’ clauses be used together in a single query?
a. True
b. False
Ans: a. True
36. Which statement is used to remove one or more records from a database?
a. Erase
b. Delete
c. Remove
d. Del
Ans: b. Delete
41. Binary data types are used for storing data in formats.
a. image
b. sound
c. boolean
d. binary
Ans: d. binary
42. Which of the following is not a category of Open Office data types?
a. Alphanumeric Types
b. Date time
c. Numeric Types
d. Bool Type
Ans: d. Bool Type
44. Which database feature helps users to systematically store information in a table?
a. Table
b. Report
c. Form
d. Query
Ans: c. Form
45. Rajesh wants to display the salary of all the employees after incrementing it by twice the amount
of the present salary. Which query will help her achieve this task?
a. Select salary + 2 from employee;
b. Select salary / 2 from employee;
c. Select salary – 2 from employee;
d. Select salary * 2 from employee;
Ans: d. Select salary * 2 from employee;
46. Which feature is used to collect specific information from the pool of data?
a. Form
b. Query
c. Table
d. Report
Ans: b. Query
47. Which of the following relationships cannot be created in Open Office Base?
a. One to Many
b. Many to Many
c. One to One
d. Many to All
Ans: d. Many to All
48. Which property helps to set the value that is automatically inserted in a field when a new record is
created?
a. Length
b. Entry Required
c. Format
d. Default Value
Ans: d. Default Value
49. Which field property in Base can be used to automatically increment the value of a field?
a. Format
b. Length
c. Auto Value
d. Default Value
Ans: c. Auto Value
53. Which element in a table contains data of the same data type?
a. Column
b. Tuple
c. Record
d. All of the above
Ans: a. Column
54. A table has a fixed number of but can have any number of
a. tuple, columns
b. columns, rows
c. rows, columns
d. tuple, degree
Ans: b. columns, rows
55. Which of the following acts as an interface to view, enter and change data in a database?
a. Report
b. Form
c. Table
d. Query
Ans: b. Form.
58. Which software is appropriate for storing data about school students?
a. Calc
b. MS-Access
c. Writer
d. Impress
Ans: b. MS-Access
59. What kind of data storage system stores data in a single table?
a. Only File
b. Relational
c. One File
d. Flat File
Ans: d. Flat File
60. What kind of computer holds the actual databases and runs only DBMS and related software?
a. Database Server
b. Web Server
c. SMPT Server
d. POP Server
Ans: a. Database Server
61. What is the role of the database server in relation to the GUI?
a. Back End
b. Front End
c. Both a) and b)
d. None of the above
Ans: a. Back End
68. What is a key that refers to the primary key of another table called?
a. Alternate Primary Key
b. Foreign Key
c. Primary Key
d. Alternate Key
Ans: b. Foreign Key
69. What kind of database software is required when data is stored, maintained, and retrieved from
multiple tables?
a. SpreadSheet
b. RDBMS
c. DBMS
d. All of the above
Ans: b. RDBMS
73. Does Base automatically add a column as Primary Key if none is added?
a. True
b. False
Ans: a. True
75. What is used to identify the type of data that will be stored in a database?
a. Field
b. Data type
c. Table
d. Record
Ans: b. Data type
77. Which of the following data types cannot store decimal values?
a. Boolean
b. Decimal
c. Numeric
d. Real
Ans: a. Boolean
78. Which data type is used for storing photos, music files, and other binary data?
a. Numeric
b. Varchar
c. Binary
d. Alphanumeric
Ans: c. Binary
79. Is Char a fixed-length data type and Varchar a variable-length data type?
a. Yes
b. No
Ans: a. Yes
81. After inserting records in a table, can the structure of the table be modified?
a. True
b. False
Ans: b. False
83. Is Referential Integrity used to maintain accuracy and consistency of data in a relationship?
a. True
b. False
Ans: a. True
89. What is the purpose of the SQL query: “SELECT empname, salary * 3 FROM emp;”?
a. Display only name and salary
b. It will give an error.
c. Display empname and three times of the salary of all employees.
d. None of the above.
Ans: c. Display empname and three times of the salary of all employees.
91. Which of the following SQL commands are considered as DML commands?
a. UPDATE
b. DELETE
c. INSERT
d. All of the above.
Ans: d. All of the above.
96. Which of the following is NOT a type of data manipulation language (DML)?
a. SELECT
b. UPDATE
c. INSERT
d. DELETE
Ans: a. SELECT
99. Which field property in Base can be used to store data in a specific format, such as a phone
number?
a. Auto Value
b. Length
c. Default Value
d. Format
Ans: d. Format
100. What is the default value of the field property ‘Entry Required’ in Base?
a. Yes
b. No
Ans: b. No
101. To arrange the data in ascending or descending order, first select the column(s) and then click on
which button?
a. View
b. Save
c. Arrange
d. Sort
Ans: d. Sort
102. When a primary key from one table appears in another table, it is called a .
a. Composite Primary Key
b. Secondary Key
c. Foreign Key
d. Main Key
Ans: c. Foreign Key
103. In which relationship, one of the table must have primary key column?
a. One to Many
b. One to One
c. Many to Many
d. Many to All
Ans: a. One to Many
105. To remove the relationship between tables, right-click on the relationship thread and select
which option?
a. Delete
b. Remove
c. Edit
d. Clear
Ans: a. Delete
109. Rajesh wants to display all the records from the table ‘student’.
a. Select * student;
b. Select # from student;
c. Select from student;
d. Select * from student;
Ans: d. Select * from student;
110. Which clause can be used with the SELECT SQL command to display records containing the
same type of values?
a. Order By
b. Where
c. Both a and b
d. None of the above
Ans: b. Where
111. Which commands are used to add, modify, and delete records in a database table?
a. Insert, Update, and Remove
b. Insert, Update, and Delete
c. Insert, Modify, and Delete
d. Add, Update, and Delete
Ans: b. Insert, Update, and Delete
112. By default, in which order is data arranged using the ORDER BY clause in a database?
a. Decreasing
b. Alphabetical
c. Increasing
d. Descending
Ans: c. Increasing
113. Which clause of the SELECT statement helps to display specific data in a database?
a. Where
b. Between
c. Order By
d. None of the above
Ans: a. Where
114. What is the name of the interface in a user-specified layout that lets users view, enter, and
change data directly in database objects such as tables?
a. Query
b. Form
c. Report
d. Table
Ans: b. Form
115. Aman created an object ‘X’ in Base to store the value in the form of rows and columns. What is
‘X’?
a. Table
b. Row
c. Column
d. Database
Ans: a. Table
116. Which of the following contains data of the same data type?
a. Record
b. Tuple
c. Column
d. All of the above
Ans: c. Column
119. Which data type can store character/data up to the length specified by the user?
a. Varchar
b. Char
c. Varchar_IgnoreCase
d. All of the above
Ans: d. All of the above
120. Dhriti wants to store the details of students as well as their pictures in a table named “school”.
Which data type is suitable for storing pictures?
a. Boolean
b. Binary
c. Memo
d. Varchar
Ans: b. Binary
121. Which data type stores hours, minutes, and second information?
a. Date
b. Time
c. Stamptime
d. Timer
Ans: b. Time
2. A is a software package that can be used for creating and managing databases.
a. Database Management System
b. Basedata Management System
c. Database Manage System
d. None of the above
Ans: a. Database Management System
7. A database management system is a software package with computer programs that controls the
.
a. Creation
b. Maintenance
c. Use of Database
d. All of the above
Ans: d. All of the above
12. Data is stored in multiple tables, which are connected together via a common field.
a. Flat File
b. Relational
c. Both a) and b)
d. None of the above
Ans: b. Relational
13. are dedicated computers that hold the actual databases and run only the DBMS and
related software.
a. Database Server
b. Decided Server
c. Web Server
d. None of the above
Ans: a. Database Server
15. When the same piece of data is stored in two or more locations, it is called .
a. Data Redundancy
b. Data Integrity
c. Data Consistency
d. None of the above
Ans: a. Data Redundancy
17. means that the data is accurate and consistent in the database.
a. Data Redundancy
b. Data Integrity
c. Data Consistency
d. None of the above
Ans: b. Data Integrity
18. Only authorized users should be allowed to access the database and their identity should be
authenticated using a username and password known as .
a. Data Redundancy
b. Data Consistency
c. Data Security
d. None of the above
Ans: c. Data Security
20. prevent multiple mismatching copies of the same data in the database and only
valid data will be added in the database.
a. Data Redundancy
b. Backup and Recovery
c. Data Consistency
d. None of the above
Ans: c. Data Consistency
21. in a table represents a set of information with the same structure in every row.
a. Tuples
b. Record
c. Both a) and b)
d. None of the above
Ans: c. Both a) and b)
22. A is the actual text, number, or date that you enter when adding data to your
database.
a. Values
b. Table
c. Boolean
d. None of the above
Ans: a. Values
25. By default if the primary key is not defined that column is known as .
a. Primary Key
b. Candidate Key
c. Foreign Key
d. None of the above
Ans: c. Foreign Key
27. The relationship between two tables where one table has one record and another table has many
records is known as .
a. One-to-Many
b. Many-to-Many
c. Many-to-One
d. None of the above
Ans: a. One-to-Many
30. A row also called a Record or represents a single, data item in a table.
a. Column
b. Tuples
c. Fields
d. None of the above
Ans: b. Tuples
31. You can create tables in the database using .
a. Wizard
b. SQL
c. Both a) and b)
d. None of the above
Ans: c. Both a) and b)
33. are used to define the type of data that will be stored in the database.
a. Data Types
b. Data field
c. Key Data
d. None of the above
Ans: a. Data Types
34. What are the different types of data type available in OpenOffice base?
a. Numeric Types
b. Alphanumeric Types
c. Binary Types & Date time
d. All of the above
Ans: d. All of the above
35. types are used for describing numeric values for the field used in the table of a
database.
a. Numeric Type
b. Alphanumeric Type
c. Boolean Type
d. Date & Time
Ans: a. Numeric Type
40. data types in a database can be used for storing photos, music, video or any file
format.
a. Numerical Type
b. Alphanumeric Type
c. Binary Type
d. Date & Time
Ans: c. Binary Type
41. Which datatype is used for storing date and time both in the database.
a. Date
b. Time
c. Timestamp
d. None of the above
Ans: c. Timestamp
42. A table is a collection of data elements that are organized using a vertical and
horizontal model.
a. Column & Row
b. Row & Column
c. Column & Column
d. Row & Row
Ans: a. Column & Row
43. A is a collection of data values of a specific type, one for each row of a table.
a. Column
b. Row
c. Cell
d. None of the above
Ans: a. Column
45. are used to identify which type of data we are going to store in the database.
a. Datatype
b. DataItem
c. DataValue
d. DataCat
Ans: a. Datatype
49. If the user does not specify a value for a field while putting values into the table, a
value can be assigned to it.
a. Default Value
b. Length
c. Format
d. None of the above
Ans: a. Default Value
50. means to arrange the data in either ascending order or descending order.
a. Filter
b. Sorting
c. Arrangement
d. None of the above
Ans: b. Sorting
52. In base, data can be linked between two or more tables with the help of .
a. Primary Key
b. Foreign Key
c. Both a) and b)
d. None of the above
Ans: c. Both a) and b)
53. Referential Integrity helps to avoid .
a. If you want to add a record in the related table and if there is no associated record available in the
primary key table.
b. Changing values in a primary if there are any dependent records in the related table.
c. Deleting records from a primary key table if there are any matching related records available in the
associated table.
d. All of the above
Ans: d. All of the above
56. What are the different types of relationships which can be created in table .
a. One to One
b. One to Many or Many to One
c. Many to Many
d. All of the above
Ans: d. All of the above
57. is the relationship, where both the tables must have primary key columns.
a. One to One
b. One to Many or Many to One
c. Many to Many
d. All of the above
Ans: a. One to One
58. in this relationship, one of them must have a primary key column.
a. One to One
b. One to Many or Many to One
c. Many to Many
d. All of the above
Ans: b. One to Many or Many to One
60. A is a language that enables users to access and manipulate data in a database.
a. Data Manipulation Language (DML)
b. Data Definition Language (DDL)
c. Both a) and b)
d. None of the above
Ans: a. Data Manipulation Language (DML)
64. means that the query hides certain data and displays only what you want to see based
on the criteria you provided.
a. Filtering
b. Sort
c. Query
d. All of the above
Ans: a. Filtering
65. A statement used to display the zero record or multiple record from the database.
a. Select
b. Order By
c. Where
d. None of the above
Ans: a. Select
67. To display the records containing the same type of values clause can be used with the
Select SQL Command.
a. Where
b. More
c. Order
d. None of the above
Ans: a. Where
73. A enables users to view, enter, and change data directly in database objects such as
tables.
a. Table
b. Form
c. Report
d. None of the above
Ans: b. Form
74. statement retrieves zero or more rows from one or more database tables or database
views.
a. Select
b. Update
c. Delete
d. None of the above
Ans: a. Select
Ans:
a. Ascending
76. statement is used for modifying records in a database.
a. Select
b. Update
c. Delete
d. None of the above
Ans: b. Update
77. To remove one or more records from a database, use the statement.
a. Select
b. Update
c. Delete
d. None of the above
Ans:
c. Delete
Session 5: Create Forms and Reports using Wizard
78. A provides the user a systematic way of storing information into the database.
a. Query
b. Form
c. Table
d. None of the above
Ans: b. Form
79. will help you to display summarized data from the database.
a. Report
b. Form
c. Table
d. None of the above
Ans: a. Report
80. To create a form you need to select the option available under the Database section.
a. Form
b. Query
c. Report
d. All of the above
Ans: a. Form
81. A helps to collect specific information from the pool of data in the database.
a. Form
b. Query
c. Report
d. All of the above
Ans: b. Query
85. Which data type is suitable for storing values for ‘date of birth’ field?
a. Time
b. Date
c. Both of the above
d. Timestamp
Ans: b. Date
86. Which data type is most suitable for storing a very large amount of data?
a. LongVarchar or Memo
b. Char
c. Varchar
d. Varchar_IgnoreCase
Ans:
a. LongVarchar or Memo
87. Identify the odd one out.
a. Binary Types
b. Date & Day Type
c. Numeric Types
d. Alphanumeric Types
Ans: b. Date & Day Type
89. Which toolbar helps us move from one record to another in a form in a database?
a. Formatting Toolbar
b. Image Toolbar
c. Standard Toolbar
d. Form Navigation Toolbar
Ans: d. Form Navigation Toolbar
90. What is the correct query to increase the salary of all employees by Rs.10000 in a table named
Employee with a column name of Salary?
a. Update Employee set Salary = Salary + 10000;
b. Update * Employee set Salary = Salary + 10000.
c. Update table Employee set Salary = Salary + 10000;
d. Update table Employee set Salary = 10000;
Ans: a. Update Employee set Salary = Salary + 10000;
91. Which query will display the details of all the students in increasing order of Roll number?
a. Select * from student order by ‘Rollno’;
b. Select * student order by ‘Rollno’;
c. Select all from student order by ‘Rollno’;
d. Select * from student orderby ‘Rollno’;
Ans: a. Select * from student order by ‘Rollno’;
Ans:
c. Both a) and b)
93. In which relationship, no table has the primary key column?
a. Many to One
b. One to One
c. Many to Many
d. One to Many
Ans: c. Many to Many
95. Which field property in Base must be set to “Yes” in order to require a value to be entered in a
field?
a. Entry Required
b. Auto Value
c. Format
d. Length
Ans:
a. Entry Required
96. In which view can field properties be set in Base?
a. Design View
b. Datasheet View
c. Both of the above
d. None of the above
Ans: a. Design View
Ans. CREATE TABLE STUDENT (ID Integer, Name varchar (15), Stream_Id Integer);
16. Write a SQL command to create the table BANK whose structure is given below.
Ans. The SQL command to create a table as per given structure is as follows Mysql> CREATE
TABLE BANK (ID Number integer (10) PRIMARY KEY, Name varchar (20), B date Date,
Address varchar (50));
18. Write one example of data field for which you would set the Required property to Yes.
Ans. In a table, when we declare a field as a primary key, then the field’s Required property must
be set to yes because in a primary key field, we need to enter data always.
20. Insert some information into a table COLLEGE, whose structure is given below.
Ans. (i) Mysql>INSERT INTO COLLEGE (ROLL_NO, NAME, CLASS, BRANCH) VALUES
(2, ‘VIKAS’,12, ‘SCIENCE’); (ii) Mysql>INSERT INTO COLLEGE (ROLL_NO, NAME,
CLASS, BRANCH) VALUES (3, ‘RAJ’, 10, ‘SCIENCE’);