PrepAway - Latest Free Exam Questions & Answers

What should you do?

You are a database administrator for AIOTestKing.com. Your SQL Server 2005 database contains a table named Customer with a column named PostalCode in it. New PostalCode values are added regularly. You need to ensure that values contained in the PostalCode column are verified. You need to retrieve, from the Postal Service in each country in which you have customers, the domain of values for the PostalCode column.
Rapid response time for data access is of primary concern. What should you do?

PrepAway - Latest Free Exam Questions & Answers

A.
Implement a database trigger that looks up the postal code data from a server maintained by the Postal Service.

B.
Import the Postal Service data on a nightly basis into a PostalCode table. Then, configure a foreign key on the Customer table to the PostalCode table.

C.
Configure a CHECK constraint on the PostalCode field of the Customer table to allow only valid values.

D.
Implement a CLR trigger that looks up the postal code data by using a Web service offered by the Postal Service.

E.
Configure a new PostalCode data type and ensure that it conforms to the Postal Service specifications for the format for each country.

Explanation:
A foreign key (FK) is a column or combination of columns that is used to establish and enforce a link between the data in two tables. You can create a foreign key by defining a FOREIGN KEY constraint when you create or modify a table. In a foreign key reference, a link is created between two tables when the column or columns that hold the primary key value for one table are referenced by the column or columns in another table. This column becomes a foreign key in the second table. A FK on the PostalCode column in the Customer table that points to a PostalCode table would enforce the use of correct postal codes.


Leave a Reply