Deck 4: The Relational Model 3: Advanced Topics

Full screen (f)
exit full mode
Question
A trigger is stored and compiled on the client computer.
Use Space or
up arrow
down arrow
to flip the card.
Question
What database rule states that no field that is part of the primary key may accept null values?

A) legal-values integrity
B) structural integrity
C) referential integrity
D) entity integrity
Question
To create an index named RepBal with the keys RepNum and Balance and with the balances listed in descending order, which command should you use?

A) CREATE INDEX RepBal ON Customer (RepNum, Balance) ;
B) CREATE INDEX RepBal Customer (RepNum DESC) ;
C) CREATE INDEX ON Customer (RepNum, Balance ASC) ;
D) CREATE INDEX RepBal ON Customer (RepNum, Balance DESC) ;
Question
Which command will create an application program's or individual user's picture of the database?

A) CREATE INDEX
B) SELECT INDEX
C) SELECT VIEW
D) CREATE VIEW
Question
One advantage of a view is that different users can view the same data in different ways.
Question
The following command will enable Jones to retrieve data from the Customer table, but not to take any other action: GRANT SELECT ON Customer To Jones ;
Question
What SQL feature can you use if you want to create a view that combines data from more than one table?

A) a join
B) a trigger
C) an index
D) a catalog
Question
Stored procedures do not accept parameters, and must be queried in a manner similar to tables.
Question
Which statement will take away user privileges to the database?

A) SELECT
B) INDEX
C) DEL
D) REVOKE
Question
Indexes can increase the efficiency with which data is retrieved from the database.
Question
To create a view in Access, you create and then save a query.
Question
Referential integrity is specified using the FOREIGN KEY clause in the CREATE TABLE command.
Question
Information about tables in the database is kept in the system catalog.
Question
When you create an index whose key has a single field, you have created what is called a single-column index.
Question
One disadvantage of using views is that they are data dependent so that if the database structure changes in any way, the view can no longer be used.
Question
In SQL, you use the VERIFY clause to enforce legal-values integrity.
Question
When you create a query that involves a view, the DBMS immediately executes the query you created.
Question
Views cannot be used to examine table data.
Question
You can change the structure of a table using the CREATE VIEW command.
Question
The command DEL INDEX CustList; would remove the index named CustList.
Question
Which statement removes the table Category from a DBMS?

A) DELETE TABLE Category ;
B) DROP TABLE Category ;
C) REMOVE TABLE Category ;
D) RID TABLE Category ;
Question
A value of ________ is used when a value is missing, unknown, or inapplicable.
Question
Using Access, which command will create a new table named NewClients from an existing table named Clients?

A) CREATE NewClients FROM Clients;
B) SELECT * FROM Clients CREATE NewClients;
C) SELECT * INTO NewClients FROM Clients;
D) SELECT * MAKE NewClients FROM Clients;
Question
Which of the following is a disadvantage of using an index?

A) You can only add an index when the table is created.
B) You can't use indexes with foreign keys.
C) Record retrieval is less efficient.
D) The index must be updated whenever the data in the database changes.
Question
Which of the following statement fragments will only allow a CreditLimit of $5,000, $7,500, or $15,000?

A) (CreditLimit IN (5000, 7500, 15000))
B) CHECK ((5000, 7500, 15000))
C) CHECK (CreditLimit LIKE (5000, 7500, 15000))
D) CHECK (CreditLimit IN (5000, 7500, 15000))
Question
In SQL, you specify _____________ integrity using a FOREIGN KEY clause in either the CREATE TABLE or ALTER TABLE commands.
Question
Within relational model systems on both mainframes and personal computers, the main mechanism for increasing the efficiency with which data is retrieved from the database is the ____________________.
Question
When a new table is added or deleted, or the structure of a table is changed, where does the DBMS record these changes?

A) procedure
B) views
C) indexes
D) catalog
Question
To insert a new field in a table, which keyword should be used with the ALTER TABLE command?

A) INSERT
B) ADD
C) INCLUDE
D) ALTER
Question
You use the __________ statement to give users privileges to the database.
Question
Which rule uses a foreign key in Table B to ensure that the field matches a primary key field in Table A?

A) legal-values integrity
B) structural integrity
C) referential integrity
D) entity integrity
Question
To create the primary key clause for the Customer table on the CustomerNum field, which statement should you use?

