Showing posts with label Ternary operator. Show all posts
Showing posts with label Ternary operator. Show all posts

Monday, September 28, 2020

Database Systems MCQ

Q.1 The physical location of a record is determined by a mathematical formula that transforms a file key into a record location is :

(A) B-Tree File

(B) Hashed File

(C) Indexed File

(D) Sequential file

Ans: B

 

Q.2 Using Relational Algebra the query that finds customers, who have a balance of over 1000 is

(A) πCustomer_name(s balance >1000(Deposit))

(B) σCustomer_name(Pbalance >1000(Deposit))

(C) πCustomer_name(s balance >1000(Borrow))

(D) σCustomer_name(Pbalance >1000(Borrow))

Ans: A

 

Q.3 A primary key is combined with a foreign key creates

(A) Parent-Child relation ship between the tables that connect them.

(B) Many to many relationship between the tables that connect them.

(C) Network model between the tables that connect them.

(D) None of the above.

Ans: A

 

Q.4 In E-R Diagram derived attribute are represented by

(A) Ellipse

(B) Dashed ellipse

(C) Rectangle

(D) Triangle

Ans B

 

Q.5 Cross Product is a:

(A) Unary Operator

(B) Ternary Operator

(C) Binary Operator

(D) Not an operator

Ans: C

 

Q.6 An instance of relational schema R (A, B, C) has distinct values of A including NULL values. Which one of the following is true?

(A) A is a candidate key

(B) A is not a candidate key

(C) A is a primary Key

(D) Both (A) and (C)

Ans: B

 

Q.7 Consider the join of a relation R with relation S. If R has m tuples and S has n tuples, then the maximum size of join is:

(A) mn

(B) m+n

(C) (m+n)/2

(D) 2(m+n)

Ans: A

 

Q.8 The natural join is equal to :

(A) Cartesian Product

(B) Combination of Union and Cartesian product

(C) Combination of selection and Cartesian product

(D) Combination of projection and Cartesian product

Ans: D

 

Q.9 Which one of the following is not true for a view:

(A) View is derived from other tables.

(B) View is a virtual table.

(C) A view definition is permanently stored as part of the database.

(D) View never contains derived columns.

Ans: C

 

Q.10 A primary key if combined with a foreign key creates

(A) Parent-Child relationship between the tables that connect them.

(B) Many to many relationship between the tables that connect them.

(C) Network model between the tables that connect them.

(D) None of the above.

Ans: A

 

Q.11 In E-R Diagram relationship type is represented by

(A) Ellipse

(B) Dashed ellipse

(C) Rectangle

(D) Diamond

Ans: D

 

Q.12 Hierarchical model is also called

(A) Tree structure

(B) Plex Structure

(C) Normalize Structure

(D) Table Structure

Ans: A

 

Q.13 To delete a particular column in a relation the command used is:

(A) UPDATE

(B) DROP

(C) ALTER

(D) DELETE

Ans: C

 

Q.14 The ______ operator is used to compare a value to a list of literals values that have been specified.

(A) BETWEEN

(B) ANY

(C) IN

(D) ALL

Ans: A

 

Q.15 A logical schema

A) is the entire database

B) is a standard way of organizing information into a accessible part

C) describe how data is actually stored on disk

D) none of these

Ans: D

 

Q.16 A B-tree of order m has maximum of _____________ children

(A) m

(B) m+1

(C) m-1

(D) m/2

Ans: A

 

Q.17 _____________ function divides one numeric expression by another and returns the remainder.

(A) POWER

(B) MOD

(C) ROUND

(D) REMAINDER

Ans: B

 

Q.18 A data manipulation command the combines the records from one or more tables is called

(A) SELECT

(B) PROJECT

(C) JOIN

(D) PRODUCT

Ans: C

 

Q.19 In E-R diagram generalization is represented by

(A) Ellipse

(B) Dashed ellipse

(C) Rectangle

(D) Triangle

Ans: D

 

Q.20 _________ is a virtual table that draws its data from the result of an SQL SELECT statement.

(A) View

(B) Synonym

(C) Sequence

(D) Transaction

Ans: A

 

Q.21 The method of access which uses key transformation is known as

(A) Direct

(B) Hash

(C) Random

(D) Sequential

Ans: B

 

Q.22 A table joined with itself is called

(A) Join

(B) Self Join

(C) Outer Join

(D) Equi Join

Ans: B

 

Q.23 _________ data type can store unstructured data

(A) RAW

(B) CHAR

(C) NUMERIC

(D) VARCHAR

Ans: A

 

Q.24 Which two files are used during operation of the DBMS

(A) Query languages and utilities

(B) DML and query language

(C) Data dictionary and transaction log

(D) Data dictionary and query language

Ans: C

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

Search Aptipedia