Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

SQL Concepts Quiz

Total questions: 128

Worksheet time: 1hrs 7mins

Name
Class
Date
1.

In SQL, what is the primary advantage of using stored procedures?

a)

They allow for the creation of tables

b)

They enhance security by restricting access to data

c)

They provide a way to encapsulate and reuse a set of SQL statements

d)

They are more efficient than regular SQL queries

2.

Which type of user-defined function in SQL returns a single value?

a)

Scalar function

b)

Table-valued function

c)

Inline function

d)

Aggregate function

3.

Two concurrent executing transactions T1 and T2 are allowed to update the same record in an uncontrolled manner. In such a scenario. The following problem may not occur if database system has no concurrency module and allows concurrent execution of above two transactions. Which of the following is correct in this case?

a)

Transaction failure

b)

Dirty read problem

c)

Lost update problem

d)

Inconsistent database state

4.

What is the main disadvantage of having too many indexes on a table?

a)

Improved query performance

b)

Increased storage space

c)

Enhanced data integrity

d)

Fast data modification operations

5.

Given table A with n rows and table B with m rows. How many rows of table result by Cartesian product on AxB?

a)

m*n rows

b)

m*n +1 rows

c)

m*n-1 rows

d)

m+n rows

6.

Which of the following is NOT the binary operation in the relational Algebra?

a)

Project

b)

Cartesian product

c)

Union

d)

Set difference

7.

A key:

a)

must always be composed of two or more columns.

b)

can only be one column.

c)

identifies a row.

d)

identifies a column.

8.

This simple SQL queries, uses the three keywords that characterize SQL is ____ ?

a)

Count, Sum and Avg

b)

Insert, Update and Delete

c)

Select, From, and Where

d)

And, Or, and Not

9.

In the relational model, how are relationships represented between tables?

a)

By adding attributes to each table

b)

By creating a new table for each relationship

c)

By adding foreign keys to related tables

d)

By creating a primary key in each table

10.

What is a weak entity in an ERD?

a)

An entity with no attributes

b)

An entity that participates in a one-to-many relationship

c)

An entity that cannot exist without being related to another entity

d)

An entity with a composite key

11.

A primary key is combined with a foreign key creates:

a)

Parent-Child relationship between the tables that connect them.

b)

Many to many relationship between the tables that connect them.

c)

Network model between the tables that connect them.

d)

None of the mentioned.

12.

The key for a weak entity set is_____?

a)

Zero or more attributes

b)

The set of attributes of supporting relationships

c)

It is possible for an entity set's key to be composed of attributes, some or all of which belong to another entity set

d)

The set of attributes of supporting entity sets

13.

What are some benefits of normalization when converting an ERD to a relational model?

a)

Increased storage space efficiency

b)

Reduced update anomalies

c)

Simplified database queries

d)

Enhanced data security

14.

_____ returns a relation instance containing all tuples that occur in both R and S

a)

Intersection

b)

Set-difference

c)

Union

d)

Cross-product

15.

To modify the schema of an existing relation use ______

a)

Create table

b)

Modify table

c)

Alter table

d)

Drop table

16.

According to the technology deployed by the database management system, which of the following is correct?

a)

Locks are used to maintain transactional integrity and consistency.

b)

Cursors are used to maintain transactional integrity and consistency.

c)

Procedures are used to maintain transactional integrity and consistency.

d)

Functions are used to maintain transactional integrity and consistency.

17.

Choose the incorrect statement about DELETE and TRUNCAT in SQL Server.

a)

DELETE is used for unconditional removal of data records from Tables; TRUNCATE is used for conditional removal of data records from Tables.

b)

DELETE is a DML command and the operations are logged, whereas TRUNCATE is a DDL command and the operations are not logged.

c)

DELETE removes records and records each deletion in the transaction log whereas TRUNCATE deallocates pages and records each deallocation in the transaction log.

d)

TRUNCATE is generally considered quicker as it makes less use of the transaction log

18.

The result which operation contains all pairs of tuples from the two relations, regardless of whether their attribute values match.

a)

Join

b)

Cartesian product

c)

Intersection

d)

Set difference

19.

Which of the following is true about stored procedure in MS-SQL Server?

a)

They include procedural and SQL statements.

b)

They are stored in Rules folder

c)

They do not need to have a unique name

d)

They are same as void function

20.

