Showing posts with label Relational calculus. Show all posts
Showing posts with label Relational calculus. Show all posts

Wednesday, September 23, 2020

Database Systems MCQ

 Q.1 In the relational modes, cardinality is termed as:

(A) Number of tuples. 

(B) Number of attributes.

(C) Number of tables. 

(D) Number of constraints.

Ans: A


Q.2 Relational calculus is a

(A) Procedural language. 

(B) Non- Procedural language.

(C) Data definition language. 

(D) High level language.

Ans: B


Q.3 The view of total database content is

(A) Conceptual view. 

(B) Internal view.

(C) External view. 

(D) Physical View.

Ans: A


Q.4 Cartesian product in relational algebra is

(A) a Unary operator. 

(B) a Binary operator.

(C) a Ternary operator. 

(D) not defined.

Ans: B Cartesian product in relational algebra is a binary operator. (It requires two operands. e.g., PXQ)


Q.5 DML is provided for

(A) Description of logical structure of database.

(B) Addition of new structures in the database system.

(C) Manipulation & processing of database.

(D) Definition of physical structure of database system.

Ans: C DML is provided for manipulation & processing of database. (Data stored in the database is processed or manipulated using data manipulation language commands as its name)


Q.6 ‘AS’ clause is used in SQL for

(A) Selection operation. 

(B) Rename operation.

(C) Join operation. 

(D) Projection operation.

Ans: B ‘AS’ clause is used in SQL for rename operation. (e.g., SELECT ENO AS EMPLOYEE_NO FROM EMP)


Q.7 ODBC stands for

(A) Object Database Connectivity.

(B) Oral Database Connectivity.

(C) Oracle Database Connectivity.

(D) Open Database Connectivity.

Ans: D


Q.8 Architecture of the database can be viewed as

(A) two levels. 

(B) four levels.

(C) three levels. 

(D) one level.

Ans: C


Q.9 In a relational model, relations are termed as

(A) Tuples. 

(B) Attributes

(C) Tables. 

(D) Rows.

Ans:


Q.10 The database schema is written in

(A) HLL 

(B) DML

(C) DDL 

(D) DCL

Ans: C


Q.11 In the architecture of a database system external level is the

(A) physical level. 

(B) logical level.

(C) conceptual level 

(D) view level.

Ans: D


Q.12 An entity set that does not have sufficient attributes to form a primary key is a

(A) strong entity set. 

(B) weak entity set.

(C) simple entity set. 

(D) primary entity set.

Ans: B


Q.13 In a Hierarchical model records are organized as

(A) Graph. 

(B) List.

(C) Links. 

(D) Tree.

Ans: D


Q.14 In an E-R diagram attributes are represented by

(A) rectangle. 

(B) square.

(C) ellipse. 

(D) triangle.

Ans: C


Q.15 In case of entity integrity, the primary key may be

(A) not Null 

(B) Null

(C) both Null & not Null. 

(D) any value.

Ans: A


Q.16 In tuple relational calculus P1 -> P2 is equivalent to

(A) ¬P1vP2 

(B) P1vP2

(C) P1^P2 

(D) P1^¬P2

Ans: A In tuple relational calculus P1 -> P2 is equivalent to ¬P1vP2. (The logical implication expression A->B, meaning if A then B,is equivalent to ¬AvB)


Q.17 The language used in application programs to request data from the DBMS is referred to as the

(A) DML 

(B) DDL

(C) VDL 

(D) SDL

Ans: A


Q.18 A logical schema

(A) is the entire database.

(B) is a standard way of organizing information into accessible parts.

(C) describes how data is actually stored on disk.

(D) both (A) and (C)

Ans: A


Q.19 Related fields in a database are grouped to form a

(A) data file. 

(B) data record.

(C) menu. 

(D) bank.

Ans: B Related data fields in a database are grouped to form a data record. (A record is a collection of related fields)


Q.20 The database environment has all of the following components except:

(A) users. 

(B) separate files.

(C) database. 

(D) database administrator.

Ans: A


Q.21 The language which has recently become the defacto standard for interfacing application programs with relational database system is

(A) Oracle. 

(B) SQL.

(C) DBase. 

(D) 4GL.

Ans: B


Q.22 The way a particular application views the data from the database that the application uses is a

(A) module. 

(B) relational model.

(C) schema. 

(D) sub schema.

Ans: D


Q.23 In an E-R diagram an entity set is represent by a

(A) rectangle. 

(B) ellipse.

(C) diamond box. 

(D) circle.

Ans: A


Q.24 A report generator is used to

(A) update files. 

(B) print files on paper.

(C) data entry. 

(D) delete files.

Ans: B

Tuesday, September 22, 2020

Database Systems MCQ

 Q.1 Which of the following relational algebraic operations is not from set theory?

(A) Union

(B) Intersection

(C) Cartesian Product

(D) Select

Ans: (D)

 

