SQL/ Transactions / Data Integrity

Description

SQL/ Transactions / Data Integrity
Brandon Gagon
Quiz by Brandon Gagon, updated more than 1 year ago
Brandon Gagon
Created by Brandon Gagon about 7 years ago
45
0
1 2 3 4 5 (0)

Resource summary

Question 1

Question
Which of the following is a benefit of using a DBMS?
Answer
  • They provide full security to data using private/public key encryption
  • They create automatic backups
  • They help create an environment for end users to have access to more data
  • They provide seamless Internet access to database data

Question 2

Question
The hierarchical database model is based on a ____.
Answer
  • tree structure
  • lack of a parent segment
  • lack of a child segment
  • matrix

Question 3

Question
Because an RDBMS hides the system's complexity from the user/designer, ____.
Answer
  • it does not exhibit data independence
  • it does not exhibit structural independence
  • data management is easier
  • data management is very difficult

Question 4

Question
The ERD is used to graphically represent the ____ database model.
Answer
  • condensed
  • physical
  • logical
  • conceptual

Question 5

Question
The property of ____ enables an entity subtype to inherit the attributes and relationships of the supertype.
Answer
  • subtype discriminator
  • inheritance
  • specialization hierarchy
  • entity supertype

Question 6

Question
At the implementation level, the supertype and its subtype(s) depicted in the specialization hierarchy maintain a ____ relationship.
Answer
  • none
  • 1:1
  • 1:M
  • M:N

Question 7

Question
Which command would be used to delete the table row where the P_Code = '2238/QPD'?
Answer
  • DELETE FROM PRODUCT WHERE P_CODE = '2238/QPD';
  • REMOVE FROM PRODUCT WHERE P_CODE = '2238/QPD';
  • ERASE FROM PRODUCT WHERE P_CODE = '2238/QPD';
  • ROLLBACK FROM PRODUCT WHERE P_CODE = '2238/QPD';

Question 8

Question
Which command is used to select partial table contents?
Answer
  • SELECT <column(s)> FROM <Table name> WHERE <Item>;
  • LIST <column(s)> FROM <Table name> WHERE <Conditions>;
  • SELECT <column(s)> FROM <Table name> WHERE <Conditions>;
  • LIST<column(s)> FROM <Table name> WHERE <Item>;

Question 9

Question
Which query will output the table contents when the value of V_CODE is equal to 21344?
Answer
  • SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE FROM PRODUCT WHERE V_CODE <> 21344;
  • SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE FROM PRODUCT WHERE V_CODE <= 21344;
  • SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE FROM PRODUCT WHERE V_CODE = 21344;
  • SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE FROM PRODUCT WHERE V_CODE => 21344;

Question 10

Question
What is the command used to list the P_CODE, P_DESCRIPT, P_INDATE, and P_PRICE fields from the Product table in ascending order by P_PRICE?
Answer
  • SELECT P_CODE, P_DESCRIPT, P_INDATE, P_PRICE FROM PRODUCT SEQUENCE BY P_PRICE;
  • SELECT P_CODE, P_DESCRIPT, P_INDATE, P_PRICE FROM PRODUCT LIST BY P_PRICE;
  • SELECT P_CODE, P_DESCRIPT, P_INDATE, P_PRICE FROM PRODUCT ORDER BY P_PRICE;
  • SELECT P_CODE, P_DESCRIPT, P_INDATE, P_PRICE FROM PRODUCT ASCENDING BY P_PRICE;

Question 11

Question
The basic SQL aggregate function that gives the total of all values for a selected attribute in a given column is ____.
Answer
  • COUNT
  • MIN
  • MAX
  • SUM

Question 12

Question
____ is used to tally the number of specific "values" of an attribute.
Answer
  • SUM
  • TOTAL
  • COUNT
  • ADD

Question 13

Question
UPDATE tablename ***** [WHERE conditionlist]; What command replaces the ***** in the above statement?
Answer
  • SET columnname = expression
  • columnname = expression
  • expression = columnname
  • LET columnname = expression

Question 14

Question
When using a(n) ____ join, only rows that meet the given criteria are returned.
Answer
  • full
  • inner
  • outer
  • set

Question 15

Question
What is the syntax for a left outer join?
Answer
  • SELECT column-list FROM table1 OUTER JOIN table2 LEFT WHERE join-condition
  • SELECT column-list FROM table1 LEFT [OUTER] JOIN table2 ON join-condition
  • SELECT column-list WHERE LEFT table1 = table 2
  • SELECT column-list FROM table1 LEFT table2 [JOIN] WHERE join-condition

Question 16

Question
In subquery terminology, the first query in the SQL statement is known as the ____ query.
Answer
  • outer
  • left
  • inner
  • base

Question 17

Question
In a subquery, which query is executed first?
Answer
  • leftmost
  • rightmost
  • innermost
  • outermost

Question 18