What is NOT true about the cursor in SQL?

a)

It is considered the best practice to use when we want insert, update, or delete data in a table of SQL Server.

b)

The cursor allows users to process data from a result set, one row at a time.

c)

Cursors are an alternative to commands, which operate on all rows in a result set at the same time.

d)

Unlike commands, cursors can be used to update data on a row-by-row basis.

21.

How can you delete a user-defined function in SQL?

a)

DELETE FUNCTION function_name

b)

REMOVE FUNCTION function_name

c)

DROP FUNCTION function_name

d)

ERASE FUNCTION function_name

22.

Which command is used to remove a relation from an SQL?

a)

Drop table

b)

Delete

c)

Purge

d)

Remove

23.

Domain constraints, functional dependency and referential integrity are special forms of _____

a)

Foreign key

b)

Primary key

c)

Assertion

d)

Referential constraint

24.

In an employee table to include the attributes whose value always have some value which of the following constraint must be used?

a)

Null

b)

Not null

c)

Unique

d)

Distinct

25.

Which SQL statement is used to remove an existing index from a table?

a)

Atomicity, Consistency, Isolation, Durability

b)

REMOVE INDEX

c)

DELETE INDEX

d)

UNINDEX TABLE

26.

Choose the correct statement that belongs to DML.

a)

SELECT, DELETE, INSERT

b)

CREATE, UPDATE, SELECT

c)

TRUNCAT, DELETE, UPDATE

d)

UPDATE, DELETE, ALTER

27.

A Delete command operates on _____ relation.

a)

One

b)

Two

c)

Several

d)

Null

28.

You have a table named Books that has columns named Book Title and Description. There is a full-text index on these columns. You need to return rows from the table in which the word 'computer' exists in either column. Which code segment should you use?

a)

SELECT * FROM Books WHERE FREETEXT(*, 'computer')

b)

SELECT * FROM Books WHERE Book Title LIKE '%computer%'

c)

SELECT * FROM Books WHERE Book Title = '%computer%' OR Description = '%computer%'

d)

SELECT * FROM Books WHERE FREE

29.

Which of the following is false about a foreign key?

a)

Whereas only one foreign key is allowed in a table.

b)

It refers to the field in a table which is the primary key of another table.

c)

It can contain duplicate values and a table in a relational database.

d)

It can also contain NULL values.

30.

Which of the following is expressed by an E-R diagram?

a)

Relation between process and relationship

b)

Relation between entity and process

c)

Relation between processes

d)

Relation between entities

31.

Which of the following statements about relational databases is true?

a)

The database is built on a relational data model.

b)

The database is created from excel software.

c)

Relational databases are only relations with attributes that are not primary keys.

d)

Relational database is the relationship between rows and columns in a data table.

32.

What is the purpose of data normalization in the context of the database design?

a)

Ensure data security

b)

Avoid information anomalies

c)

Make sure data is inherited

d)

Ensuring better data storage

33.

Given following schema R(A, B, C, D) and S={A→B, BC, C→D}Compute {A}+?

a)

AB

b)

ABC

c)

ABCD

d)

BCD

34.

Suppose that we have a relation that possesses data about an individual entity. In Addition, it should not have any multi-valued dependencies. Which of the following is the highest normal form for this relation?

a)

1NF

b)

2NF

c)

3NF

d)

4NF

35.

What is relational algebra?

a)

Relational algebra is a set of operations on relations.

b)

Relational algebra is the decomposition of relations.

c)

Relational algebra is eliminated from relations.

d)

Relational algebra is gone from relations.

36.

For the following relations and a Set operation: Employee Name | City | Gender Nguyen Trung Truc | HCM | Male Le Hong Son | HCM | Male Customer Name | City | Gender Nguyen Trung Truc | HCM | Male Tran Tuyet Nhi | HN | Female and Employee Customer What is the result of the Union operation?

a)

Name | City | Gender Nguyen Trung Truc | HCM | Male Le Hong Son | HCM | Male

b)

Name | City | Gender Nguyen Trung Truc | HCM | Male Tran Tuyet Nhi | HN | Female

c)

Name | City | Gender Nguyen Trung Truc | HCM | Male Le Hong Son | HCM | Male Nguyen Trung Truc | HCM | Male Tran Tuyet Nhi | HN | Female

d)

