186 Part I EXAM PREPARATION APPLY YOUR KNOWLEDGE
186 Part I EXAM PREPARATION APPLY YOUR KNOWLEDGE tant to be able to attain a point-in-time restoration process. You would like to minimize the maintenance needed to accommodate increases and decreases in file storage space. Which option would assist the most in accomplishing the task? A. SIMPLE RECOVERY B. AUTOSHRINK C. MAXSIZE D. AUTOGROW E. COLLATE 10. You are the administrator of a SQL Server 2000 computer. The server contains a database named Inventory. Users report that several storage locations in the UnitsStored field contain negative numbers. You examine the database s table structure. You correct all the negative numbers in the table. You must prevent the database from storing negative numbers. You also want to minimize use of server resources and physical I/O. Which statement should you execute? A. ALTER TABLE dbo.StorageLocations ADD .CONSTRAINT CK_StorageLocations_UnitsStored CHECK (UnitsStored >= 0) B. CREATE TRIGGER CK_UnitsStored On .StorageLocations FOR INSERT, UPDATE AS IF INSERTED.UnitsStored < 0 ROLLBACK TRAN C. CREATE RULE CK_UnitsStored As @Units >= 0 GO sp_bindrule CK_UnitsStored StorageLocations.UnitsStored GO D. CREATE PROC UpdateUnitsStored (@StorageLocationID int, @UnitsStored .bigint) AS IF @UnitsStored < 0 RAISERROR (50099, 17) ELSE UPDATE StorageLocations SET UnitsStored = @UnitsStored WHERE StorageLocationID = .@StorageLocationID 11. You are the administrator of a SQL Server 2000 computer. The server contains a database named Inventory. In this database, the Parts table has a Primary Key that is used to identify each part stored in the company s warehouse. Each part has a unique UPC code that your company s accounting department uses to identify it. You want to maintain the referential integrity between the Parts table and the OrderDetails table. You want to minimize the amount of physical I/O that is used within the database. Which two T-SQL statements should you execute? (Each correct answer represents part of the solution. Choose two.) A. CREATE UNIQUE INDEX IX_UPC On Parts(UPC) B. CREATE UNIQUE INDEX IX_UPC On .OrderDetails(UPC) C. CREATE TRIGGER UPCRI On OrderDetails FOR INSERT, UPDATE As If Not Exists (Select UPC From Parts Where Parts.UPC = inserted.UPC) BEGIN ROLLBACK TRAN END D. CREATE TRIGGER UPCRI On Parts FOR INSERT, UPDATE As If Not Exists (Select UPC From Parts Where OrderDetails.UPC = inserted.UPC) .BEGIN ROLLBACK TRAN END E. ALTER TABLE dbo.OrderDetails ADD .CONSTRAINT FK_OrderDetails_Parts FOREIGN KEY(UPC) REFERENCES dbo.Parts(UPC) F. ALTER TABLE dbo.Parts ADD CONSTRAINT FK_Parts_OrderDetails FOREIGN KEY (UPC) REFERENCES dbo.Parts(UPC)
If you looking for unlimited one inclusive web hosting plan please check unlimited web hosting website.