A) PRIMARY KEY (CustomerNum)
B) PRIMARY KEY (Customer, CustomerNum)
C) KEY (CustomerNum)
D) PRIMARY (CustomerNum)
Question
Where can you save a query if you anticipate running it often?

A) index
B) stored procedure
C) system catalog
D) view
Question
You can take away user privileges to the database using the ____________ statement.
Question
What feature is available in Access 2016 that offers the functionality of a trigger?

A) data macro
B) system catalog
C) index
D) view
Question
What value can you set a field to that is similar to not entering a value in it at all?

A) N/A
B) nil
C) null
D) 0
Question
In SQL, what type of integrity are you enforcing by using the CHECK clause?

A) referential
B) legal-values
C) entity
D) structural
Question
Which SQL command should you use to delete the Storehouse field from the Item table?

A) ALTER TABLE Item DELETE Storehouse ;
B) ALTER TABLE Item DROP COLUMN Storehouse ;
C) ALTER Item DELETE Storehouse ;
D) ALTER TABLE DELETE Storehouse ;
Question
To create the primary key clause for the OrderLine table on the OrderNum and ItemNum fields, which statement should you use?

A) PRIMARY KEY (OrderLine, OrderNum, ItemNum)
B) KEY (OrderNum, ItemNum)
C) PRIMARY KEY (OrderNum, ItemNum)
D) PRIMARY (OrderNum, ItemNum)
Question
Which of the following is an action that occurs automatically in response to an associated database operation such as an INSERT, UPDATE, or DELETE command?

A) stored procedure
B) trigger
C) view
D) index
Question
The type of field for which you should never allow nulls is the ____________________.
Question
What are the advantages of having views only contain the fields required by a given user?
Question
What is the difference between entity integrity and referential integrity?
Question
In a system catalog, the ____________________ table contains information about the tables known to SQL.
Question
In Access, a(n) ____________________ enables you to add logic to table events such as adding, changing, or deleting data.
Question
Access has a tool called the ____________________, which allows you to easily print detailed documentation concerning any table, query, report, form, or other object in the database.
Question
Explain what is meant by a null value. Is a null value the same as a value of zero?
Question
Describe a client/server system and how it applies to stored procedures.
Question
In SQL, you can use the _______________ clause to enforce legal-values integrity.
Question
Discuss validation rules and validation text.
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/50
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 4: The Relational Model 3: Advanced Topics
1
A trigger is stored and compiled on the client computer.
False
2
What database rule states that no field that is part of the primary key may accept null values?

A) legal-values integrity
B) structural integrity
C) referential integrity
D) entity integrity
D
3
To create an index named RepBal with the keys RepNum and Balance and with the balances listed in descending order, which command should you use?

A) CREATE INDEX RepBal ON Customer (RepNum, Balance) ;
B) CREATE INDEX RepBal Customer (RepNum DESC) ;
C) CREATE INDEX ON Customer (RepNum, Balance ASC) ;
D) CREATE INDEX RepBal ON Customer (RepNum, Balance DESC) ;
D
4
Which command will create an application program's or individual user's picture of the database?

A) CREATE INDEX
B) SELECT INDEX
C) SELECT VIEW
D) CREATE VIEW
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
5
One advantage of a view is that different users can view the same data in different ways.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
6
The following command will enable Jones to retrieve data from the Customer table, but not to take any other action: GRANT SELECT ON Customer To Jones ;
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
7
What SQL feature can you use if you want to create a view that combines data from more than one table?

A) a join
B) a trigger
C) an index
D) a catalog
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
8
Stored procedures do not accept parameters, and must be queried in a manner similar to tables.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
9
Which statement will take away user privileges to the database?

A) SELECT
B) INDEX
C) DEL
D) REVOKE
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
10
Indexes can increase the efficiency with which data is retrieved from the database.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
11
To create a view in Access, you create and then save a query.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
12
Referential integrity is specified using the FOREIGN KEY clause in the CREATE TABLE command.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
13
Information about tables in the database is kept in the system catalog.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
14
When you create an index whose key has a single field, you have created what is called a single-column index.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
15
One disadvantage of using views is that they are data dependent so that if the database structure changes in any way, the view can no longer be used.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
16
In SQL, you use the VERIFY clause to enforce legal-values integrity.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
17
When you create a query that involves a view, the DBMS immediately executes the query you created.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
18
Views cannot be used to examine table data.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
19
You can change the structure of a table using the CREATE VIEW command.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
20
The command DEL INDEX CustList; would remove the index named CustList.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
21
Which statement removes the table Category from a DBMS?