Question
Creating the conceptual design, selecting DBMS software, creating the logical design, and creating the physical design are part of the ____ phase.
Answer
  • database initial study
  • database design
  • implementation and loading
  • testing and evaluation

Question 19

Question
Which of the conceptual design steps defines entities, attributes, and relationships?
Answer
  • Database analysis and requirements
  • Entity relationship modeling and normalization
  • Data model verification
  • Distributed database design

Question 20

Question
What is the primary objective of database design?
Answer
  • To create the most efficient database possible
  • To create complete, normalized, nonredundant, and fully integrated conceptual, logical, and physical database models
  • To create the fastest queries
  • To be able to add data quickly

Question 21

Question
The most common algorithms for concurrency control are locks, ____ stamping, and optimistic methods.
Answer
  • date
  • time
  • hour
  • minute

Question 22

Question
____ requires that all operations of a transaction be completed.
Answer
  • Specificity
  • Atomicity
  • Durability
  • Time Stamping

Question 23

Question
The ____ establishes the order in which the operations within concurrent transactions are executed.
Answer
  • transaction log
  • timer
  • lock manager
  • scheduler

Question 24

Question
When is the implicit beginning of a transaction?
Answer
  • When the database is started
  • When a table is accessed for the first time
  • When the first SQL statement is encountered
  • When the COMMIT command is issued

Question 25

Question
A(n) ____ phase in a two-phase lock is when a transaction releases all locks and cannot obtain any new lock.
Answer
  • growing
  • shrinking
  • locking
  • unlocking

Question 26

Question
What is a consistent database?
Answer
  • One in which all tables have foreign keys
  • One in which all data integrity constraints are satisfied
  • One in which all tables are normalized
  • One in which all SQL statements only update one table at a time

Question 27

Question
A transaction acquires a ____ prior to data access.
Answer
  • grain
  • timestamp
  • lock
  • key

Question 28

Question
Changes are permanently applied to the database during the ____ phase of a transaction.
Answer
  • commit
  • write
  • input
  • output

Question 29

Question
The phenomenon of ____ occurs when two transactions, T1 and T2, are executed concurrently and the first transaction (T1) is rolled back after the second transaction (T2) has already accessed the uncommitted data—thus violating the isolation property of transactions.
Answer
  • lost updates
  • uncommitted data
  • transaction failure
  • inconsistent retrieval

Question 30

Question
____ occur when a transaction calculates some summary (aggregate) functions over a set of data while other transactions are updating the data.
Answer
  • lost updates
  • uncommitted data
  • transaction failures
  • inconsistent retrievals

Question 31

Question
The scheduler facilitates data ____ to ensure that two transactions do not update the same data element at the same time.
Answer
  • durability
  • isolation
  • atomicity
  • serializability

Question 32

Question
Which is not a DML statement?
Answer
  • CREATE TABLE
  • SELECT
  • INSERT
  • DELETE

Question 33

Question
What feature is a DDBMS disadvantage?
Answer
  • Data is located near the "greatest demand" site
  • Growth facilitation
  • Reduced operating cost
  • lack of standards

Question 34

Question
What feature is a DDBMS advantage?
Answer
  • Greater difficulty in managing the data environment
  • Less danger of a single-point failure
  • Increased training cost
  • Complexity of management and control

Question 35

Question
____ distributed database systems integrate different types of centralized DBMSs over a network.
Answer
  • Homogeneous
  • Heterogeneous
  • Fully homogeneous
  • Fully heterogeneous

Question 36

Question
____ transparency allows a transaction to update data at several network sites.
Answer
  • Transaction
  • Distribution
  • Failure
  • Performance

Question 37

Question
____ transparency ensures that the system will continue to operate in the event of a node failure.
Answer
  • Transaction
  • Distribution
  • Failure
  • Performance

Question 38

Question
The ____ contains the description of the entire database as seen by the database administrator.
Answer
  • distributed global dictionary
  • distributed data dictionary
  • distributed global schema
  • distributed data schema

Question 39

Question
____ query optimization means that the DDBMS finds the most cost-effective access path without user intervention.
Answer
  • Static
  • Dynamic
  • Automatic
  • Commit

Question 40

Question
____ query optimization takes place at execution time.
Answer
  • Automatic
  • Static
  • Manual
  • Dynamic
Show full summary Hide full summary

0 comments

There are no comments, be the first and leave one below:

Similar

The USA, 1919-41
sagar.joban
Key Paintings
Julia Lee
Spanish: Grammar 3.2
Selam H
A Level: English language and literature techniques = Lexis
Jessica 'JessieB
HISTOGRAMS
Elliot O'Leary
2PR101 1.test - 7. část
Nikola Truong
1PR101 2.test - Část 1.
Nikola Truong
1PR101 2.test - Část 4.
Nikola Truong
Linking Rossetti and A Doll's House
Mrs Peacock
Health and Safety at Work Act 1974 (HASWA)
Carina Storm