Rdbms
Rdbms
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
18. Data is stored in multiple tables, which are connected together via a common field.
a. Flat File
b. Relational
c. Both a) and b)
19. The _______ statement is used to fetch data from one or more database tables.
a. Insert statement
b. Select statement
c. Display statement
22. We can change the structure of a table ie. add, remove or change its column(s) using the _________ statement.
a. Insert Table
b. Alter Table
c. Display Table
23. The keyword _________ is used to eliminate redundant data from display.
a. Modify
b. Distinct
c. Describe
24 Logical operators ________ are used to connect relational expressions in the WHERE clause.
a. OR
b. AND
c. NOT
27. The __________ operator selects values that match any value in the given list of values.
a. Multiplication
b. Modular
Answer ⟵c. IN
c. IN d. Between
29. The _________ symbol is used to represent any sequence of zero or more characters.
a. %
b. _
c. &
Answer ⟵a. %
d. #
Answer ⟵b. _
d. #
32. The results of the SELECT statement can be displayed in the ascending or descending order of a single column
or columns using _________ clause.
a. Non Order by
b. Modular
c. Order by
35. 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
37. When the primary key is applied on multiple columns is known as __________.
a. Primary Key
b. Composite Primary Key
c. Foreign Key
39. A row also called a Record or _________ represents a single, data item in a table.
a. Column
b. Tuples
c. Fields
40. Which datatype is used for storing date and time both in the database.
a. Date
b. Time
c. Timestamp
7. State the similarity and difference between the Primary Key, Candidate Key, Alternate Key and Foreign
Key
Answer –
a. Primary Key – The group of one or more columns used to uniquely identify each row of a relation is called its
Primary Key.
b. Cndidate Key – A column or a group of columns which can be used as the primary key of a relation is called a
Candidate key because it is one of the candidates available to be the primary key of the relation.
c. Alternate Key – A candidate key of a table which is not selected as the primary key is called its Alternate Key.
d. Foreign Key – A primary key of a base table when used in some other table is called as Foriegn Key.
10. Write SQL statement to view names of all the tables contained in the current database.
Answer – To display all the table in database –
SQL> SHOW TABLES;
11. In a database there is a table Cabinet. The data entry operator is not able to put NULL in a column of
Cabinet? What may be the possible reason(s)?
Answer – The data entry operator cannot enter duplicate values in a column of a cabinet; this is likely because the
column contains a primary key.
21. Write the SQL commands to answer the queries based on Fabric table
FabricID Fname Type Disc
22. Consider the following Vendor table and write the queries
VendorID VName DateofRegistration Location
11 Soap 40 80
22 Powder 80 30
55 Soap box 20 50
a. Display the total amount of each item. The amount must be calculated as the price multiplied by quantity
for each item.
Answer – Select price * quantity from item;
b. Display the details of items whose price is less than 50.
Answer – Select * from item where price < 50;