Databases

Databases

77 questions · Fundamental Engineering · 1–50

Practice

Which of the following is an appropriate description of the mapping between a relational model and relational database in implementation?

In database normalization, which of the following is the most appropriate description of a table in the third normal form? Here, 2NF stands for the second normal form and 3NF stands for the third normal form.

There is a relation schema A = (P, Q, R, S, T, Y) with functional dependencies below:

  • •P → Q
  • •QR → S
  • •T → R
  • •S → P

Which of the following is the candidate keys of A?

A student’s ID, name, and class ID are recorded in the Student table. Which of the following is the SQL statement that returns records of all students whose names start with A?

Which of the following is an appropriate explanation of a log file in DBMS?

Which of the following is the appropriate explanation of attributes in the relational model?

When the functional dependencies shown below are satisfied, which of the following is the transitive functional dependency that holds? Here, “A→B” indicates that B is functionally dependent on A, and “A→{B, C}” indicates that “A→B” and “A→C” both hold.

[Functional dependencies]

{OrderCode, ProductCode} → {CustomerOrderQuantity, OrderAmount}

OrderCode → {OrderDate, CustomerCode, OrderManagerCode}

ProductCode → {ProductName, SupplierCode, ProductSalePrice}

SupplierCode → {SupplierName, SupplierAddress, SupplierManagerCode}

CustomerCode → {CustomerName, CustomerAddress}

Which of the following is an appropriate description of distributed database?

Which of the following is the clause that is inserted into blank A of the SQL statement in order to display the names of employees who work in the same department as any employee located in "New York"?

Employees (employee_id, employee_name, salary, department_id)
Departments (department_id, department_name, location)

[SQL command]
SELECT employee_name FROM Employees WHERE A

In the context of transaction management, which of the following is a condition that the Isolation property ensures?

Of the functions provided by a DBMS, which of the following is a means for achieving protection for data confidentiality?

Which of the following is the primary goal of conceptual database design?

In the UML data model shown in the figure below, which of the following is a multiplicity that should be inserted in blanks I and II?

[Conditions]

(1)One or more employees belong to a department.(2)An employee belongs to any one department.(3)The history of the departments to which an employee has belonged is recorded as the assignment history.
DepartmentAssignment historyEmployeeIII11Department codeDepartment nameStart dateEnd dateEmployee codeName
OptionIII

Which of the following is the clause that should be inserted into blank A of the SQL statement below in order to display the total sales data for each product that sold for at least $5,000 from the table OrderDetails?

OrderDetails (OrderID, ProductID, UnitPrice, Quantity)

[SQL statement]
SELECT ProductID, SUM(UnitPrice * Quantity)
FROM OrderDetails
A

Which of the following is an appropriate explanation of the granularity of locks?

Which of the following is a database design that consists of multiple tables with rows and columns that are linked together through matching data stored in each table?

Which of the following is an appropriate ER diagram after considering the conditions below?

-An employee is associated with 1 program and a program is associated with at least one employee-A program belongs to 1 college and a college has one or many programs

An employee works for a department, which can be located in multiple regions. Three tables EMP, DEPT, and DEPT_LOCS are created as shown below for recording the employee, department, and department location data, respectively.

EMP

EIDEnameDNOSalary
11John Bate120000
12Mohammed Karim240000
13Sadat Hossain150000
14Katherine Li320000
15Shuvashish Bose340000

DEPT

DNODnameManagerID
1Admin11
2Accounts13
3Research15

DEPT_LOCS

DNORegion
1L1
1L3
2L2
3L3
3L2

What is the output of the SQL shown below?

SELECT EName, Salary
FROM EMP
WHERE DNO IN (( SELECT DNO
FROM DEPT)
MINUS
(SELECT DNO
FROM DEPT_LOCS
WHERE Region=’L2’)
))

If a transaction processing program ends abnormally while updating the database, the database is recovered by a rollback process. In these circumstances, which of the following is the information that is used?

Which of the following is a property on a database that guarantees a result where a transaction either fully completes update processing or is revoked as if no processing took place at all?

Which of the following is a critical step in creating a relational database?

Which of the following is the appropriate interpretation of the E-R model shown below?

DepartmentEmployeeDependent

From the figure below, which of the following is an appropriate set of attributes for the “CatalogProduct” class table?

CatalogCatalogIDSeasonYearDescriptionEffectiveDateEndDateCatalogProductPriceSpecialPriceProductItemProductIDVendorGenderDescription⋮10..*0..*1

