Wednesday 19 June 2013

Database Management Systems MCQ - III


101.     The methodology for documenting databases illustrating the relationship between various entities in the database is
(a)        Data flow diagram
(b)        State transition diagram
(c)        Entity-relationship diagram
(d)        Entity sequence diagram
(e)        Object model.

102.     The extent of the database resource that is included with each lock is called
(a)        Level of impact
(b)        Granularity
(c)        Management
(d)        DBMS control
(e)        Recovery.

103.     Check pointing when used in conjunction with incremental log reduces the actual recovery time. However, for proper recovery the system must ensure that (choose the correct one)
(a)        At the time of check pointing there is no incomplete transaction
(b)        If the updates are deferred, at the time of check pointing there is no incomplete transaction
(c)        If updates are immediate, at the time of check pointing there is no incomplete transaction
(d)        At the time of check pointing there exists an incomplete transaction
(e)        All of the above.

104.     Consider the following Employee table.
Employee Table
E_No   Job       Salary   Dept_No
178      System Analyst 25000  10
179      Software Engineer        30000  10
180      Quality Assurer 21000  20
181      Technical Writer           17000  30
182      Associate Software Engineer     20000  10
Which of the following statements gives the list of departments having average salary greater than 20000 from employee table?
(a)        SELECT Dept_No, AVG (Salary) FROM Employee ORDER BY Dept_No HAVING AVG(Salary) > 20000
(b)        SELECT Dept_No, AVG (Salary) FROM Employee HAVING AVG (Salary) > 20000
(c)        SELECT Dept_No, AVG (Salary) FROM Employee GROUP BY Dept_No HAVING AVG (Salary) > 20000
(d)        SELECT Dept_No, AVG (Salary) FROM Employee WHERE AVG (Salary) > 20000
(e)        SELECT Dept_No, AVG (Salary) FROM Employee GROUP BY Dept_No WHERE AVG (Salary) > 20000.

105.     “When a very large record of a file is allocated to disk blocks, some unused spaces will remain and to utilize this unused space, parts of records can be allocated. Each and every part belongs to a record and is referenced through a pointer.”
A record organization which has been distributed as parts among unused spaces of blocks and using a pointer to reference them is called
(a)        Blocking factor
(b)        Spanned record
(c)        Separator
(d)        Variable length record
(e)        BLOB.

106.     State the unit of storage that can store one or more records in a hash file organization
(a)        Buckets
(b)        Disk pages
(c)        Blocks
(d)        Nodes
(e)        Baskets.

107.     When implementing security in a DBMS, which of the following is not supported by the GRANT command?
(a)        Providing DELETE privileges
(b)        Supporting the devolution of access control to non-DBAs
(c)        Removing privileges of other people
(d)        Providing SELECT privileges
(e)        Changing passwords.

108.     The file organization which allows 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 file organization
(e)        Index file organization.

109.     What is the means that data used during the execution of a transaction cannot be used by a second transaction until the first one is completed is called
(a)        Serializability
(b)        Atomicity
(c)        Isolation
(d)        Time Stamping
(e)        Durability.

110.     Which of the following is an incorrect statement?
(a)        Pointer – A data model which assumes that all data relationships can be structured as hierarchies
(b)        Data model – A physical address which identifies where a record can be found on a disk
(c)        Child record – An owner record in a hierarchical relationship
(d)        Network model – A data relationship in which a record can be owned by records from more than one type
(e)        Data model – A conceptual method of structuring data.

111.     Which of the following SQL aggregate function gives the number of rows containing not null values for the given column?
(a)        MIN
(b)        COUNT
(c)        MAX
(d)        SUM
(e)        AVG.

112.     “One disadvantage of index schemes in file organizations is that an index must be accessed and read to locate records.  In order to eliminate the need for maintaining and searching indexes, the method can be used as a method of direct record addressing.”
Find the appropriate option which fills in the blanks with suitable terms for (i) and (ii).
(a)        i.     sequential
ii.     indexing
(b)        i.     indexed Sequential
ii.     hashing
(c)        i.     sequential
ii.     hashing
(d)        i.     indexed Sequential
ii.     storage
(e)        i.     sequential
ii.     storage.

