Consider the relations R(A,B) and S(B,C) and the following four relational algebra queries over R and S:

I. πA,B(R⋈S)

II. R⋈πB(S)

III. R∩(πA(R) Χ πB(S))

IV. πA,R.B(R Χ S) where R.B refers to the column B in table R.

One can determine that:

(A) I, III and IV are the same query.

(B) II, III and IV are the same query.

(C) I, II and IV are the same query.

(D) I, III and III are the same query.

1 Answer

Answer :

(D) I, III and III are the same query.

Related questions

Description : Consider the following schemas: Branch = (Branch-name, Assets, Branch-city) Customer = (Customer-name, Bank-name, Customer-city) Borrow = (Branch-name, loan-number, customer account-number) Deposit = ... )) (C) πcustomer-name(σbalance> 10000(Borrow)) (D) σcustomer-name(σbalance> 10000(Borrow))

Last Answer : (A) πcustomer-name(σbalance> 10000(Deposit)) 

Description : Which of the following is/are the Database server functions? i) Data management ii) Transaction management iii) Compile queries iv) Query optimization A) i, ii, and iv only B) i, ii and iii only C) ii, iii and iv only D) All i, ii, iii, and iv

Last Answer : A) i, ii, and iv only

Description : Suppose ORACLE relation R(A, B) currently has tuples {(1, 2), (1, 3), (3, 4)} and relation S(B, C) currently has {(2, 5), (4, 6), (7, 8)}. Consider the following two SQL queries SQ1 and SQ2 ... (A) 2 and 6 respectively (B) 6 and 2 respectively (C) 2 and 4 respectively (D) 4 and 2 respectively

Last Answer : (D) 4 and 2 respectively

Description : Which of the following is true ? I. Implementation of self-join is possible in SQL with table alias. II. Outer-join operation is basic operation in relational algebra. III. Natural join and outer join operations are ... (B) II and III are correct. (C) Only III is correct. (D) Only I is correct.

Last Answer : (D) Only I is correct.

Description : In a relational schema, each tuple is divided into fields called A) Relations B) Domains C) Queries D) All of the above

Last Answer : B) Domains

Description : Consider the following three SQL queries (Assume the data in the people table) : (a) Select Name from people where Age>21; (b) Select Name from people where Height>180; (c) Select Name from people where (Age>21) or (Height ... number of rows returned by the SQL query (c) ? (A) 3 (B) 7 (C) 10 (D) 21

Last Answer : (C) 10

Description : The “PROJECT” operator of a relational algebra creates a new table that has always (A) More columns than columns in original table (B) More rows than original table (C) Same number of rows as the original table (D) Same number of columns as the original table

Last Answer : (C) Same number of rows as the original table

Description : Consider a database table R with attributes A and B. Which of the following SQL queries is illegal ? (A) SELECT A FROM R; (B) SELECT A, COUNT(*) FROM R; (C) SELECT A, COUNT(*) FROM R GROUP BY A; (D) SELECT A, B, COUNT(*) FROM R GROUP BY A, B;

Last Answer : (B) SELECT A, COUNT(*) FROM R;

Description : Consider the following database table having A, B, C and D as its four attributes and four possible candidate keys (I, II, III and IV) for this table: I: {B} II: {B, C} III: {A, D} IV: {C, D} If ... the database table? (A) I and III only (B) III and IV only (C) II only (D) I only

Last Answer : (C) II only

Description : In a relational database model, NULL values can be used for all but which one of the following? (A) To allow duplicate tuples in the table by filling the primary key column(s) with NULL. (B) To ... D) To fill a column in a tuple when that column does not really exist for that particular tuple.

Last Answer : (A) To allow duplicate tuples in the table by filling the primary key column(s) with NULL.

Description : Consider the table Student(stuid, name, course, marks). Which one of the following two queries is correct to find the highest marks student in course 5? Q.1. Select S.stuid From student S Where not exists (select * from student ... ) Q.1 (B) Q.2 (C) Both Q.1 and Q.2 (D) Neither Q.1 nor Q.2

Last Answer : (B) Q.2 Explanation: First query gives stuid of students whose marks are greater than all students taking course 5. Second query gives stuid of students whose marks are greater than any student taking ... comparison is between maximum of marks by any student in course 5. So the answer is option D.

Description : Which of the following is not the function of client? A) Compile queries B) Query optimization C) Receive queries D) Result formatting and presentation

