Font size
WorksheetsRDBMS-Revision
Total questions: 90
Worksheet time: 45mins
Which of the following is generally used for performing tasks like creating the structure of the relations, deleting relation?
DML(Data Manipulation Language)
Query
Relational Schema
DDL(Data Definition Language)
The given Query can also be replaced with_______:
SELECT name, course_id FROM instructor, teaches WHERE instructor_ID= teaches_ID;
Select name,course_id from teaches,instructor where instructor_id=course_id;
Select name, course_id from instructor natural join teaches;
Select name, course_id from instructor;
Select course_id from instructor join teaches;
Which one of the following given statements possibly contains the error?
select * from emp where empid = 10003;
select empid from emp where empid = 10006;
select empid from emp;
select empid where empid = 1009 and Lastname = 'GELLER';
Which one of the following refers to the "data about data"?
Directory
Sub Data
Warehouse
Meta Data
Which of the following refers to the level of data abstraction that describes exactly how the data actually stored?
Conceptual Level
Physical Level
File Level
Logical Level
In general, a file is basically a collection of all related______.
Rows & Columns
Fields
Database
Records
A database is an organized collection of _______________.
a. data
b. Attributes
c. Record
d. None of the above
Which of the following is not a database programs?
a. MySQL
b. Oracle
c. Writer
d. OObase
Duplication of data is called _________.
a. Inconsistency
b. Consistency
c. Redundancy
d. Foreign Key
Data Integrity means that data is accurate and consistent in the database.(T/F)
a. True
b. False
A database can have only one table.(T/F)
a. True
b. False
Which of the following will help to maintain unique record in the table?
a. Foreign Key
b. Primary Key
c. Composite Key
d. Alternate Key
Which of the following field of table “Book” can act as primary key?
a. Book_number
b. Subject
c. price
d. Author_name
When primary key is made up of two or more columns then it is called __ primary key
a. Mixed
b. Reference
c. Composite
d. Compost
Duplicate values can be entered in primary key.(T/F)
a. True
b. False
A key which is referring to the primary key of another table is called _______
a. Alternate Key
b. Primary Key
c. First Primary Key
d. Foreign Key
A field which is ______ for each and every record is called Primary key.
a. Common
b. Same
c. Unique
d. None of the above
a. Common
b. Same
c. Unique
d. None of the above
Identify the Foreign Key from table “Sales”
Table Client:
ClientID (primary Key)
clientname
clientphone
Table : Sales
SalesID (Primary Key)
ClientID
Profit
a. SalesID
b. Profit
c. Clientphone
d. ClientID
There can be multiple primary key in a table.(T/F)
a. True
b. False
a. True
b. False
___________ represent a single record in a table.
a. Tuples
b. Attributes
c. Relation
d. All of the above
Every row in a table has the same structure.(T/F)
True
False
__________ are used to identify which type of data we are going to store in the database.
a. Datatype
b. Record
c. Table
d. Attributes
With SQL, how do you select all the records from a table named "Persons" where the value of the column "FirstName" is "Peter"?
SELECT [all] FROM Persons WHERE FirstName LIKE 'Peter'
SELECT * FROM Persons WHERE FirstName like 'Peter'
SELECT * FROM Persons WHERE FirstName<>'Peter'
SELECT * FROM Persons WHERE FirstName<>'Peter'
SELECT * FROM Persons WHERE FirstName=='Peter'
Which one of the following sorts rows in SQL?
SORT BY
ALIGN BY
ORDER BY
GROUP BY
SORT
The DROP TABLE statement:
deletes the table structure only.
deletes the table structure along with the table data.
works whether or not referential integrity constraints would be violated.
is not an SQL statement.
deletes the data only.
The primary key of a table which is present in another table for referencing is known as (a)
An (a) is the secondary candidate key that contains all the property of a candidate key but is an alternate option
Which constraint(s) can be used to make sure that the column is not left empty?
NOT NULL
UNIQUE
PRIMARY KEY
ALL THE ABOVE
Example of Processed data is
Red
The color of my car is red
Car
Color
Choose all the DBMS software
Oracle
Mysql
Excel
Word
Foxpro
________________ and ______________ are the two types of Database
Flat file and Relational file
Flat file and Word file
Relational file and Word file
Word file and Excel file
Choose all the statement true about flat file
Can store data in a single Table
Tables are inter-related
Suitable to store small amount of data
Can have duplicate values
Can accidently delete an important data
Choose all the statement true about Relational Database Management System
Can store data in multiple tables that are inter-related
Developed using 13 golden rules of E F Codd
Avoids Duplicate Data
Cannot run complex queries
Better security and easy upgradation of the existing software is available.
Dedicated computers that holds the data and the database software is called
Server
Client
Front end
None of the above
A unique value that individually identifies each row in a RDBMS table is called
Foreign Key
Primary key
Candidate key
Composite key
Primary key constraint applied on more than one column is called
Primary key
Candidate key
Foreign Key
Composite key
Constraints on primary key are
Cannot be left null and cannot have duplicate value
Can be left null and cannot have duplicate value
Cannot be left null and can have duplicate value
Can be left null and can have duplicate value.
A key that refers to the primary key of another table and used for table inter relationship is called
Foreign key
Primary key
Candidate key
Composite key
Keys in an RDBMS table that can be used as primary key also but are not primary key are called
Foreign key
Primary key
Candidate key
Composite key
Correct Syntax of 'SELECT' DML commands is
SELECT * FROM <TABLE_NAME>
SELECT FIELD1,FIELD2... FROM <TABLE_NAME> WHERE <CONDITION>
SELECT FIELD1,FIELD2... FROM <TABLE_NAME>
SELECT FIELD1,FIELD2... FROM <TABLE_NAME> WHERE <CONDITION> ORDER BY <FIELD_NAME> ASC/DESC
Identify theDBMS software from the following
Microsoft Word
Microsoft Access
Open Office Writer
Open Office Spreadsheet
In ------- model data is stored in multiple tables and the tables are linked using a common field.
Relational
flat file
word
presentation
A foregin key is a unique value that identifies a row in a table.
True
false
A table has a defined number of columns but can have any number of ,rows
True
False
Each question that we ask about our ITEM is a field.
True
False
____________KEY IS A SUBSET OF CANDIDATE KEY
Foreign Key
Alternate Key
Super Key
Composite Key
A CANDIDATE KEY CAN NEVER BE (a) OR EMPTY
KEY CAN BE ________ ATTRIBUTE OR _____________ATTRIBUTE WHERE THE COMBINATION MAY ACT AS A KEY
(a)
__________ IS A CANDIDATE KEY THAT IS MOST APPROPRIATE TO BECOME THE MAIN KEY FOR ANY TABLE.
Candidate Key
Primary Key
Composite Key
Foreign Key
CANDIDATE KEY WHICH ARE NOT SELECTED AS PRIMARY KEY ARE KNOWN AS ___________ OR __________
FOREIGN KEY
SECONDARY KEY
ATTERNATIVE KEY
PRIMARY KEY
(a) ATTRIBUTES ARE ATTRIBUTES OTHER THAN PRIMARY KEY ATTRIBUTE
THE COMPOSITE KEY ARE NOT A KEY (a) OR INDIVIDEALLY
(a) attributes are the attributes or fields of a table, other than candidate key attributes/fields in a table.
........... is the process of minimizing redundancy from a relation or set of relations.
Normalization
Data redundancy
Data consistency
Schema
.......... is the process of organizing the data in the database.
Schema
Normalization
Instance
Transaction
................. form disallows the multi-valued attribute, composite attribute, and their combinations.
1 NF
2 NF
3 NF
4 NF
.......... is used to reduce the data duplication.
1 NF
2 NF
3 NF
4 NF
A ........... can be defined as a group of tasks.
Transaction
Normalization
Schema
Instance
A .............. is a very small unit of a program and it may contain several low-level tasks.
Attribute
Table
Normalization
Transaction
Atomicity, Consistency, Isolation, and Durability − commonly known as ........... properties
AID
ADIC
ACID
DBMS
An .............. can be a real-world object, either animate or inanimate, that can be easily identifiable.
Entity
Entity set
Attribute
Transaction
.......... is an attribute or collection of attributes that uniquely identifies an entity among entity set.
Relations
Attribute
Weak entity
Key
............ are the properties of entities.
Domain
Attributes
Relations
Field
What will be the degree and cardinality of the cartesian product of two tables if the degree of first table is 3 and second table is 5. The cardinality of first table is 10 and cardinality of second table is 6.
Degree 15, Cardinality 16
Degree 8 Cardinality 16
Degree 8 Cardinality 60
Degree 15 cardinality 60
The restrictions or conditions applied on data are known as (a)
What will be the output?
SELECT ROUND(36.7894,2)
36.78
38.79
36.7
36
What will be the output?
SELECT TRUNCATE(36.5643,2);
36.56
36.57
36.5643
36
Write a query to display the details of employees of emp table whose sal is within the range 10000 and 50000.
(a)
Which is the correct query to delete the rows of employees whose exp is less than 10.
DELETE * FROM EMP WHERE EXP<10;
DELETE FROM EMP;
DELETE FROM EMP WHERE EXP<10;
DELETE FROM EMP WHERE EXP>10;
____ is a minimal set of columns used to uniquely define any row in a table.
keys
values
strings
none of the above
______________ of two tables produces a table with rows that are present in the first table but not in the second table and _____________ operation creates a new table from the existing table.
Assignment, Difference
Union, projection
Difference , assignment
Difference, Cartesian
Expand ACID.
Atomicity, Consistency ,Integrity , Dependability
Atomicity, Concatenation,Isolation , Durability
Atomicity, Consistency, Isolation, and Durability
Atomic, Consistent, Independent, Durable
____________is the process of joining tables that were decomposed during normalization process.
Normalisation
Combine
Denormalisation
Keys
Under Which dependency the following table comes under?
Partial Dependency
Full Dependency
Transitive dependency
Functional dependency
Create table student(rollno number primary key, student_name varchar2(20),marks number(2),result number(2). Table is of degree (a)
Is the table in 1NF ?
True
False
POWER(5,3)
15
53
25
125
ABS(-1000)
-1
-1000
+1
1000
SIGN(+50)
+1
-1
50
51
MOD(3,5)
3
5
2
1
FLOOR(54.7)
54
55
54.0
CEIL(54.3)
54
54.0
55
54.5
With SQL, how do you select all the records from a table named "Persons" where the value of the column "FirstName" starts with an "a"?
SELECT* FROM PERSONS WHERE FIRSTNAME='%a%';
SELECT* FROM PERSONS WHERE FIRSTNAME LIKE %a;
SELECT* FROM PERSONS WHERE FIRSTNAME LIKE a%;
SELECT* FROM PERSONS WHERE FIRSTNAME ='A'
With SQL, how can you return the number of records in the "Persons" table?
SELECT NO(*) FROM Persons
SELECT COUNT(*) FROM Persons
SELECT COLUMNS(*) FROM Persons
SELECT LEN(*) FROM Persons
The relational data model was invented by
Edgar Codd
Tim Berners Lee
James Gosling
Dennis Ritchie
Commercial RDBMS products from numerous vendors started to appear about
1970
1980
1990
1991
What action does ⋈ operator perform in relational algebra
Output specified attributes from all rows of the input relation and remove duplicate tuples from the output
Outputs pairs of rows from the two input relations that have the same value on all attributes that have the same name
Output all pairs of rows from the two input relations (regardless of whether or not they have the same values on common attributes)
Return rows of the input relation that satisfy the predicate
