chapter 7

¡Supera tus tareas y exámenes ahora con Quizwiz!

SQL cursor

Because SQL statements are table-oriented, whereas programs are variable-oriented, the results of SQL statements used in programs are accessed using a(n) _______.

true

Because SQL statements are table-oriented, whereas programs are variable-oriented, the results of SQL statements used in programs are accessed using an SQL cursor.

pseduofiles

Because SQL statements are table-oriented, whereas programs are variable-oriented, the results of SQL statements used in programs are treated as _________.

true

Because SQL stored procedures allow and encourage code sharing among developers, stored procedures give database application developers the advantages of less work, standardized processing, and specialization among developers.

false

If a trigger is being written to enforce referential integrity actions, you cannot use an INSTEAD OF trigger.

false

If the table PRODUCT has a column PRICE that has the data type Numeric (8,2), the value 98765 stored in that field will be displayed by the DBMS as 98765.00

43.21

If the table PRODUCT has a column PRICE, and PRICE has the data type Numeric (7,2), the value 4321 with be displayed by the DBMS as ____ .

true

If the values in an SQL view are changeable through the view itself, the SQL command UPDATE is used to change the values.

UPDATE

If the values in an SQL view are changeable through the view itself, the SQL command ______ is used to change the values.

true

If the values in an SQL view are not changeable through the view itself, you may still be able to update the view by using unique application logic. In this case, the specific logic is placed in an INSTEAD OF trigger.

INSTEAD OF

If the values in an SQL view are not changeable through the view itself, you may still be able to update the view by using unique application logic. In this case, the specific logic is placed in an ________ trigger.

JOIN...ON

In addition to the standard SQL join command structure, joins can be created using the SQL syntax __________.

more

In terms of application security, stored procedures are _________ secure than application code.

true

Joins that show only matching rows from the joined tables in their results are called inner joins.

true

Joins that show the matching rows from the joined tables plus unmatched rows from one other table in their results are called outer joins.

name of the constraint

One advantage of using the CONSTRAINT command to define a primary key is that the database designer controls the _________.

INSERT

One or more rows can be added to a table by using the ________ statement.

false

Outer joins can be either up joins or down joins.

DELETE

Rows can be removed from a table by using the SQL keyword _______.

UPDATE

Rows in a table can be changed by using the_______statement.

triggers

SQL ______ can be used when the DBMS receives an INSERT request.

code sharing

SQL stored procedures give database application developers the advantages of less work, standardized processing, and specialization among developers because stored procedures allow and encourage _______ among developers.

false

SQL triggers are created using the SQL ADD TRIGGER statement.

CREATE TRIGGER

SQL triggers are created using the SQL __________ statement.

true

SQL triggers are used for providing default values, validity checking, updating views, and performing referential integrity actions.

true

SQL triggers can be used when the DBMS receives an insert request.

INSERT, UPDATE, DELETE

SQL triggers can be used with SQL operations ________, ________, and ________.

BEFORE, INSTEAD OF, AFTER

SQL triggers use the ANSI SQL keywords _______, ________, and ________.

true

SQL views are constructed from SELECT statements.

SELECT

SQL views are constructed from _______ statements.

true

SQL views are updateable when the view is based on a single table with no computed columns, and all non-null columns are present in the view.

true

SQL views can be use used to provide a level of indirection between data processed by applications and the data actually stored in the database tables.

true

SQL views can be used to hide columns.

columns

SQL views can be used to hide table _________ .

true

Stored procedures have the advantage of greater security, decreased network traffic, SQL optimized by the DBMS compiler, and code sharing.

true

The Oracle DBMS supports the SQL trigger BEFORE.

BEFORE, INSTEAD OF, AFTER

The Oracle DBMS supports the SQL triggers _______, _________ , and _______.

BEFORE

The SQL Server DBMS does not support the SQL trigger ______.

false

The SQL Server DBMS supports the SQL trigger BEFORE.

false

The SQL command CREATE USER VIEW is used to create a virtual table.

true

The SQL command SELECT is used to retrieve view instances.

CREATE VIEW

The SQL command _______ is used to create a virtual table.

SELECT

The SQL command _______ is used to retrieve view instances.

true

The SQL keyword CONSTRAINT is used to define one of five types of constraints.

false

The SQL keyword CONSTRAINT is used to limit column values to specific values.

true

The SQL keyword CREATE is used to name a new table and describe the table's columns.

false

The SQL keyword DELETE is used to delete a table's structure.

false

The SQL keyword MODIFY is used to change a column value.

false

The SQL keyword MODIFY is used to change the structure, properties or constraints of a table.

true

The SQL keyword PRIMARY KEY is used to designate the column(s) that are the primary key for the table.

true

The SQL keyword UNIQUE is used to define alternative keys.

CREATE

The SQL keyword _____ is used to name a new table and describe the table's columns.

ALTER

The SQL keyword ______ is used to change the structure, properties or constraints of a table.

CHECK

The SQL keyword ______ is used to limit column values to specific values.

UNIQUE

The SQL keyword _______ is used to define an alternate key.

CONSTRAINT

The SQL keyword _________ is used in conjunction with the SQL keywords PRMARY KEY and FOREIGN KEY.

DROP

The SQL keyword ______is used to delete a table's structure.

SET

The SQL keyword________is used to specify a new value when changing a column value.

true

Unless it is being used to copy data from one table to another, the SQL INSERT command can be used to insert only a single row into a table.

never distributed

Unlike application code, stored procedures are _______to the client computers.

true

Unlike application code, stored procedures are never distributed to the client computers.

VALUES

Data values to be added to a table are specified by using the _______statement.

embedded SQL

A set of SQL statements stored in an application written in a standard programming language is called ________.

true

A set of SQL statements stored in an application written in a standard programming language is called embedded SQL.

false

A stored program that is attached to a table or view is called a stored procedure.

SQL trigger

A stored program that is attached to a table or view is called a(n) ________.

stored procedure

A stored program that is attached to the database is called a ________ .

false

A stored program that is stored within the database and complied when used is called a trigger.

ORDER BY

According to SQL-92, statements used to construct views cannot contain the _________ clause.

false

According to the SQL-92, statements used to construct views cannot contain the WHERE clause.

view

An SQL virtual table is called a _______.

true

An SQL virtual table is called a view.

false

The values in an SQL view are always changeable through the view itself.

the view itself

The values in an SQL view are not always changeable through ________.

an SQL trigger

To set a column value to an initial value that is selected according to some business logic, you would use __________ .

false

To set a column value to an initial value that is selected according to some business logic, you would use the SQL DEFAULT constraint with the CREATE TABLE command.

true

The SQL syntax JOIN . . . ON can be used as alternate way of writing an SQL join statement.

the trigger code

When a trigger is fired, the DBMS makes the appropriate data available to ___________ .

updateable

When an SQL view is based on a single table with no computed columns, and all non-null columns are present in the view, then the view is ________.

false

When the correct SQL command is used to delete a table's structure, the command can only be used with a table that has already had its data removed.


Conjuntos de estudio relacionados

NCLEX review 8/6/16 Hesi wrong answers

View Set

Supplement 7 Capacity and Constraint Management

View Set

Principles of Economics II Modules 1-11 test

View Set

Chapter 7: Trust, Justice, and Ethics

View Set

Intro to Coding - Conditional Statements

View Set

第一課漢字好好玩 廖淑儀Mint

View Set