Last Answer : B) Query optimization

Description : Relational database schema normalization is NOT for: (A) reducing the number of joins required to satisfy a query. (B) eliminating uncontrolled redundancy of data stored in the database. (C) ... could otherwise occur with inserts and deletes. (D) ensuring that functional dependencies are enforced. 

Last Answer : reducing the number of joins required to satisfy a query.

Description : Which of the following is not a binary operator in relational algebra? A) Join B) Semi-Join C) Assignment D) Project

Last Answer : D) Project

Description : Cartesian product in relational algebra is (A) a Unary operator. (B) a Binary operator. (C) a Ternary operator. (D) not defined.

Last Answer : (B) a Binary operator.

Description : Consider the following two commands C1 and C2 on the relation R from an SQL database:  C1: drop table R; C2: delete from R; Which of the following statements is TRUE? I. Both C1 and C2 delete the schema for R. II. C2 ... R. (A) I only (B) I and II only (C) II and III only (D) I, II and III

Last Answer : (C) II and III only

Description : The relational model is based on the concept that data is organized and stored in two-dimensional tables called ………………………A) Fields B) Records C) Relations D) Keys

Last Answer : C) Relations

Description : In a relational model, relations are termed as (A) Tuples. (B) Attributes (C) Tables. (D) Rows.

Last Answer : (C) Tables

Description : Consider the following justifications for commonly using the two-level CPU scheduling : I. It is used when memory is too small to hold all the ready processes. II. Because its performance is same as that of the FIFO. III. Because it ... ? (A) I, III and IV (B) I and II (C) III and IV (D) I and III

Last Answer : (D) I and III

Description : A relational database developer refers to a record as (A) a criteria. (B) a relation. (C) a tuple. (D) an attribute.

Last Answer : C) a tuple

Description : Consider the following Entity-Relationship (E-R) diagram and three possible relationship sets (I, II and III) for this E-R diagram: If different symbols stand for different values (e.g., t1 is definitely not equal to t2 ... diagram ? (A) I only (B) I and II only (C) II only (D) I, II and III

Last Answer : (A) I only

Description : If D1, D2,…. Dn are domains in a relational model, then the relation is a table, which is a subset of (A) D1+D2+…. +Dn (B) D1x D2x… xDn (C) D1U D2U….UDn (D) D1- D2-….-Dn

Last Answer : (B) D1x D2x… xDn

Description : Consider a CUSTOMERS database table having a column CITY filled with all the names of Indian cities (in capital letters). The SQL statement that finds all cities that have GAR somewhere in its name, ... *from customers where city like %GAR%'; (D) Select *from customers where city as '%GAR';

Last Answer : Answer: C

Description : Let E1 and E2 be two entities in E-R diagram with simple single valued attributes. R1 and R2 are two relationships between E1 and E2 where R1 is one-many and R2 is many-many. R1 and R2 do not have any ... are required to represent this situation in the Relational Model? (A) 4 (B) 3 (C) 2 (D) 1

Last Answer : (B) 3 

Description : Let M and N be two entities in an E-R diagram with simple single vale attributes. R1 and R2 are two relationship between M and N, whereas R1 is one-to-many and R2 is many-to-many. The minimum number of tables required to ... and R2 in the relational model are .......... (1) 4 (2) 6 (3) 7 (4) 3

Last Answer : Answer: 4

Description : Which of the following describes a relational database? 1) It provides a relationship between integers 2) It consists of separate tables or related data 3) It retrieves data related to its queries 4) It provides a relationship between floats

Last Answer : 2) It consists of separate tables or related data

Description : Let R and S be two fuzzy relations defined as: Then, the resulting relation, T, which relates elements of universe x to elements of universe z using max-min composition is given by

Last Answer : Answer: C

Description : Which of the following statement(s) is/are correct with reference to curve generation? I. Hermite curves are generated using the concepts of interpolation. II. Bezier curves are generated using the concepts of approximation. III. The ... (B) II and III only (C) I and II only (D) I, II and III only

Last Answer : (D) I, II and III only

Description : Where does the Bayes rule can be used? a) Solving queries b) Increasing complexity c) Decreasing complexity d) Answering probabilistic query

Last Answer : d) Answering probabilistic query

Description : Match the four material (P, Q, R, S) given in List -I with the corresponding reaction schemes (I, II, III, IV) provided in List-II and select the corr

