Top 50+ Solved Relational Database Design MCQ Questions Answer

From 31 to 45 of 45

Q. What does the “x” operator do in relational algebra?

a. Output specified attributes from all rows of the input relation. Remove duplicate tuples from the output

b. Output pairs of rows from the two input relations that have the same value on all attributes that have the same name

c. Output all pairs of rows from the two input relations (regardless of whether or not they have the same values on common attributes)

d. Returns the rows of the input relation that satisfy the predicate

  • c. Output all pairs of rows from the two input relations (regardless of whether or not they have the same values on common attributes)

Q. An attribute is a __________ in a relation.

a. Row

b. Column

c. Value

d. Tuple

  • b. Column

Q. What is the method of specifying a primary key in a schema description?

a. By writing it in bold letters

b. By underlining it using a dashed line

c. By writing it in capital letters

d. By underlining it using a bold line

  • d. By underlining it using a bold line

Q. Statement 1: A tuple is a row in a relationStatement 2: Existence of multiple foreign keys in a same relation is possible

a. Both the statements are true

b. Statement 1 is correct but Statement 2 is false

c. Statement 1 is false but Statement 2 is correct

d. Both the statements are false

  • a. Both the statements are true

Q. Which of the following information does an SQL DDL not specify?

a. The schema for each relation

b. The integrity constraints

c. The operations on the tuples

d. The security and authorization information for each relation

  • c. The operations on the tuples

Q. Which of the following data types does the SQL standard not support?

a. char(n)

b. String(n)

c. varchar(n)

d. float(n)

  • b. String(n)

Q. Which command is used to create a new relation in SQL

a. create table( , …)

b. create relation( , …)

c. new table( , …)

d. new relation( , …)

  • a. create table( , …)

Q. If a1, a2, a3 are attributes in a relation and S is another relation, which of the following isan incorrect specification of an integrity constraint?

a. primary key(a1, a2, a3)

b. primary key(a1)

c. foreign key(a1, a2) references S

d. foreign key(a1, a2)

  • d. foreign key(a1, a2)

Q. What is the syntax to load data into the database? (Consider D as the database and a, b, cas datA:)

a. enter into D (a, b, C:);

b. insert into D values (a, b, C:);

c. insert into D (a, b, C:);

d. insert (a, b, C:) values into D;

  • b. insert into D values (a, b, C:);

Q. Which of the following commands do we use to delete a relation (R) from a database?

a. drop table R

b. drop relation R

c. delete table R

d. delete from R

  • a. drop table R

Q. Which of the following commands do we use to delete all the tuples from a relation (R)?

a. delete table R

b. drop table R

c. delete from R

d. drop from R

  • c. delete from R

Q. Choose the correct command to delete an attribute A from a relation R

a. alter table R delete A

b. alter table R drop A

c. alter table drop A from R

d. delete A from R

  • b. alter table R drop A

Q. create table apartment(ownerID varchar (5), ownername varchar(25), floor numeric(4,0),primary key (ownerID:));Choose the correct option regarding the above statement

a. The statement is syntactically wrong

b. It creates a relation with three attributes ownerID, ownername, floor in which floor cannot be null.

c. It creates a relation with three attributes ownerID, ownername, floor in which ownerID cannot be null.

d. It creates a relation with three attributes ownerID, ownername, floor in which ownername must consist of at least 25 characters.

  • c. It creates a relation with three attributes ownerID, ownername, floor in which ownerID cannot be null.

Q. What does the notnull integrity constraint do?

a. It ensures that at least one tuple is present in the relation

b. It ensures that at least one foreign key is present in the relation

c. It ensures that all tuples have a finite value on a specified attribute

d. It ensures that all tuples have finite attributes on all the relations

  • c. It ensures that all tuples have a finite value on a specified attribute
Subscribe Now

Get All Updates & News