Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Tests  >  Test: ER Model- 1 - Computer Science Engineering (CSE) MCQ

Test: ER Model- 1 - Computer Science Engineering (CSE) MCQ


Test Description

15 Questions MCQ Test - Test: ER Model- 1

Test: ER Model- 1 for Computer Science Engineering (CSE) 2024 is part of Computer Science Engineering (CSE) preparation. The Test: ER Model- 1 questions and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus.The Test: ER Model- 1 MCQs are made for Computer Science Engineering (CSE) 2024 Exam. Find important definitions, questions, notes, meanings, examples, exercises, MCQs and online tests for Test: ER Model- 1 below.
Solutions of Test: ER Model- 1 questions in English are available as part of our course for Computer Science Engineering (CSE) & Test: ER Model- 1 solutions in Hindi for Computer Science Engineering (CSE) course. Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free. Attempt Test: ER Model- 1 | 15 questions in 35 minutes | Mock test for Computer Science Engineering (CSE) preparation | Free important questions MCQ to study for Computer Science Engineering (CSE) Exam | Download free PDF with solutions
Test: ER Model- 1 - Question 1

A relation R = {A, B, C, D, E, F,G} is given with following set of functional dependencies: F = {AD → E, BE → F, B → C, AF → G} Which of the following is a candidate key ?

Detailed Solution for Test: ER Model- 1 - Question 1

[AD]+ = ADE. [BE]+ = BCEF. [B]+ = BC. [AF]+ = AFG. Nothing drives all the attributes, but if We add B in first key i.e. [ADB] then it will give all the attribute [ADB]+ = ABCDEFG. So, option (D) is correct.

Test: ER Model- 1 - Question 2

Given the basic ER and relational models, which of the following is INCORRECT?

Detailed Solution for Test: ER Model- 1 - Question 2

The term ‘entity’ belongs to ER model and the term ‘relational table’ belongs to relational model. A and B both are true. ER model supports both multivalued and composite attributes See this for more details. (C) is false and (D) is true. In Relation model, an entry in relational table can can have exactly one value or a NULL.

1 Crore+ students have signed up on EduRev. Have you? Download the App
Test: ER Model- 1 - Question 3

Consider the following ER diagram. Find the no of tables that would be needed ?

Detailed Solution for Test: ER Model- 1 - Question 3

Answer is B, i.e, 3 minimum tables. M, P are strong entities hence they must be represented by separate tables. Many-to-one and one-to-many relationship sets that are total on the many-side can be represented by adding an extra attribute to the “many” side, containing the primary key of the “one” side. ( This way no extra table will be needed for Relationship sets ) M table is modified to include primary key of P side(i.e. P1). N is weak entity, and is modified to include primary key of P (i.e, P1). Therefore there would be minimum of 3 tables with schema given below :
M ( M1, M2, M3, P1)
P ( P1, P2 )
N ( P1, N1, N2 )

Test: ER Model- 1 - Question 4

Consider a join (relation algebra) between relations r(R)and s(S) using the nested loop method. There are 3 buffers each of size equal to disk block size, out of which one buffer is reserved for intermediate results. Assuming size(r(R)) < size(s(S)), the join will have fewer number of disk block accesses if

Detailed Solution for Test: ER Model- 1 - Question 4

Nested loop join is one of the methods to implement database in memory. A nested loop join is an  algorithm that joins two sets by using two nested loops.
According to nested join,given relation R and S For each tuple r in R do For each tuple s in S do If r and s satisfy the join condition Then output the tuple <r,s> Cost estimations for the above loop: – b(R) and  b(S) number of blocks in R and in S – Each block of outer relation is read once – Inner relation is read once for each block of outer relation Summing up : IO= b(R)+n(R)*b(S) total  IO operations Lets assume |R|>|S|  i.e b(R) =10 , n(R) = 100 , n(S)= 30 ,and b(s) =3 Now,   if R is outer relation then, IO= 10+100*3=340 if S is outer relation then IO=3+30*10=303 As it can be observed , that total IO is lesser if the value of outer variable is less and as it is already given that |R|<|S|.Therefore,  Relation r(R) should be in the outer loop to have fewer number of disk block accesses.

