FINALTERM EXAMINATION
Spring 2010
CS403- Database Management Systems
Time: 90 min
M a r k s: 58
Question No: 1 ( M a r k s: 1 ) http://vuzs.net
Which feature of database provides conversion from inconsistent state of DB to a consistent state ensuring minimum data loss?
► User accessible catalog
► Data processing
► Authorization service
► Recovery service
Question No: 2 ( M a r k s: 1 ) http://vuzs.net
Which of the following statements is true about the views?
► view is always a complete set of all the tables in a database
► View can not be used for retrieving data
► The results of using a view are not permanently stored in the database.
► Rows can not be updated or deleted in the view
Question No: 3 ( M a r k s: 1 ) http://vuzs.net
Which of the following is true about TRUNCATE?
► Can be Rolled back.
► Activates Triggers.
► is DML Command.
► Resets identity of the table.
1. TRUNCATE is faster and uses fewer system and transaction log resources than DELETE.
2. TRUNCATE removes
the data by deallocating the data pages used to store the table's data,
and only the page deallocations are recorded in the transaction log.
3. TRUNCATE removes
all rows from a table, but the table structure, its columns,
constraints, indexes and so on, remains. The counter used by an identity
for new rows is reset to the seed for the column.
4. You cannot use
TRUNCATE TABLE on a table referenced by a FOREIGN KEY constraint.
Because TRUNCATE TABLE is not logged, it cannot activate a trigger.
5. TRUNCATE cannot be rolled back.
6. TRUNCATE is DDL Command.
7. TRUNCATE Resets identity of the table
Question No: 4 ( M a r k s: 1 ) http://vuzs.net
Which of the following is the correct way to find out the size of cartesian product incase of CROSS JOIN?
► the number of columns in the first table multiplied by the number of columns in the second table.
► the number of columns in the first table multiplied by the number of rows in the second table.
► the number of rows in the first table multiplied by the number of columns in the first table.
► the number of rows in the first table multiplied by the number of rows in the second table.
Question No: 5 ( M a r k s: 1 ) http://vuzs.net
Suppose
there are 8 rows and 4 columns in TABLE1 and 3 rows and 4 coulmns in
TABLE2; what is the size of the cartesian product incase of CROSS JOIN
between these two tables?
► 24
► 32
► 12
► 16
Question No: 6 ( M a r k s: 1 ) http://vuzs.net
Which of the following is not one of the properties of Transaction?
► atomicity
► consistency
► redundancy
► durability
Question No: 7 ( M a r k s: 1 ) http://vuzs.net
Which of the following is INCORRECT about VIEWS?
► It is not possible to left out the data which is not required for a specific view.
► A database view displays one or more database records on the same page.
► Views can be used as security mechanisms
► Views are generally used to focus the perception each user
has of the database.
Question No: 8 ( M a r k s: 1 ) http://vuzs.net
Each
course section is assigned a particular faculty member, and each course
section corresponds to a particular course. Conceptually, what is the
relationship between faculty and course (not course section).
► 1:1
► 1:M
► M:M
► Ternary
Question No: 9 ( M a r k s: 1 ) http://vuzs.net
Which of the following is used to add or drop columns in an existing table?
► ALTER
► HAVING
► SELECT
► THEN
Question No: 10 ( M a r k s: 1 ) http://vuzs.net
Which of the following is a correct way of selecting all the columns from a table called PERSONS?
► SELECT FROM * Persons
► SELECT * FROM Persons
► SELECT * WHERE Persons
► SELECT WHERE * Persons
Question No: 11 ( M a r k s: 1 ) http://vuzs.net
Which of the following is NOT a feature of Indexed sequential files?
► Records are stored in sequence and index is maintained.
► Dense and nondense types of indexes are maintained.
► Track overflows and file overflow areas can not be ensured.
► Cylinder index increases the efficiency
Indexed Sequential Summary:
Following are salient features of Indexed sequential file structure:
Records are stored in sequence and index is maintained.
Dense and nondense types of indexes are maintained.
Track overflows and file overflow areas are ensured.
Cylinder index increases the efficiency .
Question No: 12 ( M a r k s: 1 ) http://vuzs.net
Consider the given relations Student and Instructor as given below. Please note that
Fname and Lname also denote the First Name and Last Name respectively.
Which of the following statements is correct with respect to the two relations given above?
► The two relations are not union-compatible since their attribute names differ.
► The two relations are union-compatible since they have the same type of tuples.
► The set operations such as CARTESIAN PRODUCT and DIVISION can be pplied on these two relations.
► To find out the students who are not instructors, it is necessary to perform the operation Student ÷ Instructor.
http://vuzs.net/
Question No: 13 ( M a r k s: 1 ) http://vuzs.net
Which of the following serves as a milestone or reference point in the log file?
► Constraints
► Relations
► Check points
► Transactions identities
Checkpoint:
Checkpoint is also a record or an entry in the log file. It serves as a milestone or
reference point in the log file. At certain point in time the DBMS enters a log
entry/record in the log file and also performs certain operations listed below:
Question No: 14 ( M a r k s: 1 ) http://vuzs.net
Which of the following is not true regarding DB transactions?
► A set of database operations that are processed partly
► A database transaction is a logical unit of database operations
► A database transaction must be atomic
► A database transaction must contains the ACID property
http://vuzs.net/
Question No: 15 ( M a r k s: 1 ) http://vuzs.net
Which of the following are the general activities, which are performed during the development of application programs?
► Data input programs
► Editing
► Display
► All of given
http://vuzs.net/
Question No: 16 ( M a r k s: 1 ) http://vuzs.net
Browser based forms are developed in the following tools EXCEPT
► HTML
► Scripting language
► Front Page
► Web-based Forms
Browser Based
These are web-based forms. They are developed in HTML, scripting language or
Front Page.
Question No: 17 ( M a r k s: 1 ) http://vuzs.net
Which of the following is not a form of optical disk?
► CD ROM
► WORM
► Erasable Optical
► EEPROM
Optical disks come in three basic forms:
CD-ROM: Most optical disks are read-only. When you purchase them, they are
already filled with data. You can read the data from a CD-ROM, but you cannot
modify, delete, or write new data.
WORM: Stands for write-once, read-many. WORM disks can be written on once and
then read any number of times; however, you need a special WORM disk drive to
write data onto a WORM disk.
Erasable optical (EO): EO disks can be read to, written to, and erased just like
magnetic disks.
Question No: 18 ( M a r k s: 1 ) http://vuzs.net
Which of the following is the correct description of cache hit?
► When data is found in the cache
► When data is removed in the cache
► The number of times the cache is accessed directly by the processor
► When data is lost from the cache
When data is found in the cache, it is called a cache hit, and the effectiveness of a
cache is judged by its hit rate.
Question No: 19 ( M a r k s: 1 ) http://vuzs.net
In which of the following situations, Clustering is suitable:
► Frequently updating
► Relatively static
► Relatively deletion
► Relatively dynamic
Question No: 20 ( M a r k s: 1 ) http://vuzs.net
Only one type of constraint can be enforced in any table by CREATE command
► True
► False
Question No: 21 ( M a r k s: 1 ) http://vuzs.net
Which of the following is disadvantage of chaining technique to handle the collisions?
► Unlimited Number of elements
► Fast re-hashing
► Overhead of multiple linked lists (vuzs, Pg269)
► Maximum number of elements must be known
Question No: 22 ( M a r k s: 1 ) http://vuzs.net
Consider the following relation R and its sample data. (Consider that these are the only tuples for the given relation)
Which of the following statements is NOT correct?
► The functional dependency ProjNo -> DeptNo holds over R.
► The functional dependency (EmpNo, ProjNo) -> DeptNo holds over R.
► The functional dependency DeptNo -> ProjNo holds over R.
► The functional dependency EmpNo -> DeptNo holds over R.
This example illustrates the concept of functional
dependency. The situation modeled is that of college students visiting
one or several lectures in each which they are assigned a teaching
assistant (TA). Let's further assume that every student is in some
semester and is identified by an unique integer ID.
StudentID
|
Semester
|
Lecture
|
TA
|
1234
|
6
|
Numerical Methods
|
John
|
1200
|
4
|
Numerical Methods
|
Peter
|
1234
|
6
|
Visual Computing
|
Thomas
|
1201
|
4
|
Numerical Methods
|
Peter
|
1201
|
4
|
Physics II
|
Simone
|
We notice that whenever two rows in this table
feature the same StudentID, they also necessarily have the same Semester
values. This basic fact can be expressed by a functional dependency:
§ StudentID → Semester.
Other nontrivial functional dependencies can be identified, for example:
§ {StudentID, Lecture} → TA
§ {StudentID, Lecture} → {TA, Semester}
The latter expresses the fact that the set {StudentID, Lecture} is a superkey of the relation.
Question No: 23 ( M a r k s: 1 ) http://vuzs.net
An entity type is
► defined when the database is actually constructed
► a specific type such as an integer, text, date, logical etc
► a coherent set of similar objects that we want to store data on (e.g. STUDENT, COURSE, CAR)
► defined by the database designer
Entity Type
The
entity type can be defined as a name/label assigned to items/objects
that exist in an environment and that have similar properties.
Question No: 24 ( M a r k s: 1 ) http://vuzs.net
An entity can be logically connected to another by defining a ____.
► hyperlink
► common attribute
► primary key
► superkey
Question No: 25 ( M a r k s: 1 ) http://vuzs.net
You can’t modify more than one table at a time through a view.
► True
► False
You can’t modify more than one table at a time through a view.
If your view is based on aggregate functions, you can’t use it to modify data.
If your view is based on a
table that contains fields that don’t allow null values yet your view
doesn’t display those fields, then you won’t be able to insert new data.
Question No: 26 ( M a r k s: 1 ) http://vuzs.net
Which of the following is one of the purposes of using DML commands?
► Creating databases
► Destroying databases
► Inserting data in tables
► Non of the above
vuZs รจ Querying , deleting, inserting and updating of records are the part of DML
Question No: 27 ( M a r k s: 2 )
Question No: 28 ( M a r k s: 2 )
Define domain of an attribute.
Ans:
Domain
is the set of possible values that an attribute can have, that is, we
specify a set of values either in the form of a range or some discrete
values, and then attribute can have value out of those values. Domain is
a form of a check or a constraint on attribute that it cannot have a
value outside this set.
Question No: 29 ( M a r k s: 2 )
Write the main feature of volatile storage media?
Computer storage that is lost when the power is turned off is called as volatile storage. For example RAM
Question No: 30 ( M a r k s: 2 )
Suppose you want to delete a table row by row and
record an entry in the transaction log for each deleted row. Which DML
command will you use?
DELETE FROM ;
Question No: 31 ( M a r k s: 3 )
Write three benefits of using VIEWS.
Views are generally used to focus, simplify, and customize the perception
each user has of the database. Views can be used as security mechanisms
by allowing users to access data through the view, without granting the users
permissions to directly
access the underlying base tables of the view.Views allow users to focus
on specific data that interests them and on the specific tasks for
which they are responsible. Unnecessary data can be left out of the
view. This also increases the security of the data because users
Question No: 32 ( M a r k s: 3 )
SELECT * FROM Persons
WHERE FirstName LIKE '%da%';
what does the above statement return?
Ans: It will select all fields from the table from persons table where in the first name carry character da at any position
Question No: 33 ( M a r k s: 3 )
What is the difference between a primary key and a unique key with reference to clustered and nonclustered indexes?
- Primary key does not allow null value but unique key allows null values
- We can declare only one primary key in a table but a table can have multiple unique key
- Primary key has a cluster index so one table can have only one cluster index
- non-clustered index can be create on any key so a table can have multiple non-clusted key
Question No: 34 ( M a r k s: 5 )
Consider a table named COMPANY with fields COMPANY_NAME,
DESCRIPTION, ORDER_NUMBER. Write an SQL statement to display company names in reverse alphabetical order.
SELECT COMPANY_NAME FROM COMPANY ORDER BY COMPANY_NAME DESC;
Question No: 35 ( M a r k s: 5 )
Name the five main components of Database management systems software.
§ DBMS Engine accepts
logical request from the various other DBMS subsystems, converts them
into physical equivalents, and actually accesses the database and data
dictionary as they exist on a storage device.
§ Data Definition Subsystem helps user to create and maintain the data dictionary and define the structure of the files in a database.
§ Data Manipulation Subsystem helps user to add, change, and delete information in a
database and query it for valuable information. Software tools within
the data manipulation subsystem are most often the primary interface
between user and the information contained in a database. It allows user
to specify its logical information requirements.
§ Application Generation Subsystem contains facilities to help users to develop
transaction-intensive applications. It usually requires that user
perform a detailed series of tasks to process a transaction. It
facilitates easy-to-use data entry screens, programming languages, and
interfaces.
§ Data Administration Subsystem helps users to manage the overall database environment by
providing facilities for backup and recovery, security management, query
optimization, concurrency control, and change management.
Question No: 36 ( M a r k s: 5 )
Give 4 similarities between Materialized views and indexes.
- They consume storage space.
- They must be refreshed when the data in their master tables changes.
- They improve the performance of SQL execution when they are used for query rewrites.
- Their existence is transparent to SQL applications and users.