PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

You need to minimize disk space usage without altering the data types in the tables of the database

You are a database developer. You plan to design a database solution by using SQL Server
2008. The database will contain three tables. The structure of the three tables is as shown
in the following table. You need to minimize disk space usage without altering the data
types in the tables of the database. What should you do?

Which Transact-SQL statement should you use?

You develop a Microsoft SQL Server 2012 server database that supports an application.
The application contains a table that has the following definition:
CREATE TABLE Inventory (
ItemID int NOT NULL PRIMARY KEY,
ItemsInStore int NOT NULL,
ItemsInWarehouse int NOT NULL)
You need to create a computed column that returns the sum total of the ItemsInStore and
ItemsInWarehouse values for each row.
The new column is expected to be queried heavily, and you need to be able to index the column.
Which Transact-SQL statement should you use?

Which code fragment should you use?

You are a database developer. You plan to design a database solution by using SQL Server
2008. A database contains a table that has a column defined as a smallint data type. The
table is partitioned on the basis of the smallint column. The partition function, named
MyRangePF1, is a range-right function that has boundaries of 100 and 1,000. The table
must be altered to contain the following partitions: ·< 100 ·>= 100 and < 400 ·>= 400 and <
700 ·>= 700 and < 1000 ·>= 1000 You need to alter the partition function to provide the
required partitions. Which code fragment should you use?

Which Transact-SQL statement should you use?

You develop a Microsoft SQL Server 2012 database that has two tables named SavingAccounts and
LoanAccounts. Both tables have a column named AccountNumber of the nvarchar data type.
You use a third table named Transactions that has columns named TransactionId AccountNumber,
Amount, and TransactionDate.
You need to ensure that when multiple records are inserted in the Transactions table, only the
records that have a valid AccountNumber in the SavingAccounts or LoanAccounts are inserted.
Which Transact-SQL statement should you use?