Test: ER Model- 1 - Question 5

Consider the relational schema given below, where eId of the relation dependent is a foreign key referring to empId of the relation employee. Assume that every employee has at least one associated dependent in the dependent relation.

employee (empId, empName, empAge)
dependent(depId, eId, depName, depAge)

Consider the following relational algebra query:

GATECS2014Q40

The above query evaluates to the set of empIds of employees whose age is greater than that of

Detailed Solution for Test: ER Model- 1 - Question 5

The below subquery after the subtraction sign produces id's of those employees who have at least one dependent with age greater than or equal the employee's age.

GATECS2014Q40

When the result of above subquery is subtracted from all employees, we get the employees whose age is greater than all dependents.

Test: ER Model- 1 - Question 6

Goals for the design of the logical scheme include

Detailed Solution for Test: ER Model- 1 - Question 6

Logical schema is developed using diagrams that define the content of databases in the form of tables and it also describe how the tables are linked with each for data access and how actually data is stored in the database . A conceptual model is created during the first phase of logical design based on the needs assessment performed in stage one. Actually a conceptual model is an Entity -Relation (i.e., ER) diagram. It shows the tables, fields, and primary keys of the database, and how tables are related or linked with each other. While designing the logical scheme we avoiding data inconsistency i.e., data should be consistent as well as efficient (duplicate data is not allowed in a row) and query should be easily construct using the table . Hence, option (D) is correct among all.

Test: ER Model- 1 - Question 7

Let E1 and E2 be two entities in an E/R diagram with simple single-valued attributes. R1 and R2 are two relationships between E1 and E2, where R1 is one-to-many and R2 is many-to-many. R1 and R2 do not have any attributes of their own. What is the minimum number of tables required to represent this situation in the relational model?

Detailed Solution for Test: ER Model- 1 - Question 7

The answer is B, i.e minimum 3 tables. Strong entities E1 and E2 are represented as separate tables. In addition to that many-to-many relationships(R2) must be converted as seperate table by having primary keys of E1 and E2 as foreign keys. One-to-many relaionship (R1) must be transferred to 'many' side table(i.e. E2) by having primary key of one side(E1) as foreign key( this way we need not to make a seperate table for R1). Let relation schema be E1(a1,a2) and E2( b1,b2). Relation E1( a1 is the key)
a1 a2
-------
1 3
2 4
3 4
Relation E2( b1 is the key, a1 is the foreign key, hence R1(one-many) relationship set satisfy here )
b1 b2 a1
-----------
7 4 2
8 7 2
9 7 3
Relation R2 ( {a1, b1} combined is the key here , representing many-many relationship R2 )
a1 b1
--------
1 7
1 8
2 9
3 9
Hence we will have minimum of 3 tables.

Test: ER Model- 1 - Question 8

Which of the following relational query languages have the same expressive power?

  1. Relational algebra
  2. Tuple relational calculus restricted to safe expressions
  3. Domain relational calculus restricted to safe expressions
Detailed Solution for Test: ER Model- 1 - Question 8

Relational algebra is a procedural query language where we input - relations and it yields relations as output. It provides method to get the result. It is performed recursively on a relation and the in between results are relations(output). Basic set of operations for the relational model. Relational calculus is a non - procedural query language. It provides the query to get result. Higher level declarative language for specifying relational queries. Tupple Relational Calculus operates on each tupple. Domain Relational Calculus operates on each column or attribute. Safe expression means fixed no. of tupple or column or attribute as a result But all of them has same expressive power. Just different ways to do so.

Test: ER Model- 1 - Question 9

What is the min and max number of tables required to convert an ER diagram with 2 entities and 1 relationship between them with partial participation constraints of both entities?

Detailed Solution for Test: ER Model- 1 - Question 9

Maximum number of tables required is 3 in case of many to many relationships between entities. Minimum number of tables is 1 in case of unary relationship and total participation of atleast one entity. But in case of partial participation of both entities, minimum number of tables required is 2.

Test: ER Model- 1 - Question 10