A) DELETE TABLE Category ;
B) DROP TABLE Category ;
C) REMOVE TABLE Category ;
D) RID TABLE Category ;
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
22
A value of ________ is used when a value is missing, unknown, or inapplicable.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
23
Using Access, which command will create a new table named NewClients from an existing table named Clients?

A) CREATE NewClients FROM Clients;
B) SELECT * FROM Clients CREATE NewClients;
C) SELECT * INTO NewClients FROM Clients;
D) SELECT * MAKE NewClients FROM Clients;
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
24
Which of the following is a disadvantage of using an index?

A) You can only add an index when the table is created.
B) You can't use indexes with foreign keys.
C) Record retrieval is less efficient.
D) The index must be updated whenever the data in the database changes.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
25
Which of the following statement fragments will only allow a CreditLimit of $5,000, $7,500, or $15,000?

A) (CreditLimit IN (5000, 7500, 15000))
B) CHECK ((5000, 7500, 15000))
C) CHECK (CreditLimit LIKE (5000, 7500, 15000))
D) CHECK (CreditLimit IN (5000, 7500, 15000))
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
26
In SQL, you specify _____________ integrity using a FOREIGN KEY clause in either the CREATE TABLE or ALTER TABLE commands.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
27
Within relational model systems on both mainframes and personal computers, the main mechanism for increasing the efficiency with which data is retrieved from the database is the ____________________.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
28
When a new table is added or deleted, or the structure of a table is changed, where does the DBMS record these changes?

A) procedure
B) views
C) indexes
D) catalog
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
29
To insert a new field in a table, which keyword should be used with the ALTER TABLE command?

A) INSERT
B) ADD
C) INCLUDE
D) ALTER
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
30
You use the __________ statement to give users privileges to the database.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
31
Which rule uses a foreign key in Table B to ensure that the field matches a primary key field in Table A?

A) legal-values integrity
B) structural integrity
C) referential integrity
D) entity integrity
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
32
To create the primary key clause for the Customer table on the CustomerNum field, which statement should you use?

A) PRIMARY KEY (CustomerNum)
B) PRIMARY KEY (Customer, CustomerNum)
C) KEY (CustomerNum)
D) PRIMARY (CustomerNum)
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
33
Where can you save a query if you anticipate running it often?

A) index
B) stored procedure
C) system catalog
D) view
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
34
You can take away user privileges to the database using the ____________ statement.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
35
What feature is available in Access 2016 that offers the functionality of a trigger?

A) data macro
B) system catalog
C) index
D) view
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
36
What value can you set a field to that is similar to not entering a value in it at all?

A) N/A
B) nil
C) null
D) 0
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
37
In SQL, what type of integrity are you enforcing by using the CHECK clause?

A) referential
B) legal-values
C) entity
D) structural
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
38
Which SQL command should you use to delete the Storehouse field from the Item table?

A) ALTER TABLE Item DELETE Storehouse ;
B) ALTER TABLE Item DROP COLUMN Storehouse ;
C) ALTER Item DELETE Storehouse ;
D) ALTER TABLE DELETE Storehouse ;
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
39
To create the primary key clause for the OrderLine table on the OrderNum and ItemNum fields, which statement should you use?

A) PRIMARY KEY (OrderLine, OrderNum, ItemNum)
B) KEY (OrderNum, ItemNum)
C) PRIMARY KEY (OrderNum, ItemNum)
D) PRIMARY (OrderNum, ItemNum)
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
40
Which of the following is an action that occurs automatically in response to an associated database operation such as an INSERT, UPDATE, or DELETE command?

A) stored procedure
B) trigger
C) view
D) index
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
41
The type of field for which you should never allow nulls is the ____________________.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
42
What are the advantages of having views only contain the fields required by a given user?
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
43
What is the difference between entity integrity and referential integrity?
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
44
In a system catalog, the ____________________ table contains information about the tables known to SQL.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
45
In Access, a(n) ____________________ enables you to add logic to table events such as adding, changing, or deleting data.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
46
Access has a tool called the ____________________, which allows you to easily print detailed documentation concerning any table, query, report, form, or other object in the database.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
47
Explain what is meant by a null value. Is a null value the same as a value of zero?
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
48
Describe a client/server system and how it applies to stored procedures.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
49
In SQL, you can use the _______________ clause to enforce legal-values integrity.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
50
Discuss validation rules and validation text.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 50 flashcards in this deck.