113.     A Relational operator that yields all possible pairs of rows from two tables is known as a/an
(a)        Union
(b)        Intersect
(c)        Difference
(d)        Project
(e)        Product.

114.     The following are the three language components of a database management system (DBMS).
I.     Data Definition Language (DDL).
II.     Sub-schema DDL.
III.    Data Manipulation Language (DML).
Two different types of people (users and practioners) are concerned with them. Which of them do users of a DBMS usually deal with?
(a)        Only (I) above
(b)        Only (III) above
(c)        Both (I) and (II) above
(d)        Both (II) and (III) above
(e)        All (I), (II) and (III) above.

115.     In the ANSI/SPARC three level database model, the external view is best described by which of the following options?
(a)        It is the link between users and the storage structures
(b)        It is dependent on the underlying DBMS product used (e.g. Oracle, DBASE)
(c)        It is the place where the users interface to the DBMS
(d)        It is not part of the model
(e)        It is the place where the storage structures link to the database.

116.     Match each term in Column A with the most appropriate definition in Column B.
Column A         Column B
(P)   Technological feasibility     (i)    Needs information from the database to carry out the primary business responsibility
(Q)   User        (ii)    Responsible for the database system and its associated application software
(R)   Practitioner           (iii)   Determines hardware and software availability for database system
(S)   Operational feasibility        (iv)   Determines availability of expertise and personnel needed for the database system

(a)        (P)→(iii), (Q)→(i), (R)→(ii), (S)→(iv)
(b)        (P)→(iv), (Q)→(i), (R)→(ii), (S)→(iii)
(c)        (P)→(iii), (Q)→(ii), (R)→(i), (S)→(iv)
(d)        (P)→(iv), (Q)→(ii), (R)→(i), (S)→(iii)
(e)        (P)→(ii), (Q)→(i), (R)→(iii), (S)→(iv).

117.     Which of the following set of operations represent a complete set of relational algebra operations?
(a)        { σ, π, U}
(b)        { ÷ , x }
(c)        { σ, π, ∩ }
(d)        {π , ∩, x}
(e)        { – , x }.

118.     The following output is to be generated:
Fname  Minit    Ssn       Sex      Salary   SupperSsn        Dno
Sunil     T          334555            M         40000  88866  5
Amila   S          987615            F          43000  54321  4
Mahepala         K         668445            M         38000  33455  5
Which of the following would produce the above output?
(a)        s Employee ) (Dno = 4 AND Salary > 30000) OR (Dno = 5 AND Salary > 30000)
(b)        sEmployee ( ) (Ssn > 30000) AND (Sex = ’M’)
(c)       
(d)       
(e)        p (Employee)  (Employee) Fname, Minit, Ssn, Sex, SupperSsn, Dno Salary.

119.     The referential integrity rule requires that ________.
(a)        Every null foreign key value must reference an existing primary key value
(b)        An attribute have a corresponding value
(c)        You delete a row in one table whose primary key does not have a matching foreign key value in another table
(d)        Every non-null foreign key value reference an existing primary key value
(e)        Both (a) and (c) above.

120.     The lock that prevents the use of any tables in the database from one transaction while another transaction is being processed is
(a)        Database-level lock
(b)        Table-level lock
(c)        Page-level lock
(d)        Row-level lock
(e)        Field-level lock.

(a)        Collapse
(b)        Mix
(c)        Split
(d)        Merge
(e)        Shrink.

122.     Which Model describes entities, relationships and attributes?
(a)        E – R Model
(b)        Functional
(c)        Relational
(d)        Network
(e)        Info logical.