Name | City | Gender Nguyen Trung Truc | HCM | Male Le Hong Son | HCM | Male Tran Tuyet Nhi | HN | Female

37.

What is the foreign key?

a)

It is a relational constraint that enforces referential integrity between two tables

b)

It is a relational constraint that that ensures the values in a specific column or set of columns are unique across all the rows in a table

c)

The key that need to make a data in another table

d)

A collection of data that allows to access and use of that data

38.

Database data models usually have a way to go describe limitations on what the data can be, is called

a)

Constraints on the data

b)

Operations on the data

c)

Structure of the data

d)

definition of data

39.

(a)   A variable is local, and its value is not preserved by the DBMS after a run-ning of the function or procedure.

40.

What is an SQL virtual table that is constructed from other tables?

a)

Just another table

b)

A view

c)

A relation

d)

Query results

41.

In SQL, to update a relation's schema, which one of the following statements can be used?

a)

Insert

b)

Update

c)

Alter

d)

Alter table

42.

What happens if an error occurs during a transaction and it is not explicitly handled or rolled back?

a)

The transaction is automatically committed

b)

The transaction is automatically rolled back

c)

The database becomes read-only

d)

The transaction remains in a pending state

43.

Foreign key is the one in which the ______ of one relation is referenced in another relation.

a)

Foreign key

b)

Primary key

c)

References

d)

Check constraint

44.

The DROP TABLE statement:

a)

deletes the table structure only.

b)

deletes the table structure along with the table data.

c)

works whether or not referential integrity constraints would be violated.

d)

is not an SQL statement.

45.

Which of the following aggregate functions does not ignore nulls in its results?

a)

MIN

b)

MAX

c)

COUNT (*)

d)

COUNT

46.

Which of the following statements is false regarding SQL Correlated sub-queries?

a)

A correlated subquery is not evaluated once for each row processed by the parent statement.

b)

Correlated subqueries are used for row-by-row processing.

c)

Each subquery is executed once for every row of the outer query.

d)

Subqueries always process the innermost query first and the work outward.

47.

Suppose relation R(A, B) has the following tuples: AB ------------------ 1 a 2 b 3 a 4 d 5 e 6 a 7 g The SQL statement to count distinct rows from column B in relation R

a)

SELECT COUNT DISTINCT B AS 'Total_rows' FROM R;

b)

SELECT (COUNT DISTINCT B) AS 'Total_rows' from R;

c)

SELECT DISTINCT B AS 'Total_rows' from R;

d)

SELECT COUNT (DISTINCT(B)) AS 'total_rows' FROM R;

48.

Which statement is used to change the data type of a column named E in table A?

a)

ALTER TABLE A ALTER COLUMN E [DataType]

b)

ALTER TABLE A ALTER COLUMN E

c)

ALTER TABLE A ALTER E [DataType]

d)

ALTER TABLE A DROP COLUMN E [DataType]

49.

What happens to derived attributes when converting an ERD to a relational model?

a)

They become primary keys in the related tables

b)

They are calculated and stored as regular attributes in the related tables

c)

They become foreign keys in the related tables

d)

They are ignored during the conversion process

50.

What does the attribute domain define in the relational model?

a)

The primary key of the table

b)

The foreign key references

c)

The cardinality of relationships

d)

The data type and range of values that an attribute can hold

51.

To covert an entity-relationship diagram to a logical diagram, which of the following will create a new relation that will typically include primary keys from both entities and any additional attributes related to the relationship?

a)

A many-to-many relationship

b)

A recursive relationship

c)

A one-to-many relationship

d)

A one-to-one relationship

52.

What is a derived attribute in an ERD?

a)

An attribute that is calculated from other attributes

b)

An attribute that cannot be calculated

c)

An attribute that is the primary key of an entity

d)

An attribute that represents a relationship

53.

Which of the following statements is true about data normalization:

a)

1NF: Is a relationship with a primary key and no repeating groups

b)

2NF: Is 1NF without transitive functional dependencies

c)

3NF is: 1 NF without partial functional dependencies

d)

All of the above answers are wrong.

54.

Which normalization level ensures that each attribute is dependent only on the primary key?

a)

First Normal Form (1NF)

b)

Second Normal Form (2NF)

c)

Third Normal Form (3NF)

d)

Boyce-Codd Normal Form (BCNF)

55.

