Wednesday 19 June 2013

Database Management Systems MCQ - II

51.
The most recent version of standard SQL prescribed by the American National Standards Institute is
(a)   SQL-99             (b)  SQL 2002          (c)  SQL – 4             (d)  SQL2             (e)  SQL PLUS.
52.
ANSI-standard SQL allows the use of special operators in conjunction with the WHERE clause.  A special operator used to check whether an attribute value is null is
(a)   BETWEEN        (b)  IS NULL            (c)  LIKE                  (d)  IN                     (e)  Exists.
53.
A lock that prevents the use of any tables in the database from one transaction while another transaction is being processed is called a
(a)   Database-level lock                         (b)  Table-level lock                     (c)  Page-level lock
(d)   Row-level lock                                 (e)  Field-level lock.
54.
A condition that occurs when two transactions wait for each other to unlock data is known as a(n)
(a)   Shared lock                                    (b)  Exclusive lock   (c)  Binary lock
(d)   Two-phase lock                               (e)  Deadlock.
55.
_______ means that data used during the execution of a transaction cannot be used by a second transaction until the first one is completed.
(a)   Serializability                                   (b)  Atomicity          (c)  Isolation           
(d)  Time stamping                                                               (e)  Durability.
56.
A unit of storage that can store one or more records in a hash file organization is denoted as
(a)   Buckets            (b)  Disk pages       (c)  Blocks              (d)  Nodes               (e)  Baskets.
57.
The file organization which allows us to read records that would satisfy the join condition by using one block read is
(a)   Heap file organization                      (b)  Sequential file organization
(c)   Clustering file organization               (d)  Hash files organization                  (e)  Index File.
58.
Which of the following is not true about B+ trees?
(a)   B+ tree index takes the form of balanced tree
(b)   Performance of B+ tree degrades as the file grows
(c)   Look-up in B+ tree is straightforward and efficient
(d)   Insertion and deletion in B+ tree is complicated but efficient
(e)   None of the above.
59.
The extent of the database resource that is included with each lock is called the level of
(a)   Impact              (b)  Granularity         (c)  Management     
(d)  DBMS control      (e)  Recovery.
60.
DBMS periodically suspends all processing and synchronizes its files and journals through the use of
(a)   Checkpoint facility                           (b)  Backup facility                   (c)  Recovery manager
(d)   Database change log                      (e)  Shadow Paging.
61.
When converting one (1) to many (N) binary relationship into tables, the recommended solution is usually
(a)
One big table with all attributes from both entities included
(b)
Foreign key added on the Child (many side) referencing the parent
(c)
Foreign key added on the Parent (one side) referencing the child
(d)
Foreign key added on both sides (both tables)  
(e)
Primary Key is added on one side.
62.
Which of the following is not correct?
(a)
Each entity must include some descriptive information
(b)
If an object only requires an identifier, it should be classified as an attribute
(c)
Each multivalued attribute should be classified as an entity even if it does not have any descriptive information
(d)
The procedure of identifying entities and attaching attributes always leads to a unique solution
(e)
Every entity is a collection of attributes.
63.
The property of transaction which ensures that either all operations of the transaction are reflected properly in the database or none, is called
(a)
Atomicity
(b)
Durability
(c)
Isolation 
(d)
Consistency
(e)
Deadlock.
64.
Which of the following is correct?
(a)
Function dependencies are not associated with relations; they are based on the semantics of information that we are dealing with
(b)
If a relation has no redundant information its attributes must not have any function dependencies
(c)
Functional dependencies may be determined if we are given several instances of a relation
(d)
The FDs that hold for attributes of a relation need not be satisfied at all times
(e)
BCNF is a fourth normal form.
65.
An entity type whose existence depends on another entity type is called a _____ entity.
(a)
Strong
(b)
Weak
(c)
Codependent
(d)
Variant
(e)
Independent.
66.
A property or characteristic of an entity type that is of interest to the organization is called an
(a)
Attribute
(b)
Coexisting entity
(c)
Relationship
(d)
Cross-function
(e)
Weak entity.
67.
A relationship between the instances of a single entity type is called a _____ relationship.
(a)
Ternary
(b)
Primary
(c)
Binary
(d)
Auxiliary
(e)
Unary.
68.
A ________ attribute is an attribute that can be further subdivided to yield additional attributes.
(a)
Composite
(b)
Simple
(c)
Single-valued
(d)
Multi-valued
(e)
Derived.
69.
In a super type/subtype hierarchy, each subtype has
(a)
Only one super type
(b)
Many super types
(c)
At most two super types
(d)
At least one subtype
(e)
Not at all.
70.
The hierarchical database model uses the hierarchic sequence that always starts at
(a)
The right side of the tree
(b)
The left side of the tree
(c)
The top of the tree
(d)
The bottom of the tree
(e)
Middle of the above.
71.
Which of the following is a component of the relational data model included to specify business rules to maintain the integrity of data when they are manipulated?
(a)
Business rule constraint
(b)
Data integrity
(c)
Business integrity
(d)
Data structure
(e)
Entity Integrity.
72.
A null value is created or represented by
(a)
A zero
(b)
A space
(c)
Entering a value
(d)
Pressing the ESC key
(e)
Pressing the Enter key without making a prior entry of any kind.
73.
A functional dependency between two or more non-key attributes is called
(a)
Partial functional dependency
(b)
Partial non-key dependency
(c)
Transitive dependency
(d)
Partial transitive dependency
(e)
Key dependency.
74.
Which of the following is a classical approach to database design?
(a)
Top-down approach
(b)
Left-side approach  
(c)
Right-side approach
(d)
Backwards approach
(e)
Middleware.
75.
In the context of a database table, the statement "A determines B" indicates that
(a)
Knowing the value of attribute A you can not look up the value of attribute B
(b)
You do not need to know the value of attribute A in order to look up the value of attribute B
(c)
Knowing the value of attribute B you can look up the value of attribute A
(d)
Knowing the value of attribute A you can look up the value of attribute B
(e)
None of the above.
76.
Which of the following Relational Algebra operations require that both tables (or virtual tables) involved have the exact same attributes/data types?
(a)
Join, Projection, Restriction
(b)
Multiplication and Division
(c)
Union, Intersection, Minus
(d)
Minus, Multiplication, Intersection
(e)
Projection, Selection, Rename.
77.
Which type of file is easiest to update?
(a)
Sequential
(b)
Hashed
(c)
Indexed
(d)
Clustered
(e)
Random.
78.
A method that speeds query processing by running a query at the same time against several partitions of a table using multi processors is called
(a)
Multiple partition query
(b)
Perpendicular query processing
(c)
Parallel query processing
(d)
Query optimization
(e)
Query Execution.
79.
The protocol that ensures conflict serializability is
(a)
Time stamp ordering protocol            
(b)
Two phase locking protocol       
(c)
Concurrency protocol
(d)
Tree protocol
(e)
Layered Protocol.
80.
Indexes are created in most RDBMS’s to
(a)
Provide a quicker way to store data
(b)
Decrease the amount of disk space utilized
(c)
Provide rapid, random and sequential access to base-table data
(d)
Increase the cost of implementation
(e)
Decrease the cost of implementation.
81.
What does the following SQL statement do?
Select * From Customer Where Cust_Type = "Best";
(a)
Selects all the fields from the Customer table for each row with a customer labeled "best"
(b)
Selects the "*" field from the Customer table for each row with a customer labeled "best"
(c)
Selects fields with a "*" in them from the Customer table
(d)
Selects all the fields from the Customer table for each row with a customer labeled "*"
(e)
Counts all records and displays the value.
82.
In an SQL statement, which of the following parts states the conditions for row selection?
(a)
Select
(b)
From
(c)
Order By
(d)
Group By
(e)
Where.
83.
Which of the following questions is answered by the SQL statement?
Select Count (Product_Description) from Product_T;
(a)
How many products are in the Product Table?
(b)
How many different product descriptions are in the Product Table?
(c)
How many characters are in the field name "Product_Description"?
(d)
How many different columns named "Product Description” is there in table Product_T?
(e)
How many total records in a table?
84.
All of the following are advantages of SQL-invoked routines EXCEPT
(a)
Flexibility
(b)
Efficiency
(c)
Sharability
(d)
Security
(e)
Easy of use.
85.
A type of query that is placed within a WHERE or HAVING clause of another query is called
(a)
Master query
(b)
Sub query
(c)
Super query
(d)
Multi-query
(e)
Co-related query.
86.
Which of the following is a procedure for acquiring the necessary locks for a transaction where all necessary locks are acquired before any are released?
(a)
Record controller
(b)
Exclusive lock
(c)
Authorization rule
(d)
Two phase lock
(e)
Three Phase lock.
87.
Out of the following activities, which is the one that normally performed by DBMS, without the interference of the DBA?
(a)
Integrity
(b)
Retention
(c)
Security
(d)
Granting the Privileges
(e)
Recovery.
88.
Horizontal Fragmentation is
(a)
Divide the data up by logical groups of records
(b)
Divide the data up by logical groups of attributes
(c)
Divide the data up by logical groups of entities
(d)
Divide the data up by logical groups of files
(e)
Divide the data up by logical frames.
89.
An index record appears for every search key value in the file is
(a)
Secondary index
(b)
Dense index
(c)
Sparse index
(d)
Multi level index
(e)
B+ tree.
90.
Which of the following type of index is automatically created when we do not specify?
(a)
Bitmap
(b)
Balanced Tree Index
(c)
Binary Tree Index
(d)
Hashed
(e)
Sparse Index.
91.
A database management software (DBMS) includes
(a)
Automated tools (CASE) used to design databases and application programs
(b)
A software application that is used to define, create, maintain and provide controlled access to user databases
(c)
Application programs that are used to provide information to users
(d)
Database that contains occurrences of logically organised data or information
(e)
Repository of meta data, which is a central storehouse for all data definitions, data relationships,
 screen and report formats and other system components.
