Technology 04
Technology 04
When ordering data is entered in the format shown below, which of the following is
appropriate to check whether the order date is on a business day that is the same as or prior
to the entering date?
Ordering data
Form number Order date Product code Quantity Customer code
(Characters) (Characters) (Characters) (Number) (Characters)
[SQL statement]
SELECT Class, Subject, AVG(Score) AS AverageScore
FROM MidtermTest
A
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.
A
aa)) ro row
b)
b) ro table
cc)) tabl row
d) tabl table
A B C D
a) 1..1 1..* 1..* 1..1
b) 1..1 1..* 1..1 1..*
c) 1..1 0..* 0..* 1..1
d) 1..1 0..* 1..1 0..*
Course Section
cid title credits cid secid semester year
CSE101 Discrete Mathematics 3 CSE101 1 Spring 2018
CSE102 Computer Prog. I 3 CSE101 1 Spring 2019
CSE103 Computer Prog. II 3 CSE101 2 Fall 2019
EEE101 Electrical Circuits I 4 CSE102 1 Fall 2018
EEE102 Electrical Circuits II 4 CSE102 2 Fall 2018
CSE103 1 Spring 2019
CSE103 2 Fall 2019
EEE101 1 Spring 2019
EEE102 1 Spring 2019
EEE102 1 Fall 2019
When the SQL shown below is executed, which of the following tables is obtained as the
output?
SELECT C.title
FROM Course C
WHERE 1 = (SELECT COUNT(cid)
FROM Section S
WHERE C.cid = S.cid AND S.year = 2019);
a) b) c) d)
Title title title title
Computer Prog. II Discrete Mathematics
Null Electrical Circuits I
Electrical Circuits I Computer Prog. I
Electrical Circuits II Electrical Circuits I
Electrical Circuits II
a) A relationship is expressed by describing the related entity name in the entity type.
b) The relationship between entity types is expressed by an arrow from the referencing side
in the direction of the referenced side.
c) There are no attributes in the entity type, but the relationship type has attributes.
d) There are several kinds of relationships between entity types such as one-to-many or
many-to-many.
a) To ensure that either all the updates corresponding to a given transaction are made or
none of them are made
b) To ensure that only authorized users can access the database
c) To help users update data by providing a graphical user interface
d) To provide an accessible catalog in which descriptions of data items are stored
a) Data is represented as a table, and the tables are linked to one another using the column
values of these tables.
b) Each attribute is represented as a pair of the attribute value and the storage location of
the record having that value and used as an index.
c) The relationship among records is represented by a data structure using links that can
represent both tree and network structures.
d) The relationship among records is represented by a data structure using pointers that are
limited to representing a tree structure.
Sales (form number, sales date, product name, user ID, store number, sales amount)
a) Searching for sales with a sales amount of 100 dollars or more. <sales amount>
b) Searching for sales with the product name beginning with ‘DB’. <product name>
c) Searching for sales with the sales date as the current month. <sales date>
d) Searching for sales with the user ID as ‘1001’. <user ID>
a) It is represented by a two-dimensional table with rows and columns based on the set
theory.
b) It represents the relationship among nodes with the three (3) elements, i.e., “node,”
“relationship,” and “property.”
c) It saves the desired data together with a value that enables this data to be uniquely
identified as a pair.
d) The data for one (1) case is called a “document,” and the data structure of each
document is unrestricted and can be changed whenever data is added.
A→B
A→C
CP→Q
CP→T
a) A b) A, B c) A, P d) C, P
[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.
I II
a) 0..* 0..*
b) 0..* 1..*
c) 1..* 0..*
d) 1..* 1..*
a) When a large number of transactions update the same data, and the granularity is set as
large, the number of transactions that can be simultaneously executed increases.
b) When all data in a table are referenced, and the granularity is set as large, data
referenced from other transactions can be undisturbed.
c) When data are updated, and the granularity is set as large, the waiting times of other
transactions increase, and the total throughput declines.
d) When the granularity is set as large, the number of included data increases, and the
number of locks that one transaction makes increases.
← ( )
← − ( × )−
Here, “ ”, “×”, and “ −” represent projection, direct product, and difference, respectively.
When the relational states of R and S are as follows, which of the following can be obtained
as T?
R S
X Y X
1 A 1
2 A 2
2 B
a) T b) T
Y Y
NULL A
c) T d) T
Y Y
B A
B
a) ENAME b) ENAME
NULL Rahbar
Karthik
c) ENAME d) ENAME
Karthik Rahbar
Abir Abir
Order data
Slip No. Order date Product code Quantity Customer code
(characters) (characters) (characters) (number) (characters)
a) To prevent fragmentation in the record storage area due to the repeated deletion and
insertion of records
b) To provide a constraint to maintain referential consistency between the records of related
tables
c) To restore as many records as possible when they are damaged by failure, based on the
mutual relationship between tables
d) To speed up the searching and updating of related tables by storing them closer together
Product
ProductNumber ProductName UnitPrice
Inventory
WarehouseNumber ProductNumber InventoryQuantity
a) For a resource on which a shared lock is acquired, the acquisition of a new shared lock
by another transaction is permitted.
b) For a resource on which a shared lock is acquired, the acquisition of a new exclusive
lock by another transaction is permitted.
c) For a resource on which an exclusive lock is acquired, the acquisition of a new shared
lock by another transaction is permitted.
d) For a resource on which an exclusive lock is acquired, the acquisition of a new exclusive
lock by another transaction is permitted.
a) b) Ename Salary
Ename Salary John Bate 20000
NULL NULL Sadat Hossain 50000
a) Atomicity b) Consistency
c) Durability d) Isolation
a b f
c g
d h
e i
j
Account AccountingTransaction
2.. * *
AccountCode TransactionNumber
AccountTitle DateOfPosting
Transfer
Description
Amount
Constraint:
The total “Debit” amount of
one (1) accounting
Debit Credit transaction must match the
total “Credit” amount.
Account Transfer
Account Account Transaction
Code AccountTitle Code Debit/Credit Amount Number
208 Sales A B 500 0122
510 Cash 208 Credit 500 0122
511 Deposits 510 Credit 500 0124
812 Travel expenses 812 Debit 500 0124
AccountingTransaction
TransactionNumber DateOfPosting Description
0122 2017-04-04 Company X
0124 2017-04-04 Company X
A B
a) 208 Credit
b) 208 Debit
c) 510 Credit
d) 510 Debit
X
StudentNumber Name FacultyCode
1 Amy White A
2 Bob Green B
3 Cathy Black A
4 David Grey B
5 Edward Brown A
6 Frank Blue A
Y
FacultyCode FacultyName
A Engineering
B Information
C Literature
Z
FacultyName StudentNumber Name
Information 2 Bob Green
Information 4 David Grey
Ordering data
Form number Order date Product code Quantity Customer code
(Characters) (Characters) (Characters) (Numbers) (Characters)
a) Atomicity b) Consistency
c) Durability d) Isolation
Delivery
Delivery_ Department_ Department_ Delivery_ Component_ Quantity
date ID name destination ID
2016-08-21 300 Production Chicago 1342 300
department 2 office
2016-08-21 300 Production Chicago 1342 300
department 2 office
2016-08-25 400 Production Boston 2346 300
department 1 factory
2016-08-25 400 Production Boston 2346 1,000
department 1 factory
2016-08-30 500 Research and Boston 2346 30
development factory
department
2016-08-30 500 Research and New York 1342 30
development office
department
a) Delivery_date → Component_ID
b) Delivery_destination → Component_ID
c) Department_ID → Component_ID
d) Department_name → Delivery_destination
a) All rows in the tables are re-ordered according to the values in the column to be joined,
and they are joined in order from the top.
b) If a column to be joined in one of the tables is included in the index, the column to be
joined in the other table and the index value are used to join the tables.
c) The values in a column to be joined in one of the tables are extracted in order, and they
are joined with the column to be joined from the other table.
d) The values in a column to be joined in one of the tables are used to create a hash table,
and this is joined with the column to be joined from the other table.
Employee Department
Employee_number Department Department_name Floor
11001 Administration Planning 1
11002 Accounting Administration 1
11003 Sales Information systems 2
11004 Sales Sales 3
11005 Information systems Accounting 2
11006 Sales Legal affairs 2
11007 Planning Procurement 2
12001 Sales
12002 Information systems
a) 1 b) 2 c) 3 d) 4
[Functional dependency]
(1) OrderNumber, → OrderDate
(2) OrderNumber, → CustomerNumber
(3) CustomerNumber → CustomerName
(4) {OrderNumber, ProductNumber} → Quantity
(5) {OrderNumber, ProductNumber} → UnitSalesPrice
(6) ProductNumber → ProductName
a) It is a collective term for database operations, such as insert, update, deletion, and
selection of data.
b) It is a collective term for various constraints for maintaining consistency of the database.
c) It is a set of data definitions, such as the nature of data, the format of data, and the
relation with other data.
d) It is not a real table, but a virtual table from the users’ viewpoint.
NP200 2015-10-10 3
FP233 2015-10-10 2
NP200 2015-10-11 1
FP233 2015-10-11 2
[Naming conventions]
(1) Always add a classification word such as the “name”, “code”, “number”, “amount”, or
“date” at the end of the data item name, and set the data type determined for each
classification word.
(2) Create a dictionary in which data item names and their meanings are registered, and
ensure that synonyms and homonyms do not occur.
a) Both the date type and the character string exist together as the data type of the data
item “ReceiptDate”.
b) It cannot be determined whether the data item “Customer” is the “CustomerCode” or
“CustomerName”.
c) The scope of the possible values of the data item “OrderAmount” varies according to
the table.
d) There is a data item called “AwardAmount” that has the same meaning as the data item
“BonusAmount”.
Account AccountingTransaction
2..* *
AccountCode TransactionNumber
AccountTitle DateOfPosting
Description
Transfer
Amount
Constraint:
The total “Debit” amount of
one (1) accounting transaction
must match the total “Credit”
Debit Credit amount.
Company
208 Sales A B 500 0122 0122 2015-04-04
A
Company
510 Cash 208 Credit 500 0122 0124 2015-04-04
A
Travel
812 812 Debit 500 0124
expenses
A B
a) 208 Credit
b) 208 Debit
c) 510 Credit
d) 510 Debit
on Product.ProductID = Sales.ProductID
GROUP BY B ;
(A) (B)
a) INNER JOIN Amount
b) INNER JOIN Product.PName
c) LEFT JOIN Amount
d) LEFT JOIN Product.PName
a) To avoid making any impact on an application program even if the physical storage
structure of data is changed
b) To derive a new table from a source table through a relational operation as if the new
table actually existed
c) To restrict programming languages such that the application program and DBMS are
linked closely
d) To use an interactively used SQL statement from an application program as well
Mr. A
1456
Ms. B
4568
Ms. C
3246
Mr. D
A..B C..D
Customer Car
A B C D
a) 0 1 0 1
b) 1 1 0 1
c) 0 1 0 *
d) 1 1 0 *
A→ BC
CD→ E
B → D
E → A
Which of the following is a combination of two candidate keys for R?
a) To ensure that either all the updates corresponding to a given transaction are made or
none of them is made
b) To ensure that only authorized users can access the database
c) To help users update data by providing a graphical user interface
d) To provide an accessible catalog in which descriptions of data items are stored
a) It consists of two or more data files located at different sites on a computer network.
b) It presents information in two-dimensional tables with rows and columns.
c) Its records are organized into a tree structure.
d) Its records can have multiple parent records and multiple child records.
A B C D
a) 1..1 1..* 1..* 1..1
b) 1..1 1..* 1..1 1..*
c) 1..1 0..* 0..* 1..1
d) 1..1 0..* 1..1 0..*
a b f
c g
d h
e i
j
a) From two or more sets of tables, the sets that match conditions are combined together to
create a new table.
b) Only specific columns are extracted from a table.
c) The query result of a table and the query result of another table are combined together
and set in one table.
d) The rows that match specific conditions are extracted from a table.
Product
ProductNumber ProductName UnitPrice
Inventory
WarehouseNumber ProductNumber InventortQuantity
a b c d e f g h
a) a h b c a b c d e f g
b) a h b c a b d e f g
c) a h b c e f a b d e g
d) a b c d e f g h
A B
Employee_ID Project_ID Project_ID
S1 P1 P2
S1 P2 P4
S1 P3
S1 P4
S2 P1
S2 P2
S3 P2
S4 P2
S4 P4
a) Employee_ID b) Employee_ID
S1 S1
S2 S4
c) Employee_ID d) Employee_ID
S1 S3
S2 S4
S3
S4
Product
Product_code Product_name Unit_price
A010 AAA 2,500
B020 BBB 1,000
C030 CCC 4,500
[SQL statement]
DELETE FROM Product WHERE Product_code = 'B020'
R
A1 A2 A3 A4 A5
[SQL statement]
SELECT A1, A3, A5 FROM R
a) Difference b) Join
c) Projection d) Selection
[Conditions]
1. There are two relational database tables “Product” and “Sales” as shown below.
1..1 0..*
Product Sales
2. There are 2,000 rows in the “Product” table and 100,000 rows in the “Sales” table.
a) B A C b) B C A
c) C A B d) C B A
SMARK
ID Name Marks Status
0014 Jack Smith 80 Pass
0016 Mary White 75 Pass
0057 Tom Scott 90 Pass
0058 Jimmy Brown 52 Fail
0076 Susan Jackson 59 Fail
0100 Bob Miller 92 Pass
a) ID b) ID
0014 0014
0016 0016
0057 0057
0076
0100
c) ID d) ID
0014 0058
0016 0076
0057
0100
Table_1 Table_2
Student_ID Student_Name Class Student_ID Student_Name Class
Table_3
Student_ID Student_Name Class
a) To prevent fragmentation of the record storage area because of the repeated deletion
and addition of records
b) To provide a constraint to maintain referential consistency between the records of
related tables
c) To restore as many records as possible that are damaged by a failure, based on the
mutual relationship between tables
d) To speed up the searching and updating of related tables by storing them closer
together
Sales_record
Number Name 1Q 2Q 3Q 4Q
…
a) SELECT Name FROM Sales_record
WHERE (1Q+ 2Q+ 3Q+ 4Q)/4 >= 400 OR
1Q >= 300 OR 2Q >= 300 OR
3Q >= 300 OR 4Q >= 300
b) SELECT Name FROM Sales_record
WHERE (1Q+ 2Q+ 3Q+ 4Q) >= 400 AND
1Q >= 300 AND 2Q >= 300 AND
3Q >= 300 AND 4Q >= 300
c) SELECT Name FROM Sales_record
WHERE 1Q > 400 OR 2Q > 400 OR
3Q >= 400 OR 4Q >= 400 AND
1Q >= 300 OR 2Q >= 300 OR
3Q >= 300 OR 4Q >= 300
d) SELECT Name FROM Sales_record
WHERE (1Q+ 2Q+ 3Q+ 4Q) >= 1600 AND
1Q >= 300 AND 2Q >= 300 AND
3Q >= 300 AND 4Q >= 300
Product Warehouse
0..* 0..*
- product_name - storage_name
- product_number - storage_location
- unit_price
StockHolding
- quantity
If the class diagram shown below is depicted using a full class instead of the
association class, which of the following is the appropriate combination of cardinalities
that are inserted into blanks A through D?
A B C D
a) 0..*
. 1 0..* 1
b) 0..*
. 1 1 0..*
c) 1 0..* 0..*
. 1
d) 1 0.. 1 0..*
Staff
StaffID Salary BranchID
S01 2000 B01
S02 4000 B01
S03 3000 B03
S04 8000 B03
S05 3000 B03
S06 4000 B07
S07 6000 B08
Order data
Slip number Order date Product code Quantity Customer code
(characters) (characters) (characters) (numeric value) (characters)
Product
Produ
Product_code _name Model Sales_price Purchase_price
S001 T T2003 150,000
150,000 100,000
S003 S S2003 200 170,000
S005 R R2003 140,000
14 80,000
[View definition]
CREATE VIEW Profitable_product
AS SELECT * FROM Product
WHERE Sales_price - Purchase_price >= 40000
A B
StudentID AbsenceDate StudentID
… … …
S01 2012-04-10 S10
S10 2012-04-10 S12
S11 2012-04-10 …
S10 2012-04-11
S12 2012-04-11
S12 2012-04-12
… …
a) A technique for accessing and searching a large amount of data in parallel at very high
speed
b) A technique for accumulating and storing a large amount of time-series data such as
sales performance and manufacturing performance
c) A technique for analyzing a large amount of data statistically and mathematically to
discover patterns or rules
d) A technique for creating separate databases for each department in accordance with
the intended use
1 *
Subject Book
1 *
* 1
Author Editor
a)
b)
c)
d)
a) (CID, MID)
b) (CID, VID, RDate)
c) (VID, RDate)
d) (VID, SID)
a) Independence b) Integrity
c) Interactivity d) Isolation
Product
Product_number Product_name Supplier_number Unit_price
S001 A XX0001 180
S002 A YY0002 200
S003 B YY0002 350
S004 C ZZ0003 400
S005 C XX0001 380
T1 T2
U V X Y Z
aa 1 3 4 7
bb 2 2 5 8
cc 3 1 6 b
a) U V X Y Z
aa 1 3 4 7
b) U V X Y Z
aa 1 3 4 7
bb 2 3 4 7
c) U V X Y Z
aa 1 3 4 7
bb 2 2 5 8
cc 3 1 6 b
d) U V X Y Z
aa 1 3 4 7
aa 1 2 5 8
bb 2 3 4 7
[Functions of privileges]
- Read privilege:Records on the user database can be read.
- Update privilege:Records on the user database can be registered, updated, and
deleted.
- Administrator privilege: Tables on the user database can be read, registered,
updated, and deleted.
a) A set of relations or tables is in 3NF if all the key attributes are defined and it
contains no repeating groups.
b) A set of relations or tables is in 3NF if and only if it contains no repeating groups
and every non-key attribute is fully functionally dependent on the entire primary
key.
c) A set of relations or tables is in 3NF if and only if it is in 2NF and every non-key
attribute is mutually independent and directly dependent on the entire primary key.
d) A set of relations or tables is in 3NF if and only if it is in Boyce-Codd normal form
and contains no more than one multi-valued dependency.
T1 T2
Order Product Product
Customer name Product name
number number number
00
001 Brian Williams A-01 A-
A-01 Radio
002
00 Jake Forester A-02 A-02
A- TV set
00
003 Sylvia Fox A-02 A-
A-03 CD player
a) b)
Product name Product name
Radio Radio
TV set TV set
CD player
c) d)
Product name Product name
Radio Radio
TV set TV set
TV set TV set
CD player
a) A differential backup contains all files changed after the last full backup, while an
incremental backup saves all files changed after the last full, differential, or
incremental backup.
b) A differential backup may take longer to restore files than an incremental backup,
because the most recent versions of files are spread across a larger number of
backup sets.
c) A multiplexed backup is used as a mixed combination of a full backup, a differential
backup, and an incremental backup.
d) An incremental backup tends to take longer to get backup files than a differential
backup, because more files are copied during each backup.
Part_name
a) Parts table
Part_name Color Cost Supplier_name Supplier_address Supplier_phone
b) Parts table
Part_name Color Cost
Supplier table
Supplier_name Supplier_address Supplier_phone
c) Parts table
Part_name Color Cost Supplier_name
Supplier table
Supplier_name Supplier_address Supplier_phone
d) Parts table
Part_name Color Cost
Supplier table
Part_name Supplier_name Supplier_address Supplier_phone
Employee 10
How many records are returned after execution of the SQL statement below?
T1 T2 T3 T4 T5
X(A) X(A) X(B) S(B) X(C)
R(A) R(A) R(B) S(A) X(A)
W(A) W(A) W(B) R(A) R(A)
Commit X(B) S(C) R(B) R(C)
R(B) R(C) Commit W(C)
W(B) W(C) W(A)
Commit Commit Commit
Symbol Operation
X(#) Exclusive lock
S(#) Shared lock
R(#) Read
W(#) Write
Commit End transaction
# Resource name
a) The “redo journal” is used to restore the data to the status immediately before the
failure after the start of the transaction.
b) The “redo journal” is used to restore the data to the status immediately before the
start of the transaction.
c) The “undo journal” is used to restore the data to the status immediately before the
failure after the start of the transaction.
d) The “undo journal” is used to restore the data to the status immediately before the
start of the transaction.
Country
Name Continent
Canada North America
Malaysia Asia
Malawi Africa
Brazil South America
Germany Europe
China Asia
a) A failure at a single site makes the whole system unavailable to all users.
b) Acquisition and maintenance costs of the entire system are lower because of
distributed nature.
c) Expansion of the system, such as adding more data, increasing database sizes, and
adding more processors, is much more difficult.
d) Local queries and transactions accessing data at a single site have better
performance because of the smaller local databases.
a) It is a set of data definitions, such as the data attributes, data formats, and
relationships with other data.
b) It is not an actual table, but instead a virtual table from the viewpoint of the user.
c) It is the umbrella term for database operations, such as the insert, update, delete, and
search operations for data.
d) It is the umbrella term for various constraints that maintain database consistency.
a b f
c g
h
d
a) Table 1{ a } b) Table 1{ a, b, c, d, e }
Table 2{ b, c, d, e } Table 2{ a, c }
Table 3{ f, g, h } Table 3{ b, e, f, g, h }
b) Table 1{ a, b, c, d, e } d) Table 1{ a, b, c, d, e }
Table 2{ b, c, f, g, h } Table 2{ b, f, g }
Table 3{ b, c, h } Table 3{ b, c, h }
X Y
VAL VAL
1 1
2 2
3 3
a) SELECT * FROM X, Y
b) SELECT * FROM X, Y WHERE X.VAL > Y.VAL
c) SELECT * FROM X
UNION
SELECT * FROM Y
d) SELECT * FROM X X1, X X2 WHERE X1.VAL = X2.VAL
Payment
Contract number Contract date Amount
1001 2009-01-10 1,000
1003 2009-01-15 890
1003 2009-02-10 80
a) Instructor ÷ Student
b) Instructor Student
c) Instructor – Student
d) Instructor Student
a) D SUM(B) b) D SUM(B)
1 70 1 30
2 30 2 30
4 40
c) D SUM(B) d) D SUM(B)
1 10 1 10
2 20 1 20
5 0 2 30
6 0 4 40
a) At the restart known as “cold start,” the checkpoint log and update information log
are used for recovering the database.
b) At the restart known as “warm start,” control goes back to the checkpoint, and the
update information log is used for recovering the database.
c) “Roll back” refers to the operation of reflecting the transactions that completed
normally after the checkpoint, by checking the update information log.
d) “Roll forward” refers to the operation of returning incomplete transactions at the
occurrence of a failure to the status before update.
a) To allocate available development staff and resources in an optimal way for the
system development using databases, and then manage them so that the system can
be developed in an efficient way
b) To conduct user interviews and create applications based on the external schema of
the provided database
c) To design and maintain databases, monitor their operations, and recover from
failures
d) To perform acceptance inspections to determine whether or not applications satisfy
the functions, performance, operability, and other specifications required by users
[Processes] Server
Browser 1 1. Read the access counter and
add 1.
3.. rite the result of Process 1
into the access counter.
Internet
[Processes] Access
counter
2. Read the access counter and
add 1.
Browser 2 4.. rite the result of Process 2
into the access counter.
a) 100
00 b) 101
01 c) 102
02 d) 104
a) Only specified attributes are extracted from tables, and a new table is created.
b) The tuples in two tables that meet the relevant conditions are combined, and a new
table is created.
c) Tuples that commonly exist in two tables are extracted, and a new table is created.
d) Tuples that meet given conditions are selected from tables, and a new table is created.
movie
mID mName mTypeID mDirector mCompany
M01 Beowulf 01 Robert Zemeckis Paramount Pictures
M02 Enchanted 02 Kevin Lima Walt Disney Pictures
M03 This Christmas 03 Preston A. Whitmore II Sony Pictures
M04 Hitman 01 Xavier Gens 20th Century Fox
movietype
mTypeID mTypeCode mTypeName
01 AC Action
02 AD Adventure
03 CO Comedy
UPDATE cust_orders
SET id = 200
WHERE id = 1
UPDATE cust_orders
SET id = 300
WHERE id = 1
User B informs you that his/her UPDATE statement seems to be hung. Which of the
following is a possible solution that you can find?
score_ table
student_number subject_code score examination_date
1221 A01 70 2007-05-03
1201 A01 60 2007-05-03
1231 A02 90 2007-05-03
1201 B01 85 2007-05-04
1231 B01 80 2007-05-04
1231 B02 75 2007-05-03
1221 B02 60 2007-05-04
a) Both the old and new values of the updated item are stored in the log.
b) Neither the old nor new value is stored in the log.
c) The new value of the updated item is stored in the log.
d) The old value of the updated item is stored in the log.
T1 T2
A B C B C D
a1 b1 c1 b1 c1 d1
a2 b1 c1 b1 c2 d2
a3 b2 c1 b2 c2 d3
a)
A B C D
a1 b1 c1 d1
b)
A B C D
a1 b1 c1 d1
a2 b1 c1 d1
c)
A B C B C D
a1 b1 c1 b1 c1 d1
a2 b1 c1 b1 c1 d1
d)
A B C D
a1 b1 c1 d1
a2 b1 c1 d2
a3 b2 c1 d3
[Log records]
<T1 , start>
<T1 , A, 1000, 900>
<T1 , B, 2000, 2100>
<T1 , commit>
<T2 , start>
<T2 , C, 3000, 3500>
<T2 , commit>
Persons Table
name age gender country
Honey 23 F Korea
Jun 24 M Japan
Mark 22 M Korea
Rey 27 M Philippines
Rob 26 M Philippines
Sakura 27 F Japan
Table A
name
Honey
Rob
1 1 1 1
A Teacher Class Classroom
1 * * 1
B Teacher Class Classroom
a) It is a set of data definitions such as the data properties, format, relationship with
other data, etc.
b) It is not an actual table but a virtual table from the perspective of the user.
c) It is the general term for database operations such as data insertion, updating,
deletion, search, etc.
d) It is the general term for various conditions and constraints that are used to maintain
the database in absolutely perfect condition.
Employees
Emp_ID Emp_name Salary Manager_ID DID
10 Amit 50000 18 3
11 Vikrom 75000 16 2
12 Nishi 40000 18 3
13 Niloy 60000 17 1
14 Pritom 80000 18 3
15 Mohitlal 45000 18 3
16 Rahman 90000 null 1
17 Roxy 55000 16 2
18 Santosh 65000 17 1
When a query is formulated in SQL to retrieve the manager ID and the average salary of the
employees under his/her direct report, and the output is obtained as below, which of the
following is the appropriate combination to be inserted in blanks E and F in the SQL
statement?
E F
a) a.DID b.DID
b) a.Emp_ID b.Emp_ID
c) a.Manager_ID b.Manager_ID
d) b.Emp_ID a.Manager_ID
a) 1 b) 5 c) 8 d) 9