123.     Which among the following is function of DBA?
(a)        Communicating with all computer users
(b)        Classify user groups and provide authorization to access data elements
(c)        Retrieve data and supply daily reports to the top management
(d)        Install upgrades of database hardware
(e)        Monitor systems performance and increasing complexity.

124.     Which property of transaction ensures that either all operations of the transaction are reflected properly in the database or none?
(a)        Atomicity
(b)        Durability
(c)        Isolation
(d)        Consistency
(e)        Concurrency.

125.     What factors would not determine the capacity of a block of a disk organization?
(a)        Blocking factor
(b)        Record size
(c)        Block pointer
(d)        Inter-block gap
(e)        End of track.

126.     When the detection algorithm detects a deadlock, the recovery is normally accomplished by?
(a)        Roll-back of transactions
(b)        Consistency checking
(c)        Locking of data
(d)        Waiting for release of locks
(e)        Enforce two phase locking.

127.     Which of the following statement is component of DBMS?
(a)        Data dictionary/directory subsystem
(b)        Naïve Users
(c)        Database administrator
(d)        Users and programmers
(e)        Hardware and data.

128.     Which type of file is easiest to update?
(a)        Sequential
(b)        Hashed
(c)        Indexed
(d)        Clustered
(e)        Heaped.

129.     Which of the following statement will not affect the performance of a database system?
(a)        Adequate free disk storage capacity
(b)        Disk access time
(c)        Processor speed
(d)        Memory capacity
(e)        Display resolution of data.

130.     Which of the following concept(s) cannot be represented in the Enhanced Entity-Relationship Model?
(a)        Composite attribute
(b)        Derived attribute
(c)        Weak entity
(d)        Generalization relationship
(e)        Versions.

 131.    Which of the following statement is true for the 3 level architecture?
(a)        The physical schema should assist to locate the data stored on disk
(b)        The logical view of the data provides the view of data for the user
(c)        Data authorization can be specified for the physical schema
(d)        Program/data independence is eliminated due to this architecture
(e)        New data cannot be derived with the help of sub-schemas.

132.     In an SQL statement, which of the following parts states the condition for Group selection?
(a)        Select
(b)        From
(c)        Where
(d)        Group By
(e)        Having.

133.     Which normal form states that a relation has no transitive dependencies in it?
(a)        First
(b)        Second
(c)        Third
(d)        Fourth
(e)        BCNF.

134.     Which of the following collection(s) of attributes correctly represent(s) a Lecturer relation and possible relationship(s) it might have with other relations when the E-R model is mapped into a relational model?
(a)        Name, UPFNo, Address, Phone
(b)        Name, UPFNo, Address, Phone, Subject, lecturehours
(c)        Name, UPFNo, Address, Phone, Subject
(d)        Name, UPFNo, Address, Phone, Faculty
(e)        Name, UPFNo, Address, Phone, Subject, Faculty, Dean.

135.     Which of the following statement can be considered as a part of data dictionary?
(a)        Metadata
(b)        The complete set of data records
(c)        Data flow diagram of the system
(d)        Use cases
(e)        An Entity-Relationship diagram of the schema.

136.     Which procedure is used 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.

137.     Which attribute that can be further subdivided to yield additional attributes?
(a)        Composite
(b)        Simple
(c)        Single-valued
(d)        Multi-valued
(e)        Derived.

138.     Which of the following statement is not true?
(a)        Stored procedures can receive and return parameters
(b)        CHECK (bonus <= 0.10 * salary) will ensure that no employee gets a bonus exceeding 10% of the salary
(c)        A graphical language is a computer language whose statements consist of character string symbols
(d)        A database application development environment provides variety types of controls such as drop-down list boxes and buttons
(e)        Event-driven facility is supported by 4GL-application development environment.

139.     The term used to identify a row of a table in the relational data model is
(a)        Cardinality
(b)        Data
(c)        Data Set
(d)        Tuple
(e)        Record.

140.     Employees, Customers, Account, Vehicle are examples of
(a)        Attributes
(b)        Entities
(c)        Fields
(d)        Columns
(e)        Domains.