Which of the following is a clause that is inserted into blank A of the SQL statement below that calculates the average scores for each class and subject from the “MidtermTest” table and displays them in ascending order of class and subject?

MidtermTest (Class, Subject, StudentNumber, Name, Score)

[SQL statement]
SELECT Class, Subject, AVG(Score) AS AverageScore
FROM MidtermTest
A

Which of the following can change the deadlock state of the transaction back to the normal state?

In a DBMS, which of the following is a function that decides the schema?

Which of the following is an appropriate method used to remove data redundancy in relational database systems?

Which of the following is the most appropriate description concerning the primary role of an SQL query optimizer?

From a “Score” table, the average score for all subjects is to be calculated for each student, and the student number and average score for students with an average score of 80 or higher are to be determined. Which of the following is the appropriate term or phrase to be entered in blank A? Here, a solid underline represents a primary key.

Score (StudentNumber, Subject, Score)

[SQL statement]
SELECT StudentNumber, AVG(Score)
FROM Score
GROUP BY A

Which of the following is a file in which values before and after an update of the database are written and saved as the update history of the database?

Which of the following is a method that restores the system to its initial state and restarts it when a system failure occurs, that does not accompany preprocessing of a copy before/after an update, and that is also called initial program load?

Which of the following is an appropriate explanation of a relational database?

Which of the following is the key of a relation schema R = (M, N, O, P, S, T), when R has the functional dependencies shown below?

O → T

S → M

OS → P

M → N

Which of the following is an appropriate description of keys in a relational database?

Which of the following is the appropriate interpretation of the conceptual data model shown in the diagram in UML?

DepartmentEmployeeBelongs to1..*0..*

An employees table contains fields in the order shown below.

  • •emp_id is an integer value and is used as the primary key of the table.
  • •emp_name can store up to 10 characters.
  • •salary is a decimal value up to 4 digits.

Which of the following is an appropriate INSERT statement to insert the data to the table? Here, NOT NULL constraint does not exist and the table does not have any records before the insert.

Which of the following is the purpose of setting an index in the columns of the table of a relational database by a user?

In a relational database, which of the following is an appropriate purpose for defining a foreign key?

In the process of table implementation, which of the following is an appropriate SQL statement that removes a column in an existing table?

Which of the following is the purpose of setting an index in the columns of the table of a relational database?

In a company, the received-orders are monitored monthly based on the customer file, product file, person-in-charge file, and the current month’s received-orders file. When the items of each file are as shown in the table below, which of the following can be retrieved for the received orders of current month and the three (3) previous months using the four (4) files?

FileItemsRemarks
CustomerCustomer code, name, person-in-charge code, amount of orders received in the previous month, amount of orders received two (2) months ago, amount of orders received three (3) months agoThere is one (1) person in charge of each customer
ProductProduct code, name, amount of orders received in the previous month, amount of orders received two (2) months ago, amount of orders received three (3) months ago————
Person-in-chargePerson-in-charge code, name of the person————
Current month’s received ordersCustomer code, product code, amount of orders receivedTotal amount of orders received in the current month

When an ER diagram is translated into a set of tables in a relational database, which of the following is an appropriate method to translate a many-to-many relationship between two entities?

The tables “Flight” and “City” are created as shown below. Which of the following is the SQL to output the flight code, its origin city name, and its destination city name from those tables?

Flight: (FlightCode, OriginCityID, DestinationCityID)
City: (CityID, CityName)

For the description of the lock granularity of an RDBMS below, which of the following is an appropriate combination of A and B?

Each pair of transactions that are processed in parallel updates multiple rows in a single table. When a row-level lock and a table-level lock are compared, lock contention is more likely to occur when an A -level lock is used. More RDBMS memory area is required when a B -level lock is used in order to manage the lock while transactions are being processed.

OptionAB

When a storage location is calculated from a key value, which of the following is the method that can produce the same calculation results from different key values?

Which of the following is an appropriate explanation of a relational database?

Which of the following is performed periodically to prevent a decline in the access efficiency of a database?

Among the search processes for the “Sales” table, which of the following is appropriate to set a hash index rather than a B+ tree index? Here, the column in which the index is set is shown inside <>.

Sales (form number, sales date, product name, user ID, store number, sales amount)

Which of the following is the appropriate explanation of the key value store that is used in the processing of big data?

When the relationships between continent and country, and between country and city are shown in the class diagram below, which of the following is an appropriate combination of multiplicities that are to be inserted into blank A through blank D? Here, there are no cross continental countries. Each continent has at least one country, and each country has at least one city.

ContinentCountryCityABCD
OptionABCD