Relational Database Design Set 1
Computer Science Engineering (CSE),
Bachelor of Science in Computer Science FY (BSc CS),
Bachelor of Science in Computer Science SY (BSc CS),
Bachelor of Science in Information Technology SY (BSc IT),
Bachelor of Computer Applications (BCA),
Bachelor of Business Administration in Computer Applications (BBA [CA]),
Bachelor of Science in Information Technology (BSc IT),
On This Page
This set of DataBase Management System (DBMS) Multiple Choice Questions & Answers (MCQs) focuses on Relational Database Design Set 1
Q1 | An attribute is a __________ in a relation.
- Row
- Column
- Value
- Tuple
Q2 | What is the method of specifying a primary key in a schema description?
- By writing it in bold letters
- By underlining it using a dashed line
- By writing it in capital letters
- By underlining it using a bold line
Q3 | Choose the option that correctly explains in words, the function of the following relationalalgebra expression σyear≥2009 (book ⋈ borrow)
- Selects all tuples from the Cartesian product of book and borrow
- Selects all the tuples from the natural join of book and borrow wherever the year is lesser than 2009
- Selects all the tuples from the natural join of book and student wherever the year is greater than or equal to 2009
- Selects all tuples from the Cartesian product of book and borrow wherever the year is greater than or equal to 2009
Q4 | State true or false: If a relation consists of a foreign key, then it is called a referencedrelation of the foreign key dependency.
- True
- False
- none
- all
Q5 | Statement 1: A tuple is a row in a relationStatement 2: Existence of multiple foreign keys in a same relation is possible
- Both the statements are true
- Statement 1 is correct but Statement 2 is false
- Statement 1 is false but Statement 2 is correct
- Both the statements are false
Q6 | Which of the following information does an SQL DDL not specify?
- The schema for each relation
- The integrity constraints
- The operations on the tuples
- The security and authorization information for each relation
Q7 | Which of the following data types does the SQL standard not support?
- char(n)
- String(n)
- varchar(n)
- float(n)
Q8 | Which command is used to create a new relation in SQL
- create table( , …)
- create relation( , …)
- new table( , …)
- new relation( , …)
Q9 | 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?
- primary key(a1, a2, a3)
- primary key(a1)
- foreign key(a1, a2) references S
- foreign key(a1, a2)
Q10 | What is the syntax to load data into the database? (Consider D as the database and a, b, cas datA:)
- enter into D (a, b, C:);
- insert into D values (a, b, C:);
- insert into D (a, b, C:);
- insert (a, b, C:) values into D;
Q11 | Which of the following commands do we use to delete a relation (R) from a database?
- drop table R
- drop relation R
- delete table R
- delete from R
Q12 | Which of the following commands do we use to delete all the tuples from a relation (R)?
- delete table R
- drop table R
- delete from R
- drop from R
Q13 | Choose the correct command to delete an attribute A from a relation R
- alter table R delete A
- alter table R drop A
- alter table drop A from R
- delete A from R
Q14 | create table apartment(ownerID varchar (5), ownername varchar(25), floor numeric(4,0),primary key (ownerID:));Choose the correct option regarding the above statement
- The statement is syntactically wrong
- It creates a relation with three attributes ownerID, ownername, floor in which floor cannot be null.
- It creates a relation with three attributes ownerID, ownername, floor in which ownerID cannot be null.
- It creates a relation with three attributes ownerID, ownername, floor in which ownername must consist of at least 25 characters.
Q15 | What does the notnull integrity constraint do?
- It ensures that at least one tuple is present in the relation
- It ensures that at least one foreign key is present in the relation
- It ensures that all tuples have a finite value on a specified attribute
- It ensures that all tuples have finite attributes on all the relations
Q16 | Which SQL function is used to count the number of rows in a SQL query?
- COUNT()
- NUMBER()
- SUM()
- COUNT(*)
Q17 | Which SQL keyword is used to retrieve a maximum value?
- MOST
- TOP
- MAX
- UPPER
Q18 | Which of the following SQL clauses is used to DELETE tuples from a database table?
- DELETE
- REMOVE
- DROP
- CLEAR
Q19 | ___________removes all rows from a table without logging the individual row deletions.
- DELETE
- REMOVE
- DROP
- TRUNCATE
Q20 | Which of the following is not a DDL command?
- UPDATE
- TRUNCATE
- ALTER
- None of the Mentioned
Q21 | Which of the following are TCL commands?
- UPDATE and TRUNCATE
- SELECT and INSERT
- GRANT and REVOKE
- ROLLBACK and SAVEPOINT
Q22 | ________________ is not a category of SQL command.
- TCL
- SCL
- DCL
- DDL
Q23 | If you don’t specify ASC or DESC after a SQL ORDER BY clause, the following is usedby default ______________
- ASC
- DESC
- There is no default value
- None of the mentioned
Q24 | Which of the following statement is true?
- DELETE does not free the space containing the table and TRUNCATE free the space containing the table
- Both DELETE and TRUNCATE free the space containing the table
- Both DELETE and TRUNCATE does not free the space containing the table
- DELETE free the space containing the table and TRUNCATE does not free the space containing the table
Q25 | What is the purpose of the SQL AS clause?
- The AS SQL clause is used to change the name of a column in the result set or to assign a name to a derived column
- The AS clause is used with the JOIN clause only
- The AS clause defines a search condition
- All of the mentioned