92.
Making a change to the conceptual schema of a database but not affecting the existing external schemas is an example of
(a)
Physical data independence
(b)
Concurrency Control
(c)
Logical data independence
(d)
Functional dependency
(e)
Integrity Control.
93.
If K is a foreign key in a relation R1, then
(a)
Every tuple of R1 has a distinct value for K
(b)
K cannot have a null value for tuples in R1
(c)
K is a key for some other relation
(d)
K is a Primary key for R1
(e)
K is a Composite key for R1.
94.
Which of the following concept is applicable with respect to 2NF?
(a)
Full functional dependency
(b)
Partial dependency
(c)
Transitive dependency
(d)
Non-transitive dependency
(e)
Data independence.
95.
Consider the following relation:
Attribute 1
Attribute 2
Attribute 3
Attribute 4
Attribute 5
A1
B2
C1
D4
E3
A3
B2
C3
D2
E4
A1
B3
C1
D1
E2
A2
B4
C1
D4
E5
What are the functional dependencies which apply to the above relation?
(a)
Attribute 1  à   Attribute 3
(b)
Attribute 4  à   Attribute 5
(c)
Attribute 3  à   Attribute 5
(d)
Attribute 2  à   Attribute 1
(e)
Attribute 4  à   Attribute 2.
96.
Embedded SQL means
(a)
Using the EMBED key word in a SQL statement
(b)
Writing a SQL statement to retrieve data from more than one relation
(c)
Writing SQL statements within codes written in a general programming language
(d)
Specifying a condition and action to be taken in case the given condition is satisfied in a trigger
(e)
Using SQL language constructs like revoke and grant respectively for revoking and granting privileges to users.
97.
“In 1978 committee proposed a generalized framework for database systems and it provides a three_level architecture. The of the architecture defines user views of the database. The defines the physical view of the database. The defines the logical schema of the database.”
Which of the following set is suitable to fill the blanks in the above paragraph?
(a)
i.     ANSI/ARPANET
ii.     Conceptual Level
iii.    External Level
iv.    Internal Level
(b)
i.     ANSI/SPARC
ii.     Conceptual Level
iii.    External Level
iv.    Internal Level
(c)
i.     .ANSI/ARPANET
ii.     External Level
iii.    Internal Level
iv.    Conceptual Level
(d)
i.     ANSI/SPARC
ii.     External Level
iii.    Internal Level
iv.    Conceptual Level
(e)
i.     W3C
ii.     Internal Level
iii.    External Level
iv.    Conceptual Level.
98.
Consider the following ER diagram depicting the relationship of an employee and supervisor:
What is the possible relation if the above ERD is mapped into a relational model?
(a)
Employee (EmpID, BirthDate, Salary, Name(FirstName, MiddleName, LastName))
(b)
Employee (EmpID, BirthDate, Salary, Name(FirstName, MiddleName, LastName)}
(c)
Supervision (EmpID, BirthDate, Salary, Name(FirstName, MiddleName, LastName), EmpID)
(d)
Supervisor (SupervisorID, BirthDate, Salary, Name(FirstName, MiddleName, LastName),EmpID), {EmpID})
(e)
Employee (EmpID, BirthDate, Salary, Name(FirstName, MiddleName, LastName), SupervisorID).
99.
Select the correct statement from the following on proper naming of schema constructs:
(a)
Entity type name applies to all the entities belonging to that entity type and therefore a plural name is selected for entity type
(b)
In the narrative description of the database requirements, verbs tend to indicate the names of
 relationship types