Last Answer : Match the four material (P, Q, R, S) given in List -I with the corresponding reaction schemes (I, II, III, IV) ... . `{:(P,Q,R,S),(4,1,3,2):}`

Description : Consider the following table Furniture. Write SQL commands for the statements (i) to (viii) and write output for SQL queries (ix) and (x). -Technology

Last Answer : SQL commands for the given statements (i) to (viii) ;1. SELECT FCODE, NAME. PRICE FROM Furniture WHERE PRICE < 5000;2. SELECT NAME. PRICE FROM Furniture3.4. WHERE NAME LIKE %table% ;5. SELECT DISTINCT WCODE ... ;15.16. Output for SQL queries (ix) and (x)(ix)SUM(PRICE)6500(x)COUNT(DISTINCT PRICE)5

Description : Which of the following statements concerning Object-Oriented databases is FALSE? (A) Objects in an object-oriented database contain not only data but also methods for processing the data. (B ... Object-oriented databases store more types of data than relational databases and access that data faster.

Last Answer : (C) Object-oriented databases are more adapt at handling structures (analytical) data than relational databases.

Description : In RDBMS, Data is presented as a collection of ............ A) Table B) Attributes C) Relations D) Entities

Last Answer : C) Relations

Description : With regard to the expressive power of the formal relational Query languages, which of the following statements is TRUE?  A) relational algebra is more powerful than relational calculus B) relational ... calculus C) relational algebra has the same power as safe relational calculus D) None of these

Last Answer : relational algebra has the same power as safe relational calculus

Description : What are the unary operations in Relational Algebra?

Last Answer : PROJECTION and SELECTION.

Description : What is Relational Algebra?

Last Answer : It is procedural query language. It consists of a set of operations that take one or two relations as input and produce a new relation.

Description : Let pk(R) denotes primary key of relation R. A many-to-one relationship that exists between two relations R1 and R2 can be expressed as follows: (1) pk(R2)→pk(R1) (2) pk(R1)→pk(R2) (3) pk(R2)→R1∩R2 (4) pk(R1)→R1∩R2

Last Answer : Answer: 2

Description : Match the following HTTP status code to their respective definitions. i) 400 a) OK ii) 500 b) Not found iii) 200 c) Continue iv) 100 d) Internal server error A) i-b, ii-d, iii-a, iv-c B) i-a, ii-b, iii-c, iv-d C) i-b, ii-c, iii-a, iv-d D) i-b, ii-a, iii-c, iv-d

Last Answer : A) i-b, ii-d, iii-a, iv-c

Description : State true of false. i) Public can only be assigned to class ii) Protected protects a statement iii) Protected method is never accessible outside the package iv) Friendly variable may be accessible outside class A) i- ... -false, ii-true, iii-false, iv-false D) i-true, ii-false, iii-false, iv-true

Last Answer : C) i-false, ii-true, iii-false, iv-false

Description : State true or false. i) comparisons precede logical operations in java ii) assignment operations succeed increment operations iii) arithmetic operations succeed comparisons iv) x precede + A) i-true, ii-true, iii-false, ... false, ii-true, iii-false, iv-false D) i-true, ii-false, iii-false, iv-true

Last Answer : A) i-true, ii-true, iii-false, iv-true

Description : State true or false. i) Jpanel is a class included in awt package. ii) Anonymous classes are mostly used for event handling. iii) Names of anonymous classes must be unique iv) JOptionPane is an inner class A) i-false ... ) i-false, ii-true, iii-false, iv-false D) i-true, ii-false, iii-false, iv-true

Last Answer : C) i-false, ii-true, iii-false, iv-false

Description : State true or false. i) init() is called after start() in applet ii) applets are used for networking iii) inheritance is a part of Java Foundation Classes iv) final does not prevent inheritance A) i-true, ii- ... C) i-true, ii-true, iii-true, iv-true D) i-true, ii-false, iii-false, iv-false

Last Answer : B) i-false, ii-false, iii-false, iv-false

Description : Java Servlet i) is key component of server side java development ii) is a small pluggable extension to a server that enhances functionality iii) runs only in Windows Operating System iv) allows developers to customize any java ... & iv are true C) ii, iii & iv are true D) i, ii & iv are true

Last Answer : D) i, ii & iv are true

Description : break statement is used to i) get out of method ii) end aprogram iii) get out of a loop iv) get out of the system A) 1 & 2 B) 1,2 & 3 C) 1 & 3 D) 3

Last Answer : D) 3