141.     How a null value is created or represented?
(a)        A zero
(b)        A space
(c)        Entering a value
(d)        Pressing the Enter key without making a prior entry of any kind
(e)        Pressing the ESC key.

142.     What does a multi level index lead to?
(a)        Binary Tree
(b)        B-tree
(c)        Mapping
(d)        Transaction Failure
(e)        Dead Lock.

143.     Select the incorrect statement describing the keys used in a Relational Data Model.
(a)        A primary key is an attribute that uniquely identifies each row in a relation
(b)        A composite key is a primary key that consists of more than one attribute
(c)        A foreign key can be an attribute in a relation of a database that draws values from the same domain as a primary key of another relation in the same database
(d)        Candidate key is an attribute that uniquely identifies a column in a relation
(e)        One field or combination of fields for which more than one record may have the same combination of values is called the secondary key.

144.     Choose the Suitable example for derived attribute from the following:
(a)        Roll no
(b)        Name
(c)        Marks
(d)        Age
(e)        Phone number.

145.     Which clause is used to produce a list of only values that are different from one another?
(a)        Aggregate
(b)        Restricted
(c)        Select
(d)        Distinct
(e)        Group By.

146.     What is the maximum height of a B+-tree of order m with n key values?
(a)        M
(b)        long m/2  n/2
(c)        long m n
(d)        log n m
(e)        log  m/2 (n/2) + 1.

147.     Which set of operators represents the complete set for relational algebra?
(a)        Union, Difference, Projection, Selection, Cartesian Product
(b)        Selection, Cartesian Product, Projection, Union, Intersection
(c)        Cartesian Product, Projection, Selection, Difference, Intersection
(d)        Join, Union, Projection, Selection, Difference
(e)        Difference, Projection, Selection, Join, Intersection.

148.     Which of the following RAID level is also called a rotating parity array?
(a)        1
(b)        2
(c)        5
(d)        4
(e)        0.

149.     Fill in the blanks by selecting the correct option(s) given below:
“In a relational data model, the columns of a table are called  and the rows are called tuples.  The primary key index does not allow data in a field. Views has characteristics of tables and can be used for .”
(a)        (i)  keys          (ii) multiple                       (iii) queries
(b)        (i)  fields        (ii) enter                           (iii) reports
(c)        (i)  fields        (ii) duplicate         (iii) queries
(d)        (i)  data          (ii) enter                           (iii) form
(e)        (i)  attributes   (ii) duplicate         (iii) reports.

150.     What storage device can be used to create an index sequential file?
(a)        ISAM
(b)        Direct Access
(c)        Sequential access
(d)        Tape
(e)        Hashed.



Answers

101.     Answer : (c)
Reason  :       ER diagram describes the relationships among the various entities in the database.
102.     Answer : (b)
Reason  :       The  extent of the database resource that is included with each lock is called the level of Granularity.
103.     Answer : (a)
Reason  :       At the time of check pointing there is no incomplete transaction.
104.     Answer : (c)
Reason  :       SELECT Dept_No,AVG(Salary) FROM Employee GROUP BY Dept_No HAVING AVG(Salary)>20000.
105.     Answer : (b)
Reason  :       The record organization is called as Spanned record .
106.     Answer : (a)
Reason  :       Buckets are used to store one or more records in a hash file organization.
107.     Answer : (a)
Reason  :       while implementing security to the database delete facility should not be provided to the users.
108.     Answer : (c)
Reason  :       Clustering file organization allows us to read records that would satisfy the join condition by using one block read.
109.     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.
110.     Answer : (b)
Reason  :       Data model – A physical address which identifies where a record can be found on a disk.

