adplus-dvertising
frame-decoration

Question

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 retains relation R, but deletes all tuples in R.
III. C1 deletes not only all tuples of R, but also the schema for R.

a.

I only

b.

I and II only

c.

II and III only

d.

I, II and III

Answer: (c).II and III only

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. 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...

Similar Questions

Discover Related MCQs

Q. 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:
A B C D
a1 b1 c1 d1
a2 b3 c3 d1
a1 b2 c1 d2

I: {B} II: {B, C} III: {A, D} IV: {C, D}
If different symbols stand for different values in the table (e.g., d1 is definitely not equal to d2), then which of the above could not be the candidate key for the database table?

Q. An attribute A of datatype varchar(20) has value 'Ram' and the attribute B of datatype char(20) has value 'Sita' in oracle. The attribute A has .......... memory spaces and B has .......... memory spaces.

Q. Integrity constraints ensure that changes made to the database by authorized users do not result into loss of data consistency. Which of the following statement(s) is (are) true w.r.t. the examples of integrity constraints?

(A) An instructor Id. No. cannot be null, provided Instructor Id. No. being primary key.
(B) No two citizens have same Adhar-Id.
(C) Budget of a company must be zero.

Q. Let M and N be two entities in an E-R diagram with simple single valued attributes. R1 and R2 are two relationships between M and N, whereas
R1 is one-to-many and R2 is many-to-many.
The minimum number of tables required to represent M, N, R1 and R2 in the relational model are ..........

Q. Consider a schema R(MNPQ) and functional dependencies M→N, P→Q. Then the decomposition of R into R1(MN) and R2(PQ) is _______

Q. If h is chosen from a universal collection of hash functions and is used to hash n keys into a table of size m, where n?m, the expected number of collisions involving a particular key x is less than ...................

Q. Which one is correct w.r.t. RDBMS?

Q. 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:

Q. For a database relation R(A,B,C,D) where the domains of A,B,C and D include only atomic values, only the following functional dependencies and those that can be inferred from them are:
A→C
B→D
The relation R is in ................

Q. Consider the following relation:

Works (emp_name, company_name, salary)
Here, emp_name is primary key.

Consider the following SQL query:

Select emp_name
From Works T
where salary>(select avg (salary)
from Works S
where T.company_name=
S. Company_name)

The above query is for following:

Q. DBMS provides the facility of accessing data from a database through

Q. Relational database schema normalization is NOT for:

Q. Consider the following statements regarding relational database model:

(a) NULL values can be used to opt a tuple out of enforcement of a foreign key.
(b) Suppose that table T has only one candidate key. If Q is in 3NF, then it is also in BCNF.
(c) The difference between the project operator (P) in relational algebra and the SELECT keyword in SQL is that if the resulting table/set has more than one occurrences of the same tuple, then P will return only one of them, while SQL SELECT will return all.

One can determine that:

Q. Consider a database table R with attributes A and B. Which of the following SQL queries is illegal ?

Q. Which of the following statements is/are True regarding some advantages that an object-oriented DBMS (OODBMS) offers over a relational database?

I. An OODBMS avoids the “impedance mismatch” problem.
II. An OODBMS avoids the “phantom” problem.
III. An OODBMS provides higher performance concurrency control than most relational databases.
IV. An OODBMS provides faster access to individual data objects once they have been read from disk.

Q. The Global conceptual Schema in a distributed database contains information about global relations. The condition that all the data of the global relation must be mapped into the fragments, that is, it must not happen that a data item which belongs to a global relation does not belong to any fragment, is called :

Q. Consider the table R with attributes A, B and C. The functional dependencies that hold on R are : A → B, C → AB. Which of the following statements is/are True?

I. The decomposition of R into R1(C, A) and R2(A, B) is lossless.
II. The decomposition of R into R1(A, B) and R2(B, C) is lossy.

Q. Consider the following ORACLE relations:

One (x, y) = {<2, 5>, <1, 6>, <1, 6>, <1, 6>, <4, 8>, <4, 8>}
Two (x, y) = {<2, 55>, <1, 1>, <4, 4>, <1, 6>, <4, 8>, <4, 8>, <9, 9>, <1, 6>}

Consider the following two SQL queries SQ1 and SQ2:

SQ1 : SELECT * FROM One)
EXCEPT
(SELECT * FROM Two);

SQ2 : SELECT * FROM One)
EXCEPT ALL
(SELECT * FROM Two);

For each of the SQL queries, what is the cardinality (number of rows) of the result obtained when applied to the instances above?

Q. Which one of the following pairs is correctly matched in the context of database design?

List – I                                       List – II
(Database term)                      (Definition)

I. Specialization                       A. Result of taking the union of two or more
disjoint (lower-level) entity sets to produce
a higher-level entity set.
II. Generalization                    B. Express the number of entities to which another
entity can be associated via a relationship set.
III. Aggregation                       C. Result of taking a subset of a higher-level
entity set to form a lower-level entity set.
IV. Mapping cardinalities      D. An abstraction in which relationship sets (along
with their associated entity sets) are treated as
higher-level entity sets, and can participate in
relationships.
Codes :
      I    II   III   IV

Q. Consider a hash table of size m = 10000, and the hash function h(K)=floor(m(KAmod1)) for A = (√5 – 1)/2. The key 123456 is mapped to location ...............