Suppose that there is a relation R (A, B, C, D, E, G) And functional dependencies S = {AB→C, DEG, CA, BEC, BC→D, CG → BD, ACD → B, CE → AG} Compute {AB}+

a)

ABCD

b)

ABCDE

c)

ABCDG

d)

ABCDEG

56.

Which of the following represents Armstrong's Axiom of Transitivity?

a)

If AB, then AC → BC

b)

If A B and B → C, then A → C

c)

If A B, then B → A

d)

If A B, then A → BC

57.

Which statement is the best represents Armstrong's Axiom of Decomposition?

a)

If A B and A → C, then A → BC

b)

If A B and B → C, then A → C

c)

If A B, then AC → BC

d)

If A B, then B → C

58.

What are logical constraints?

a)

The relationships between attributes are represented by relational operations.

b)

The relationships between attributes are represented by comparisons operator.

c)

The relationships between attributes are represented by mathematical expressions.

d)

The relationships between attributes are represented by functional dependencies.

59.

What is a database?

a)

A collection of information that exists over a long period of time. A collection of related data and managed by a database management system.

b)

The database is built based on the relational data model.

c)

Database used to create, update and exploit relational databases.

d)

The database is built based on the relational data model and exploits the relational database.

60.

In query compiler, which unit builds a tree structure from the text form of the query?

a)

A query parser

b)

A query preprocessor

c)

A query optimizer

d)

A query processor

61.

What are the disadvantages of network data model?

a)

Not support the high-level query language

b)

Not support the relationships between nodes

c)

Not support the database management system

d)

Not support the storage method of very large amounts of data

62.

What is information?

a)

A collection of unprocessed data

b)

A collection of processed data

c)

A collection of processed information

d)

A collection of unprocessed information

63.

Which of the following is not a data model in the database?

a)

Conceptual data model

b)

Object-Oriented data model

c)

Network data model

d)

Hierarchical data model

64.

In query compiler, which unit transforms the initial query plan into the best available sequence of operations on the actual data?

a)

A query parser

b)

A query preprocessor

c)

A query optimizer

d)

A query processor

65.

The ability to query data, as well as insert, delete, and alter tuples, is offered by ____

a)

TCL (Transaction Control Language)

b)

DCL (Data Control Language)

c)

DDL (Data Definition Language)

d)

DML (Data Manipulation Language)

66.

The conceptual model is:

a)

Independent of both hardware and software

b)

Dependent on both hardware and software.

c)

Dependent on software.

d)

Dependent on hardware.

67.

A data model is a notation for describing data or information. The description generally consists ?

a)

Structure of the data

b)

Operations on the data

c)

Constraints on the data.

d)

All of the others

68.

What is a Relational Database?

a)

A collection of two or more tables

b)

A database that is able to process queries, forms, reports and macro

c)

The same as an Excel file database

d)

A collection of two or more tables that are joined using relationships

69.

A _____ is a relation name, together with the attributes of that relation.

a)

Schemas

b)

Instance

c)

Database

d)

Attributes

70.

The values appearing in given attributes of any tuple in the referencing relation must likewise occur in specified attributes of at least one tuple in the referenced relation, according to ________ constraint integrity

a)

Referential

b)

Primary

c)

Referencing

d)

Specific

71.

For the following relation: Student ID | Name | City | Gender SE1234 | Le Hong Phong | HCM | Male SE1235 | Le Hong Hanh | HCM | Female SE1236 Tran Binh Trong | HN | Male Use Algebraic query language to list all name and city of students in HCM and Male?

a)

Name, City (City='HCM' AND Gender='Male' (Student))

b)

Name, City([City='HCM' AND Gender='Male' (Student))

c)

Name, City (City='HCM' && Gender='Male' (Student))

d)

Name, City (City='HCM' && Gender='Male' (Student)

72.

If attribute A determines both attributes B and C, then it is also true that:

a)

(B,C) -> A.

b)

C -> A.

c)

B -> A.

d)

A -> B

73.

Which operation is commonly used to display all the properties derived from the original property?

a)

Union

b)

Intersection

c)

Closure

d)

Projection

74.

If a relation is in BCNF, then it is also in

a)

1 NF

b)

2 NF

c)

3 NF

d)

All of the mentioned

75.

In relational database design, which of the following is known as a set of entities of the same type that share the same properties or attributes?

a)

Entity Relation model

b)

Entity set

c)