A Relation R with FD set {A->BC, B->A, A->C, A->D, D->A}. How many candidate keys will be there in R?

Detailed Solution for Test: ER Model- 1 - Question 10

Simple candidate key means single attributed key. As (A)+ = {A, B, C, D}, (B)+ = {B,A, C, D}, (C)+ = {C} and (D)+ = {D, A, B, C}. So, A, B and D are candidate keys which are simple as well. So, correct option is 3.

Test: ER Model- 1 - Question 11

The relational algebra expression equivalent to the following tuple calculus expression

{ t | t ∈ r ∧ (t[A] = 10 ∧ t[B] = 20 }

q5

is

Detailed Solution for Test: ER Model- 1 - Question 11

In Given relational algebra, Tuple t should have two attributes A=10 and B=20 In A, we select tuples having A=10 or B=20 so, it is wrong choice. In B, we select tuples having A=10 or we can select tuples having B=20, so it is also wrong choice. D is also wrong choice. In C, we select tuples having A=10 and tuples having B=20, it is same as above relational algebra. Hence, option (C) is Correct.

Test: ER Model- 1 - Question 12

Consider the join of a relation R with a relation S. If K has m tuples and S has n tuples, then the maximum and minimum sizes of the join respectively are:

Detailed Solution for Test: ER Model- 1 - Question 12

When there is no foreign key constraint between two tables then the max and min number of tuples in their join is mn and 0 respectively.

Test: ER Model- 1 - Question 13

Which of the following query transformations (i.e., replacing the l.h.s. expression by the r.h.s. expression) is incorrect? R1 and R2 are relations. C1, C2 are selection conditions and A1, A2 are attributes of R1. a.  σC1( σC2R1)) → σC2(σC1(R1)) b.  σC1( πA1R1)) → πA1(σC1(R1)) c.  σC1( R1 ∪ R2 ) → σC1(R1) ∪ σC1(R2) d.  πA1(σC1(R1)) → σC1 (πA1 (R1))

Detailed Solution for Test: ER Model- 1 - Question 13

D is the answer. If the selection condition c1 is on attribute A2, then we can not replace LHS expression by RHS expression. In RHS first projection is on A1 then selection condition c1 will fail because no A2 will be present there.

Test: ER Model- 1 - Question 14

Let R(a, b, c) and S(d, e, f) be two relations in which d is the foreign key of S that refers to the primary key of R. Consider the following four operations R and S. I. Insert into R II. Insert into S III. Delete from R IV. Delete from S Which of the following can cause violation of the referential integrity constraint above?

Detailed Solution for Test: ER Model- 1 - Question 14

II and III statement can cause the violation of the referential integrity constraint as d is the foreign key of S that refers to the primary key of R. So, d should always be a subset of primary key of R. But insertion to S and deletion from R may cause the violation of subset property as after these operations d may contain a value that is not present in the primary key of A. So, option (B) is correct.

Test: ER Model- 1 - Question 15

Consider the following tables T1 and T2:

g2017_14

n table T1, P is the primary key, Q is the foreign key referencing R in table T2 with on-delete cascade and on-update cascade. In table T2, R is the primary key and S is the foreign key referencing P in the table T1 with on-delete set NULL and on-update cascade. In order to delete record (3,8) from table, numbers of additional record that need to be deleted from table T1 is ______. Note: This question appeared as Numerical Answer Type.

Detailed Solution for Test: ER Model- 1 - Question 15

Given,

  • Q → R(Primary Key)
  • S → P (Primary Key)

Entry to be deleted - P (3) and Q(8)

  • Q can be deleted directly
  • Now, S → P but the relationship given is on delete set NULL, Therefore when  we delete 3 from  T1 ,the  entry in T2 having 3 will be NULL.

Therfore, Option A  - Answer is 0 entries

Information about Test: ER Model- 1 Page
In this test you can find the Exam questions for Test: ER Model- 1 solved & explained in the simplest way possible. Besides giving Questions and answers for Test: ER Model- 1, EduRev gives you an ample number of Online tests for practice

Top Courses for Computer Science Engineering (CSE)

Download as PDF

Top Courses for Computer Science Engineering (CSE)