Database D&D CH 11 & 12

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

Which statement is used to modify the structure of an existing table? A) ALTER TABLE B) CREATE TABLE C) CHANGE TABLE D) UPDATE

A) ALTER TABLE

If you omit both NULL and NOT NULL from the list of column attributes in a CREATE TABLE statement, which is the default setting? A) NULL B) NOT NULL C) This will throw an error D) none of the above

A) NULL

When you use the CREATE TABLE statement to create a table, you can also define the attributes and ______________ for the columns. A) constraints B) values C) data types D) all of the above

A) constraints

When you use the Management Studio to create a check constraint, you can specify whether you want the constraint enforced for insert or ________________ operations. A) update B) delete C) invoice D) log

A) update

When you use the Management Studio to create a database, including its tables and indexes, the Management Studio actually generates and runs the ____________ statements that are necessary to create the database. A) DML B) DDL C) both a and b D) none of the above

B) DDL

The CREATE TABLE statement A) creates a new table in the specified database B) creates a new table in the current database C) specifies attributes for an existing table D) all of the above

B) creates a new table in the current database

The CREATE DATABASE statement creates two files on the hard drive of the server: a data file and a A) index file B) log file C) key file D) none of the above

B) log file

When you use the Check Constraints dialog box, all of the constraints are at the which level so they can refer to any of the columns in the table? A) column B) table C) database D) value

B) table

When you create a script for creating a database, A) you can create the tables in whatever sequence you prefer B) you need to create the referred to tables before you create the tables that refer to them C) you need to create the indexes before you create the tables that they apply to D) you need to code the primary key column first in each table

B) you need to create the referred to tables before you create the tables that refer to them

When you create a table using the Management Studio, the table is automatically stored in the default schema. If you want to transfer the table to a different schema, you can use the which statement? A) SET SCHEMA B) CREATE SCHEMA C) ALTER SCHEMA D) COPY SCHEMA

C) ALTER SCHEMA

Check constraints you create using DDL can be defined at the A) table level B) column level C) both a and b D) none of the above

C) both a and b

What kind of constraint enforces referential integrity between tables? A) reference constraint B) foreign key constraint C) both a and b D) none of the above

C) both a and b

An identifier A) can be a Transact-SQL reserved keyword B) can contain spaces C) can contain a number sign (#) D) all of the above

C) can contain a number sign (#)

What kind of constraint limits the values that can be stored in a column? A) size constraint B) values constraint C) check constraint D) integrity constraint

C) check constraint

When you code a table-level check constraint, the constraint can refer to data in more than one A) database B) table C) column D) value

C) column

By default, what kind of index does the CREATE INDEX statement create? A) composite B) clustered C) non clustered D) referential

C) non clustered

When you use the Management Studio to create a foreign key constraint, you specify the relationship between two tables as well as the rules for enforcing what? A) column values B) table design C) referential integrity D) column properties

C) referential integrity

Some database designers write their own SQL statements for creating a database, its tables, and its indexes instead of using the Management Studio. Why? A) They want to have complete control over how the database is created. B) The scripts generated by the Management Studio are harder to understand. C) It's easier to modify your own script if you want to use it to create the same database for another database management system later on. D) All of the above

D) All of the above

When you create a script for creating a database, which keyword do you use to signal the end of a batch and cause all the statements in the batch to be executed? A) START B) END C) EXECUTE D) GO

D) GO

You can use the Object Dependencies dialog box of the Management Studio to do all but one of the following. Which one is it? A) Review the tables that depend on a specific table B) Review the tables that a specific table depends on C) Review the stored procedures and views that depend on a specific table D) Review the stored procedures and views that a specific table depends on

D) Review the stored procedures and views that a specific table depends on

When you identify a column as the primary key, the column A) has a clustered index created automatically for the column B) is forced to contain a unique value for each row C) is forced to be NOT NULL D) all of the above

D) all of the above

Which of the following statements about the SPARSE attribute is true? A) optimizes the storage of null values for a column B) requires more overhead to retrieve non-null values C) you should only use it when a column contains a high percentage of null values D) all of the above

D) all of the above

What is a type of nonclustered index that includes a WHERE clause? A) full-database index B) full-table index C) composite index D) filtered index

D) filtered index

Whenever you use the Management Studio to create, alter, or delete database objects, you can save the ________________ that it used for doing that. A) schema B) log file C) date D) script

D) script

An at sign (@) at the beginning of an identifier indicates A) that the identifier is an email address B) that the identifier is a global temporary object C) that the identifier is a temporary table procedure D) that the identifier is a local variable or parameter

D) that the identifier is a local variable or parameter


Set pelajaran terkait

Fingers, Hand, Wrist, Forearm, Elbow, Humerus, and Shoulder

View Set

Simple, Complete, and Compound Subjects and Predicates

View Set

AP Gov: Interest Groups and Campaigning

View Set