Field set

d)

Record set

76.

An E/R diagram is a graphical representation of sets, __________?

a)

Entity

b)

Attributes

c)

Relationships

d)

All of the others

77.

To convert from ER Diagram to Relational Model, 1-M relationship:

a)

Put key attribute of one-side to M-side

b)

Put key attribute of M-side to one-side

c)

Generate 1 relation, Primary key of this relation combined from two relations

d)

Build a table with two columns, one column for each participating entity set's primary key

78.

Which key does not accept the null value?

a)

Unique Key

b)

Primary Key

c)

Foreign Key

d)

Candidate key

79.

Which of the following is correct?

a)

SELECT datepart(DATE, '10-jan-24')

b)

SELECT datepart('10-jan-24', DATE)

c)

SELECT datepart('10-jan-24', DAY)

d)

SELECT datepart(DAY,'10-jan-24')

80.

Regarding difference between a primary key vs. unique key, which of the following is false?

a)

There can be only one unique key for a table

b)

A primary key is a key that uniquely identifies each record in a table but cannot store NULL values

c)

A unique key prevents duplicate values in a column and can store NULL values.

d)

Only one primary key is allowed to use in a table.

81.

Which statement is used to disable a foreign key constraint named fk_name during INSERT and UPDATE transactions in table B?

(a)  

82.

Which statement is used to disable a foreign key constraint named fk_name during INSERT and UPDATE transactions in table B?

a)

ALTER TABLE B DROP CONSTRAINT fk_name

b)

ALTER TABLE B DISABLE CONSTRAINT fk_name

c)

ALTER TABLE B DISABLE fk_name

d)

ALTER TABLE B NOCHECK CONSTRAINT fk_name

83.

You have a column named TelephoneNumber that stores numbers as varchar(20). You need to write a query that returns the first three characters of a telephone number. Which expression should you use?

a)

CHARINDEX('[0-9][0-9][0-9]', TelephoneNumber, 3)

b)

SUBSTRING (Telephone Number, 3, 1)

c)

SUBSTRING(TelephoneNumber, 3, 3)

d)

LEFT(TelephoneNumber, 3)

84.

Which SQL statement selects all rows from table called Contest, with column ContestDate having values greater or equal to May 25,2006?

a)

SELECT * FROM Contest WHERE ContestDate >= '05/25/2006'

b)

SELECT * FROM Contest GROUPBY ContestDate >= '05/25/2006'.

c)

SELECT * FROM Contest WHERE ContestDate < '05/25/2006'.

d)

SELECT * FROM Contest HAVING ContestDate >= '05/25/2006'.

85.

In MS-SQL Server, which of the following is true about join operator?

a)

SELECT * FROM tbICUSTOMER, tbIORDER

b)

Cartesian join

c)

Equi-join

d)

Natural join

e)

Outer join

86.

UPDATE ____ salary= salary * 1.05; Fill in with correct keyword to update the instructor relation.

a)

Where

b)

Set

c)

In

d)

Select

87.

Which one of the following SQL statements returns the name of the employee (employeename, dept_code, salary) receiving the maximum salary in a particular department?

a)

Select employeename, dept_code, salary From employee Where employee.salary in (select (salary) from Employee group by dept_code having Max(salary))

b)

Select employeename, dept_code, salary From employee Where employee.salary in (select Max(salary)from Employee group by dept_code)

c)

Select employeename, dept_code, salary From employee Where employee.salary in (select Max(salary)from Employee group by dept_code having Max(salary))

d)

Select employeename, dept_code, salary From employee Where employee.salary =(select Max(salary)from Employee group by dept_code

88.

Insert into Students (32, N'lona Bush', N'Female'); In the given query which of the keyword has to be inserted?

a)

Into

b)

Set

c)

Where

d)

Values

89.

Foreign key constraints are created by using the " "keyword to refer to the primary key of another table.

a)

Refer

b)

References

c)

Referential

d)

All of the others

90.

What is not the purpose of the index in MS-SQL Server?

a)

To use less hardware resources

b)

To enhance the query performance

c)

To provide an index to a record

d)

To perform fast in searching

91.

The transaction methods is used with the Connection object to save or cancel changes made to the data source.

a)

Begin Transaction, Rollback Transaction

b)

Begin Transaction, Commit Transaction

c)

Begin Transaction, Commit Transaction, Rollback Transaction