111.     Answer : (b)
Reason  :       Count function gives the number of rows containing not null values for the given column.
112.     Answer : (b)
Reason  :       (i) indexed Sequential (ii) hashing.
113.     Answer : (e)
Reason  :       product is the Relational operator that yields all possible pairs of rows from two tables.
114.     Answer : (b)
Reason  :       The users and practioners are concerned with only Data manipulation language component of DBMS.
115.     Answer : (c)
Reason  :       It is the place where the users interface to the DBMS.
116.     Answer : (a)
Reason  :       (P)→(iii), (Q)→(i), (R)→(ii), (S)→(iv)
117.     Answer : (a)
Reason  :       { σ, π, U } are the sets of operations which represent a complete set of relational algebra operations.
118.     Answer : (c)
Reason  :  
119.     Answer : (d)
Reason  :       The basic requirement of referential integrity is that every non-null foreign key value reference an existing primary key value.
120.     Answer : (a)
Reason  :       Data base-level lock prevents the use of any tables in the database from one transaction while other transaction is being processed.
Reason:  classify user groups and  provide authorization to access data elements
122.     Answer : (a)
Reason:  Except A remaining all are different users of the database system.
123.     Answer : (a)
Reason:  The physical schema should assist to locate the data stored on disk.
124.     Answer : (a)
Reason:  meta data is a part of data dictionary
125.     Answer : (d)
Reason:  Tuple is the term used to identify row  of a table in relation model
126.     Answer : (d)
Reason:  Candidate key is not the only  an attribute that uniquely identifies a column in a relation.
127.     Answer : (a)
Reason:  Union, Difference, Projection, Selection, Cartesian Product is the complete set of relational algebra.
128.     Answer : (e)
Reason:  E is the apt choice of order for the given question.
129.     Answer : (a)
Reason:  E – R Model Model describes entities, relationships and attributes?
130.     Answer : (a)
Reason:  When the detection algorithm detects a deadlock, the recovery is normally accomplished by Roll-back of transactions.

131.     Answer : (d)
Reason:  Generalization relationship cannot be represented in the Enhanced Entity-Relationship Model
132.     Answer : (d)
Reason:  The following collection(s) of attributes correctly represent(s) a Lecturer relation and possible relationship(s) it might have with other relations when the E-R model is mapped into a relational model. Name, UPFNo, Address, Phone, Faculty
133.     Answer : (c)
Reason:  A graphical language is a computer language whose statements consist of character string symbols.
134.     Answer : (b)
Reason:  B-tree leads to multilevel index.
135.     Answer : (e)
Reason:  The maximum height of a B+-tree of order m with n key values is log  m/2 (n/2) + 1
136.     Answer : (b)
Reason:  Direct Access can be used to create an index sequential file.
137.     Answer : (c)
Reason:  Splitting will happen to leaf and internal nodes if data is inserted into a B-tree
138.     Answer : (e)
Reason:  End of track would not determine the capacity of a block of a disk organization
139.     Answer : (e)
Reason:  E choice will not affect the performance of a database system
140.     Answer : (c)
Reason:  Third normal form states that a relation has no transitive dependencies in it

141.     Answer : (a)
Reason:  Composite attribute that can be further subdivided to yield additional attributes
142.     Answer : (d)
Reason:  A null value is created or represented by pressing the Enter key without making a prior entry of any kind.
143.     Answer : (d)
Reason:  Distinct clause is used to produce a list of only values that are different from one another
144.     Answer : (a)
Reason:  Atomicity property of transaction ensures that either all operations of the transaction are reflected properly in the database or none.
145.     Answer : (b)
Reason:  Hashed type of file is easiest to update.
146.     Answer : (e)
Reason:  Having states the condition for Group Selection
147.     Answer : (d)
Reason:  Two phase lock   procedure is used for acquiring the necessary locks for a transaction where all necessary locks are acquired before any are released
148.     Answer : (b)
Reason:  Employees, Customers, Account, Vehicle  are examples of Entities.
149.     Answer : (d)
Reason:  Age is the derived attribute
150.     Answer : (c)
Reason:  RAID level 5  is also called a rotating parity array


No comments:

Post a Comment