NEW
Font size
WorksheetsDBI_1
Total questions: 49
Worksheet time: 25mins
What are the disadvantages of network data model? (Choose 1 answer)
Not support the high-level query language
Not support the relationships between nodes
Not support the database management system
Not support the storage method of very large amounts of data
In query compiler, which unit builds a tree structure from the text form of the query? (Choose 1 answer)
A query parser
A query preprocessor
A query optimizer
A query processor
Which of the following is not a feature of DBMS? (Choose 1 answer)
Minimum duplication of data
Redundancy of data
Single-user access only
Support ACID Property
What is information? (Choose 1 answer)
A collection of unprocessed data
A collection of processed data
A collection of processed information
A collection of unprocessed information
The ability to query data, as well as insert, delete, and alter tuples, is offered by (Choose 1 answer)
TCL (Transaction Control Language)
DCL (Data Control Language)
DDL (Data Definition Language)
DML (Data Manipulation Language)
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 query parser
A query preprocessor
A query optimizer
A query processor
What is a database? (Choose 1 answer)
A collection of information that exists over a long period of time. A collection of related data and managed by a database management system.
The database is built based on the relational data model.
Database used to create, update and exploit relational databases.
The database is built based on the relational data model and exploits the relational database.
What does an RDBMS consist of? (Choose 1 answer)
Collection of Tables
Collection of Records
Collection of Keys
Collection of Fields
A ___ is a relation name, together with the attributes of that relation. (Choose 1 answer)
Schemas
Instance
Database
Attributes
The ___ operation allows the combining of two relations by merging pairs of tuples, one from each relation, into a single tuple. (Choose 1 answer)
Select
Join
Union
Intersection
What are logical constraints? (Choose 1 answer)
The relationships between attributes are represented by relational operations.
The relationships between attributes are represented by comparisons operator.
The relationships between attributes are represented by mathematical expressions.
The relationships between attributes are represented by functional dependencies.
In the relational model of data, what is the result of an algebraic query language? (Choose 1 answer)
Data series
Data file
Relation
Database
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)
Name | City | Gender Le Hong Son | HCM | Male
Name | City | Gender Nguyen Trung Truc | HCM | Male Tran Tuyet Nhi | HN | Female
Name | City | Gender Nguyen Trung Truc | HCM | Male Le Hong Son | HCM | Male
Name | City | Gender Nguyen Trung Truc | HCM | Male Le Hong Son | HCM | Male Tran Tuyet Nhi | HN | Female
What is Database Normalization? (Choose 1 answer)
A process whereby a limit is put on the number of fields a record can contain
The process of ensuring that each table has a key
The process of ensuring that a relational database has at least two tables in it
A process whereby the design of a table (relation) is decomposed into more tables that more precisely fit the relational model
Which statement best represents Armstrong's Axiom of Decomposition? (Choose 1 answer)
If A → B and A → C, then A → BC
If A → B and B → C, then A → C
If A → B, then AC → BC
If A → B, then B → C
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)
ABCD
ABCDE
ABCDG
ABCDEG
Which operation is commonly used to display all the properties derived from the original property? (Choose 1 answer)
Union
Intersection
Closure
Projection
Which normalization level ensures that each attribute is dependent only on the primary key? (Choose 1 answer)
First Normal Form (1NF)
Second Normal Form (2NF)
Third Normal Form (3NF)
Boyce-Codd Normal Form (BCNF)
Which of the following statements is true about data normalization: (Choose 1 answer)
1NF: Is a relationship with a primary key and no repeating groups
2NF: Is 1NF without transitive functional dependencies
3NF: Is 1NF without partial functional dependencies
All of the above answers are wrong
Given R as a relation, which of the following statements is correct about normalizing data in 3NF form: (Choose 1 answer)
If R: Has a primary key, no repeating groups, no multivalued attributes/composite attributes
If R: Has a primary key, no repeating groups, no multivalued attributes/complex attributes, no partial functional dependencies
If R: Has a primary key, no repeating groups, no multivalued/composite attributes, no transitive dependencies
If R: Has a primary key, no repeating groups, no multivalued attributes/complex attributes, no transitive functional dependencies, no partial functional dependencies
If R: Has complete functional dependency
In SQL, ERD use three types of principle elements to form relationships: (Choose 1 answer)
Entity sets, Constraints and Relationships
Attributes, Constraints, and Relationships
Entity sets, Attributes, and Relationships
Entity sets, Attributes and Constraints
What is a derived attribute in an ERD? (Choose 1 answer)
An attribute that is calculated from other attributes
An attribute that cannot be calculated
An attribute that is the primary key of an entity
An attribute that represents a relationship
Which of the following statements is correct when converting from the ERD model to the relational model? (Choose 1 answer)
The order of the columns is not important
The order of both rows and columns is important
The order of the rows is important
The order of the columns is important
An E/R diagram is a graphical representation of sets, ? (Choose 1 answer)
Entity
Attributes
Relationships
All of the others
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 many-to-many relationship
A recursive relationship
A one-to-many relationship
A one-to-one relationship
How are weak entity sets represented in an Entity Relationship Diagram (ERD)? (Choose 1 answer)
With rectangle
With diamond shape
With a double-line rectangle
With a dashed oval
What does the attribute domain define in the relational model? (Choose 1 answer)
The primary key of the table
The foreign key references
The cardinality of relationships
The data type and range of values that an attribute can hold
What happens to derived attributes when converting an ERD to a relational model? (Choose 1 answer)
They become primary keys in the related tables
They are calculated and stored as regular attributes in the related tables
They become foreign keys in the related tables
They are ignored during the conversion process
Which of the following is correct? (Choose 1 answer)
SELECT datepart(DATE, '10-Jan-24')
SELECT datepart('10-Jan-24', DATE)
SELECT datepart(10-jan-24' DAY)
SELECT datepart(DAY, 10-jan-24")
Which statement is used to change the data type of a column named E in table A? (Choose 1 answer)
ALTER TABLE A ALTER COLUMN E [DataType]
ALTER TABLE A ALTER COLUMN E
ALTER TABLE A ALTER E [DataType]
ALTER TABLE A DROP COLUMN E [DataType]
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)
SELECT COUNT DISTINCT B AS 'Total_rows' FROM R;
SELECT (COUNT DISTINCT B) AS 'Total_rows' FROM R;
SELECT DISTINCT B AS 'Total_rows' FROM R;
SELECT COUNT(DISTINCT(B)) AS 'Total_rows' FROM R;
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)
SELECT * FROM Contest WHERE ContestDate >= '05/25/2008'
SELECT * FROM Contest GROUP BY ContestDate >= '05/25/2008'
SELECT * FROM Contest WHERE ContestDate < '05/25/2008'
SELECT * FROM Contest HAVING ContestDate >= '05/25/2008'
(Choose 1 answer)
Cartesian join
Equi-join
Natural join
Outer join
Which of the following statements is false regarding SQL Correlated sub-queries? (Choose 1 answer)
A correlated subquery is not evaluated once for each row processed by the parent statement.
Correlated subqueries are used for row-by-row processing.
Each subquery is executed once for every row of the outer query.
Subqueries always process the innermost query first and then work outward.
Which of the following aggregate functions does not ignore nulls in its results? (Choose 1 answer)
MIN
MAX
COUNT()
COUNT
The DROP TABLE statement (Choose 1 answer)
deletes the table structure only.
deletes the table structure along with the table data.
works whether or not referential integrity constraints would be violated.
is not an SQL statement.
Foreign key is the one in which the ___ of one relation is referenced in another relation (Choose 1 answer)
Foreign key
Primary key
References
Check constraint
In SQL, what does the acronym ACID stand for concerning transactions? (Choose 1 answer)
Atomicity, Consistency, Isolation, Durability
Association, Concurrency, Integrity, Database
Aggregate, Criteria, Index, Delete
All Columns, Insertion, Deletion
Transaction processing is associated with everything below except (Choose 1 answer)
Producing detail, summary, or exception reports
Recording a business activity
Confirming an action or triggering a response
Maintaining data
What happens if an error occurs during a transaction and it is not explicitly handled or rolled back? (Choose 1 answer)
The transaction is automatically committed
The transaction is automatically rolled back
The database becomes read-only
The transaction remains in a pending state
In SQL, to update a relation's schema, which one of the following statements can be used? (Choose 1 answer)
Insert
Update
Alter
Alter table
What is an SQL virtual table that is constructed from other tables? (Choose 1 answer)
Just another table
A view
A relation
Query results
Which of the following is not mentioned about how a local variable is defined using T-SQL? (Choose 1 answer)
The name of the local variable should begin with “@@” sign as the first character of its name.
A local variable is defined using T-SQL by using statement “DECLARE”.
When a variable is first declared, its value is set to NULL. To assign a value to a variable, use the SET statement.
The data type of local variable is declared after its name and assigned a system-supplied or user-defined data type and a length.
A/AN ___ is a statement that gives the user a number of different options in the event, condition, and action parts (Choose 1 answer)
Trigger
Stored-function
Index
Stored-procedure
How can you invoke a user-defined function in a SQL query? (Choose 1 answer)
Using the EXECUTE statement
Using the CALL statement
Using the SELECT statement
Using the RUN statement
Which SQL statement is used to declare a cursor? (Choose 1 answer)
OPEN
DECLARE
CREATE CURSOR
BEGIN CURSOR
How is User-defined function different from Stored Procedure? (Choose 1 answer)
User-defined functions do not have input parameters, Stored Procedures do
User-defined functions cannot contain transactions, Stored Procedures can
Stored Procedure does not have return results, User-defined function does
All of the mentioned answers are incorrect
A variable is local, and its value is not preserved by the DBMS after running of the function or procedure (Choose 1 answer)
DECLARE
RETURN
CALL
EXEC
___ is a set of one or more attributes taken collectively to uniquely identify a record (Choose 1 answer)
Primary Key
Foreign Key
Super Key
Candidate Key
