wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

DBI_1

Total questions: 49

Worksheet time: 25mins

Name
Class
Date
1.

What are the disadvantages of network data model? (Choose 1 answer)

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

2.

In query compiler, which unit builds a tree structure from the text form of the query? (Choose 1 answer)

a)

A query parser

b)

A query preprocessor

c)

A query optimizer

d)

A query processor

3.

Which of the following is not a feature of DBMS? (Choose 1 answer)

a)

Minimum duplication of data

b)

Redundancy of data

c)

Single-user access only

d)

Support ACID Property

4.

What is information? (Choose 1 answer)

a)

A collection of unprocessed data

b)

A collection of processed data

c)

A collection of processed information

d)

A collection of unprocessed information

5.

The ability to query data, as well as insert, delete, and alter tuples, is offered by (Choose 1 answer)

a)

TCL (Transaction Control Language)

b)

DCL (Data Control Language)

c)

DDL (Data Definition Language)

d)

DML (Data Manipulation Language)

6.

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

a)

A query parser

b)

A query preprocessor

c)

A query optimizer

d)

A query processor

7.

What is a database? (Choose 1 answer)

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.

8.

What does an RDBMS consist of? (Choose 1 answer)

a)

Collection of Tables

b)

Collection of Records

c)

Collection of Keys

d)

Collection of Fields

9.

A ___ is a relation name, together with the attributes of that relation. (Choose 1 answer)

a)

Schemas

b)

Instance

c)

Database

d)

Attributes

10.

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

a)

Select

b)

Join

c)

Union

d)

Intersection

11.

What are logical constraints? (Choose 1 answer)

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.

12.

In the relational model of data, what is the result of an algebraic query language? (Choose 1 answer)

a)

Data series

b)

Data file

c)

Relation

d)

Database

13.

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 Employee \ Customer What is the result of the Difference operation? (Choose 1 answer)

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

14.

What is Database Normalization? (Choose 1 answer)

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 model

15.

Which statement best represents Armstrong's Axiom of Decomposition? (Choose 1 answer)

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

16.

Suppose that there is a relation R(A, B, C, D, E, G) and functional dependencies S = {AB → C, D → EG, C → A, BE → C, BC → D, CG → BD, ACD → B, CE → AG}. Compute {AB}+ (Choose 1 answer)

a)

ABCD

b)

ABCDE

c)

ABCDG

d)

ABCDEG

17.

Which operation is commonly used to display all the properties derived from the original property? (Choose 1 answer)

a)

Union

b)

Intersection

c)

Closure

d)

Projection

18.

Which normalization level ensures that each attribute is dependent only on the primary key? (Choose 1 answer)

a)

First Normal Form (1NF)

b)

Second Normal Form (2NF)

c)

Third Normal Form (3NF)

d)

Boyce-Codd Normal Form (BCNF)

19.

Which of the following statements is true about data normalization: (Choose 1 answer)

a)

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

b)

2NF: Is 1NF without transitive functional dependencies

c)

3NF: Is 1NF without partial functional dependencies

d)

All of the above answers are wrong

20.

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

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

21.

In SQL, ERD use three types of principle elements to form relationships: (Choose 1 answer)

a)

Entity sets, Constraints and Relationships

b)

Attributes, Constraints, and Relationships

c)

Entity sets, Attributes, and Relationships

d)

Entity sets, Attributes and Constraints

22.

What is a derived attribute in an ERD? (Choose 1 answer)

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

23.

Which of the following statements is correct when converting from the ERD model to the relational model? (Choose 1 answer)

a)

The order of the columns is not important

b)

The order of both rows and columns is important

c)

The order of the rows is important

d)

The order of the columns is important

24.

An E/R diagram is a graphical representation of sets, ? (Choose 1 answer)

a)

Entity

b)

Attributes

c)

Relationships

d)

All of the others

25.

To convert 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? (Choose 1 answer)

a)

A many-to-many relationship

b)

A recursive relationship

c)

A one-to-many relationship

d)

A one-to-one relationship

26.