d)

Commit Transaction, Rollback Transaction

92.

The deadlock state can be changed back to stable state by using statement.

a)

Delete

b)

Deadlock

c)

Commit

d)

Rollback

93.

Which one of the following is not true for a view?

a)

View never contains derived columns.

b)

A view definition is permanently stored as part of the database.

c)

View is a virtual table.

d)

View is derived from other tables

94.

Which is the SQL statement that creates an updatable view? In this question, all the tables in the SQL statements are updatable.

a)

CREATE VIEW Ordered_Product(Product_No) AS SELECT DISTINCT Product_No FROM Order

b)

CREATE VIEW Order_List(Order_No, Product_Name, Order_Quantity) AS SELECT Order_No,Product_Name, Order_Quantity FROM Order, Product WHERE Order Product_No=Product.Product_No

c)

CREATE VIEW Product_Order(Product_No, Order_Quantity) AS SELECT Product_No,SUM(Order_Quantity) FROM Order GROUP BY Product_No

d)

CREATE VIEW Expensive_Product(Product_No, Product_Name) AS SELECT Product_No,Product_Name FROM Product WHERE Product_Unit_Price>1000

95.

Triggers are stored blocks of code that have to be called in order to operate.

a)

True

b)

False

96.

In SQL, when does a BEFORE INSERT trigger fire?

a)

Before the execution of a SELECT statement

b)

Before a new record is inserted into a table

c)

Before a transaction is committed

d)

Before a table is dropped

97.

In SQL, what is the purpose of the CLOSE statement in relation to cursors?

a)

To close the database connection

b)

To close the cursor and release associated resources

c)

To close the transaction

d)

To close the result set

98.

Which SQL statement is used to declare a cursor?

a)

OPEN

b)

DECLARE

c)

CREATE CURSOR

d)

BEGIN CURSOR

99.

How is User-defined function different from Store Procedure?

a)

User-defined functions do not have input parameters, Store Procedures do

b)

User-defined functions cannot contain transactions, Store Procedures can

c)

Store Procedure does not have return results, User-defined function does

d)

All of the mentioned answers are incorrect

100.

How to execute a procedure?

a)

execute name_sp

b)

exe name_sp

c)

call name_sp

d)

All the answers above

e)

a and b are correct

101.

A stored procedure in SQL is a?

a)

Block of functions

b)

Group of Transact-SQL statements compiled into a single execution plan

c)

Group of distinct SQL statements

d)

None of the mentioned

102.

_______has a right side that is a subset of its left side.

a)

A trivial FD

b)

A non_trivial FD

c)

A key of relation

d)

A super key of relation

103.

Given R as a relation, which of the following statements is correct about normalizing data in 3NF form:

a)

If R: Has a primary key, no repeating groups, no multivalued attributes/composite attributes

b)

If R: Has a primary key, no repeating groups, no multivalued attributes/complex attributes, no partial functional dependencies.

c)

If R: Has a primary key, no repeating groups, no multivalued/composite attributes, no transitive dependencies.

d)

If R: Has a primary key, no repeating groups, no multivalued attributes/complex attributes, no transitive functional dependencies, no partial functional dependencies.

e)

If R: has complete functional dependency.

104.

Which of the following statements is true regarding Third Normal Form (3NF)?

a)

It eliminates transitive dependencies

b)

It allows for redundant data

c)

It only considers partial dependencies

d)

It doesn't address any anomalies in a database

105.

When is it recommended to use a cursor?

4 lines
106.

When is it recommended to use a cursor in SQL?

a)

Always, as cursors are the most efficient way to process data

b)

When processing data row by row is necessary or unavoidable

c)

Only when creating complex joins between tables

d)

Never, as set-based operations are always more efficient

107.

How can you invoke a user-defined function in a SQL query?

a)

Using the EXECUTE statement

b)

Using the CALL statement

c)

Using the SELECT statement

d)

Using the RUN statement

108.

_______is a set of one or more attributes taken collectively to uniquely identify a record.

a)

Primary Key

b)

Foreign key

c)

Super key

d)

Candidate key

109.

Which of the following belongs to DDL (data definition language)?

a)

create, alter, drop

b)

Insert, update, delete, select

c)

Truncate, select, invoke

d)

Deny, create, drop

110.

Which of the following is not a feature of DBMS?

a)