(c)
The nouns arising from a database requirement description can be considered as names of attributes
(d)
Additional nouns which are appearing in the narrative description of the database requirements
represent the weak entity type names
(e)
Adjectives written in the database requirement description help to identify the partial relationships among entities.
100.
Consider the following table obtained using Student and Instructor relations.
Fname
Lname
Ajith
Gamage
Sujith
Hewage
Kasun
Peiris
Which relational algebra operation could have been applied on the pair of relations Student and Instructor to obtain the above data?
(a)
Student ∩ Instructor
(b)
Instructor ÷ Student
(c)
Student – Instructor
(d)
Student ∪ Instructor
(e)
Instructor – Student.

Answers

51.
Answer : (a)
Reason : SQL-99 is the most recent version of standard SQL prescribed by the ANSI      
52.
Answer : (e)
Reason: Exists is used to check whether an attribute value is null or not in conjunction with the where clause.       
53.
Answer : (a)
Reason: Data base-level lock prevents the use of any tables in the data base from one transaction while other transaction is being processed.      
54.
Answer : (e)
Reason : Deadlock occurs when two transactions wait for each other to unlock data
55.
Answer : (c)
Reason: isolation means that data used during the execution of a transaction can’t be used by a second transaction until the first one is completed.
56.
Answer : (a)
Reason: Buckets are used to store one or more records in a hash file organization.      
57.
Answer : (c)
Reason: Clustering file organization allows us to read records that would satisfy the join condition by using one block read.           
58.
Answer : (b)
Reason :        The answer is evident   
59.
Answer : (b)
Reason: The extent of the data base resource that is included with each lock is called the level of Granularity. 
60.
Answer : (a)
Reason: DBMS periodically suspends all processing and synchronizes its files and journals though the use of  Check point facility.
61.
Answer : (b)
Reason:  When converting one (1) to many (N) binary relationship into tables, the recommended solution is Foreign key added on the Child (many side) referencing the parent
62.
Answer : (d)
Reason:  The procedure of identifying entities and attaching attributes always leads to a unique solution
63.
Answer : (a)
Reason:  Atomicity is the property of transaction which ensures that either all operations of the transaction are reflected properly in the database or none
64.
Answer : (a)
Reason:  Function dependencies are not associated with relations; they are based on the semantics of information that we are dealing with.
65.
Answer : (b)
Reason:  Entity type whose existence depends on another entity type is called a weak entity
66.
Answer : (a)
Reason:  A property or characteristic of an entity type that is of interest to the organization is called attribute
67.
Answer : (e)
Reason:  A relationship between the instances of a single entity type is called a Unary relationship.
68.
Answer : (a)
Reason:  Composite attribute is an attribute that can be further subdivided to yield additional attributes.
69.
Answer : (a)
Reason:  In a super type/subtype hierarchy, each subtype has only one super type
70.
Answer : (b)
Reason:  The hierarchical database model uses the hierarchic sequence that always starts at the left side of the tree
71.
Answer : (b)
Reason:  Data integrity is  a component of the relational data model included to specify business rules to maintain the integrity of data when they are manipulated
72.
Answer : (e)
Reason:  A null value is created or represented by Pressing the Enter key without making a prior entry of any kind
73.
Answer : (c)
Reason:  A functional dependency between two or more non-key attributes is called transitive dependency
74.
Answer : (a)
Reason:  top-down approach is a classical approach to database design           
75.
Answer : (d)
Reason:  Knowing the value of attribute A you can look up the value of attribute B.
76.
Answer : (c)
Reason:  n relational algebra Union, Intersection, Minus operations require that both tables (or virtual tables) involved have the exact same attributes/data types.
77.
Answer : (b)
Reason:  Hash file is easiest to update
78.
Answer : (c)
Reason:  A method that speeds query processing by running a query at the same time against several partitions of a table using multi processors is called parallel query processing.
79.
Answer : (a)
Reason:  The protocol that ensures conflict serializability is time stamp ordering protocol.
80.
Answer : (c)
Reason:  Indexes are created in most RDBMS’s to Provide rapid, random and sequential access to base-table data
81.
Answer : (a)
Reason:  Select
82.
Answer : (e)
Reason:  In an SQL statement where clause states the conditions for row  selection
83.
Answer : (b)
Reason:  How many different product descriptions are in the Product Table?
84.
Answer : (d)
Reason:  Security
85.
Answer : (b)
Reason:  Sub-query that is placed within a WHERE or HAVING clause of another query
86.
Answer : (d)
Reason:  Two-phase lock is a      procedure for acquiring the necessary locks for a transaction where all necessary locks are acquired before any are released
87.
Answer : (e)
Reason:  Recovery is the one that normally is performed by DBMS, without the interference of the DBA
88.
Answer : (a)
Reason:  Divide the data up by logical groups of records.
89.
Answer : (b)
Reason:  Dense Index record appears for every search key valued in the file.
90.
Answer : (b)
Reason:  Balanced Tree Index is automatically created when we do not specify.
91.
Answer : (b)
Reason  :       A software application that is used to define, create, maintain and provide controlled access to user databases.
92.
Answer : (c)
Reason  :       Logical data independence refers to making a change to the conceptual schema of a database but not affecting the existing external schemas.
93.
Answer : (c)
Reason  :       If k is a foreign key in a relation R1, then K is a key for some other relation.
94.
Answer : (a)
Reason  :       Full functional dependency is applicable with respect to 2NF.
95.
Answer : (a)
Reason  :       Attribute 1  à   Attribute 3 are  the Functional dependencies that applies to the given relation.
96.
Answer : (c)
Reason  :       Embedded SQL refers to writing SQL statements within codes written in a general programming language.
97.
Answer : (d)
Reason  :       i).ANSI/SPARC ii) External Level iii)Internal Level iv) Conceptual Level
98.
Answer : (e)
Reason  :       Employee(EmpID, BirthDate, Salary, Name(FirstName, MiddleName, LastName),SupervisorID) is the possible relation if the given ERD is mapped into a relational data model.
99.
Answer : (b)
Reason  :       In the narrative description of the database requirements, verbs tend to indicate the names of relationship types.
100.
Answer : (e)
Reason  :       Instructor – Student is the relational algebra operation that could be applied on the pair of relations Student and Instructor to obtain the above data.



No comments:

Post a Comment