How are weak entity sets represented in an Entity Relationship Diagram (ERD)? (Choose 1 answer)

a)

With rectangle

b)

With diamond shape

c)

With a double-line rectangle

d)

With a dashed oval

27.

What does the attribute domain define in the relational model? (Choose 1 answer)

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

28.

What happens to derived attributes when converting an ERD to a relational model? (Choose 1 answer)

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

29.

Which of the following is correct? (Choose 1 answer)

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")

30.

Which statement is used to change the data type of a column named E in table A? (Choose 1 answer)

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]

31.

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

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;

32.

Which SQL statement selects all rows from table called Contest, with column ContestDate having values greater or equal to May 25, 2008? (Choose 1 answer)

a)

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

b)

SELECT * FROM Contest GROUP BY ContestDate >= '05/25/2008'

c)

SELECT * FROM Contest WHERE ContestDate < '05/25/2008'

d)

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

33.

(Choose 1 answer)

a)

Cartesian join

b)

Equi-join

c)

Natural join

d)

Outer join

34.

Which of the following statements is false regarding SQL Correlated sub-queries? (Choose 1 answer)

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 then work outward.

35.

Which of the following aggregate functions does not ignore nulls in its results? (Choose 1 answer)

a)

MIN

b)

MAX

c)

COUNT()

d)

COUNT

36.

The DROP TABLE statement (Choose 1 answer)

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.

37.

Foreign key is the one in which the ___ of one relation is referenced in another relation (Choose 1 answer)

a)

Foreign key

b)

Primary key

c)

References

d)

Check constraint

38.

In SQL, what does the acronym ACID stand for concerning transactions? (Choose 1 answer)

a)

Atomicity, Consistency, Isolation, Durability

b)

Association, Concurrency, Integrity, Database

c)

Aggregate, Criteria, Index, Delete

d)

All Columns, Insertion, Deletion

39.

Transaction processing is associated with everything below except (Choose 1 answer)

a)

Producing detail, summary, or exception reports

b)

Recording a business activity

c)

Confirming an action or triggering a response

d)

Maintaining data

40.

What happens if an error occurs during a transaction and it is not explicitly handled or rolled back? (Choose 1 answer)

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

41.

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

a)

Insert

b)

Update

c)

Alter

d)

Alter table

42.

What is an SQL virtual table that is constructed from other tables? (Choose 1 answer)

a)

Just another table

b)

A view

c)

A relation

d)

Query results

43.

Which of the following is not mentioned about how a local variable is defined using T-SQL? (Choose 1 answer)

a)

The name of the local variable should begin with “@@” sign as the first character of its name.

b)

A local variable is defined using T-SQL by using statement “DECLARE”.

c)

When a variable is first declared, its value is set to NULL. To assign a value to a variable, use the SET statement.

d)

The data type of local variable is declared after its name and assigned a system-supplied or user-defined data type and a length.

44.

A/AN ___ is a statement that gives the user a number of different options in the event, condition, and action parts (Choose 1 answer)

a)

Trigger

b)

Stored-function

c)

Index

d)

Stored-procedure

45.

How can you invoke a user-defined function in a SQL query? (Choose 1 answer)

a)

Using the EXECUTE statement

b)

Using the CALL statement

c)

Using the SELECT statement

d)

Using the RUN statement

46.

Which SQL statement is used to declare a cursor? (Choose 1 answer)

a)

OPEN

b)

DECLARE

c)

CREATE CURSOR

d)

BEGIN CURSOR

47.

How is User-defined function different from Stored Procedure? (Choose 1 answer)

a)

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

b)

User-defined functions cannot contain transactions, Stored Procedures can

c)

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

d)

All of the mentioned answers are incorrect

48.

A variable is local, and its value is not preserved by the DBMS after running of the function or procedure (Choose 1 answer)

a)

DECLARE

b)

RETURN

c)

CALL

d)

EXEC

49.

___ is a set of one or more attributes taken collectively to uniquely identify a record (Choose 1 answer)

a)

Primary Key

b)

Foreign Key

c)

Super Key

d)

Candidate Key