Minimum duplication of data

b)

Redundancy of data

c)

Single-user access only

d)

Support ACID Property

111.

What is a database?

a)

Organized collection of information that cannot be accessed, updated, and managed

b)

Collection of data or information without organizing

c)

Organized collection of data or information that can be accessed, updated, and managed

d)

Organized collection of data that cannot be updated

112.

What is the full form of DBMS?

a)

Data of Binary Management System

b)

Database Management System

c)

Database Management Service

d)

Data Backup Management System

113.

Which of the following is the appropriate characteristic of a database?

a)

Because a database is created to suit the format of the data, it cannot respond flexibly to data format changes.

b)

The procedure for making backups is complicated.

c)

It is difficult to share data between operations due to an exclusive control function.

d)

It can be accessed by multiple users at the same time due to an exclusive control function.

114.

A database administrator: a person or persons responsible for the structure or schema of the database.

a)

True

b)

False

115.

What does an RDBMS consist of?

a)

Collection of Tables

b)

Collection of Records

c)

Collection of Keys

d)

Collection of Field

116.

The descriptive property possessed by each entity set is ______

a)

Entity

b)

Attribute

c)

Relation

d)

Model

117.

The ___ operation allows the combining of two relations by merging pairs of tuples, one from each relation, into a single tuple.

a)

Select

b)

Join

c)

Union

d)

Intersection

118.

For the following relations and a Set operation: Employee Name | City | Gender Nguyen Trung Truc | HCM | Male Le Hong Son | HCM | Male Customer Name | City | Gender Nguyen Trung Truc | HCM | Male Tran Tuyet Nhi | HN | Female and Employee \ Customer What is the result of the Difference operation?

a)

Name | City | Gender Le Hong Son | HCM | Male

b)

Name | City | Gender Nguyen Trung Truc | HCM | Male Tran Tuyet Nhi | HN | Female

c)

Name | City | Gender Nguyen Trung Truc | HCM | Male Le Hong Son | HCM | Male

d)

Name | City | Gender Nguyen Trung Truc | HCM | Male Le Hong Son | HCM | Male Tran Tuyet Nhi | HN | Female

119.

In the relational model of data, what is the result of an algebraic query language?

a)

Data series

b)

Data file

c)

Relation

d)

database

120.

What are logical constraints?

a)

The relationships between attributes are represented by relational operations.

b)

The relationships between attributes are represented by comparisons operator.

c)

The relationships between attributes are represented by mathematical expressions.

d)

The relationships between attributes are represented by functional dependencies

121.

What is Database Normalization?

a)

A process whereby a limit is put on the number of fields a record can contain

b)

The process of ensuring that each table has a key

c)

The process of ensuring that a relational database has at least two tables in it

d)

A process whereby the design of a table (relation) is decomposed into more tables that more precisely fit the relational mode

122.

Consider a relation R(A,B,C,D,E) with functional dependencies: AB->C, B->C, E->D and C->E. What is/are the key(s) for R

a)

AC

b)

AD

c)

AB

d)

AE

123.

Suppose that we have a relation R (B, C, D) that satisfies FD's: D->B and D->C. Which of the following FD is equivalent to the given dependency functions?

a)

D->BC

b)

D->DB

c)

DB->B

d)

DC->DB

124.

Which normalization level ensures that there are no repeating groups in tables?

a)

First Normal Form (1NF)

b)

Second Normal Form (2NF)

c)

Third Normal Form (3NF)

d)

Boyce-Codd Normal Form (BCNF)

125.

The highest normal form for relation schema R(ABCD) with functional dependencies: F = {AB-> C; D->B, C->ABD} is:

a)

2NF

b)

1NF

c)

3NF

d)

BCNF

126.

What is the primary goal of normalization in database design?

a)

To increase data redundancy

b)

To simplify data retrieval

c)

To introduce duplicate data

d)

To violate functional dependencies

127.

What is the purpose of a foreign key in an ERD?

a)

It defines the data type of attributes

b)

It determines the cardinality of relationships

c)

It serves as the primary identifier for a table

d)

It establishes a link between two tables

128.

In SQL, ERD use three types of principle elements to form relationships:

a)

Entity sets, Constraints and Relationships

b)

Attributes, Constraints, and Relationships

c)

Entity sets, Attributes, and Relationships

d)

Entity sets, Attributes and Constraints