Q.2 Which of the following ensures the atomicity of the transaction?

(A) Transaction management component of DBMS

(B) Application Programmer

(C) Concurrency control component of DBMS

(D) Recovery management component of DBMS

Ans: (A)

 

Q.3 If both the functional dependencies : X->Y and Y->X hold for two attributes X and Y then the relationship between X and Y is

(A) M:N

(B) M:1

(C) 1:1

(D) 1:M

Ans: (C)

 

Q.4 What will be the number of columns and rows respectively obtained for the operation, AB, if A B are Base union compatible and all the rows of a are common to B? Assume A has 4 columns and 10 rows; and B has 4 columns and 15 rows

(A) 4,0

(B) 0,0

(C) 4,5

(D) 8,5

Ans: (A)

 

Q.5 For correct behaviour during recovery, undo and redo operation must be

(A) Commutative

(B) Associative

(C) idempotent

(D) distributive

Ans: (C)

 

Q.6 Which of the following is not a consequence of non-normalized database?

(A) Update Anomaly

(B) Insertion Anomaly

(C) Redundancy

(D) Lost update problem

Ans: (D)

 

Q.7 Which of the following is true for relational calculus?

(A) "x(P(x))º¬($x)(¬P(x)) 

(B) "x(P(x))º¬($x)(P(x))

(C) "x(P(x))º($x)(¬P(x)) 

(D) "x(P(x))º($x)(P(x))

Ans: (A)


Q.8 The part of a database management system which ensures that the data remains in a consistent state is

(A) authorization and integrity manager

(B) buffer manager

(C) transaction manager

(D) file manager

Ans: (C)

 

Q.9 Relationships among relationships can be represented in an-E-R model using

(A) Aggregation

(B) Association

(C) Weak entity sets

(D) Weak relationship sets

Ans: (A)

 

Q.10 In tuple relational calculus P1 AND P2 is equivalent to

(A) (¬P1OR¬P2).

(B) ¬(P1OR¬P2).

(C) ¬(¬P1OR P2).

(D) ¬(¬P1OR ¬P2).

Ans: (D)

 

Q.11 If α->β holds then so does

(A) ϒα->ϒβ

(B) α->ϒβ

(C) both (A) and (B)

(D) None of the above

Ans: (A)

 

Q.12 Cascading rollback is avoided in all protocol except

(A) strict two-phase locking protocol.

(B) tree locking protocol

(C) two-phase locking protocol

(D) validation based protocol.

Ans: (D)

 

Q.13 Wait-for graph is used for

(A) detecting view serializability.

(B) detecting conflict serializability.

(C) deadlock prevention

(D) deadlock detection

Ans: (D)

 

Q.14 The expression sq1(E1 |X|q2E2) is the same as

(A) E1 |X|q1^ q2E2 (B) sq1 E1^sq2 E2

(C) E1 |X|q1 q2E2 (D) None of the above

Ans: (A)

 

Q.15 The clause alter table in SQL can be used to

(A) add an attribute

(B) delete an attribute

(C) alter the default values of an attribute

(D) all of the above

Ans: (D)

 

Q. 16 The data models defined by ANSI/SPARC architecture are

(A) Conceptual, physical and internal

(B) Conceptual, view and external

(C) Logical, physical and internal

(D) Logical, physical and view

Ans: (D)

 

Q.17 Whenever two independent one-to-many relationships are mixed in the same relation, a _______ arises.

(A) Functional dependency

(B) Multi-valued dependency

(C) Transitive dependency

(D) Partial dependency

Ans:(B)

 

Q.18 A table can have only one

(A) Secondary key

(B) Alternate key

(C) Unique key

(D) Primary key

Ans: (D)

 

Q.19 Dependency preservation is not guaranteed in

(A) BCNF

(B) 3NF

(C) PJNF

(D) DKNF

Ans: (A)

 

Q.20 Which is the best file organization when data is frequently added or deleted from a file?

(A) Sequential

(B) Direct

(C) Index sequential

(D) None of the above

Ans: (B)

 

Q.21 Which of the following constitutes a basic set of operations for manipulating relational data?

(A) Predicate calculus

(B) Relational calculus

(C) Relational algebra

(D) SQL

Ans: (C)

 

Q.22 An advantage of views is

(A) Data security

(B) Derived columns

(C) Hiding of complex queries

(D) All of the above

Ans: (A)

 

Q.23 Which of the following is not a recovery technique?

(A) Deferred update

(B) Immediate update

(C) Two-phase commit

(D) Shadow paging

Ans: (C)

 

Q.24 Isolation of the transactions is ensured by

(A) Transaction management

(B) Application programmer

(C) Concurrency control

(D) Recovery management

Ans: (C)

 

Q.25 _______ operator is used to compare a value to a list of literals values that have been specified.

(A) Like

(B) COMPARE

(C) BETWEEN

(D) IN

Ans: (A)

Search Aptipedia