发信人: reynolds(雷龙.DBA中)
整理人: reynolds(2002-02-25 09:03:51), 站内信件
|
61. You are the administrator of a SQL Server 2000 computer. The server contains a database named Inventory. The database is configured as shown below:
See http://www.cheet-sheets.com/228/image8.jpg
Users frequently need details about parts. Users search for data by using the following query:
SELECT Parts.SKU, Locations.Description, Manufacturer.Name, PartsLocations.Qty, PartsLocations.LastInventoried
FROM Parts
INNER JOINT Manufacturer ON Parts.ManufacturerID= Manufacturer.ManufacturerID
INNER JOINT Locations ON Parts.LocationID= Loactions.LocationID
WHERE SKU?
You need to accelerate query response time. What should you do?
A. Create a parameterised stored procedure to retrieve the data.
B. Create a denormalized table that is maintained by triggers.
C. Use ad hoc queries to retrieve the data.
D. Create a nonclustered index on the primary key of each table.
Answer: D
Reason: 好像所有可以提高查询性能的都和建立索引有关系,呵呵。只是针对题目而言的哦,实际中就没有这么简单了。
62. You are the administrator of a SQL Server 2000 computer. The server contains a database named MedicalRecords. The database tables are configured as shown below:
Column Name Data Type Length Allow Nulls
PatientID int 4
Title char 4 Yes
FirstName char 25
LastName char 35
Address varchar 50
Address2 varchar 50 Yes
City char 25
State char 2
Zip char 10
Phone char 15 Yes
The existing PatientID field is an identity field. According to a new government regulation, the patient IDs must include a three-character prefix before the numeric portion of the ID. The patient’s home address defines the prefix. You want to comply with the regulation while minimizing changes to the database. Which two actions should you take? (Each correct answer presents part of the solution. Choose Two)
A. Drop the FOREIGN KEY constraints. In each table, change the data type of the PatientID field to char.
B. Add an on update constraint to the patients table, and link it to the PatientID field. Update the field in the Patients table.
C. In the Patients table, add a new field named StatePatientID that has a data type of char. Populate the field with the prefix and the existing PatientID.
D. In each table, update the PatientID field. Re-create the FOREIGN KEY constraints.
E. In the Patients table, update the PatientID field.
F. Create a trigger that populates the StatePatientID field when a new patient is created.
Answer: A D
Reason: B答案不修改字段类型是行不通的,而约束用在这里也不合适。C的动作太大了,不符合最小管理负荷的要求。EF也是不妥当的答案。
63. You are the administrator of a SQL Server 2000 computer. The server contains a database named MedicalRecords. This database contains clinical records and administrative records. The database consumes about 30 GB of disk space. The data files are configured as shown in the exhibit (exhibit not available). You run full database backups each night after business hours. You notice that the backup is not complete by the time the morning shift begins to use the database. You need to minimize the time needed to restore data in the event of a system failure. You also want to reconfigure the database to allow the backups to complete during the evening hours. Which two actions should you take? (Each correct answer presents part of the solution. Choose two)
A. Reorganize the data files into two filegroups.
Place the system tables in the PRIMARY filegroup and the user-defined tables in the other filegroup.
B. Reorganize the data files into three filegroups.
Place the system tables and shared objects in the PRIMARY filegroup, the clinical records in a filegroup, and the administrative records in a filegroup.
C. Reorganize the data into three filegroups.
Place the system tables in the PRIMARY filegroup, the indexes in a filegroup, and the tables in a filegroup.
D. Back up the transaction log each night.
Run a filegroup backup on a different filegroup each night.
E. Back up the transaction log each night.
Run a full backup of the database each weekend.
F. Back up the transaction log each night.
Run the differential backup each Sunday, and run a full backup the first day of each month.
Answer: C D
Reason: 和前面的某个题目完全重复了。
64. You are the administrator of a SQL Server 2000 computer. The server contains a database named Accounting. The data files are configured as shown below:
File Name Location Disk Space (MB) Filegroup
Account_data E:\Program Files\ 8000 Primary
The database has grown to 7 GB. The server has no more available disk space. You need to make more disk space available in the accounting database without affecting system performance. What should you do?
A. Compress drive E.
B. Add a new hard disk to the server.
Create a new file on the new hard disk as part of the PRIMARY filegroup.
C. Add a new hard disk to the server.
Create a new file on the new hard disk as part of a new filegroup.
D. Map a network drive to the server.
Create a new data file on the network drive as part of the PRIMARY filegroup.
E. Map a network drive on the server.
Create a new data file on the network drive as part of a new filegroup.
Answer: C
Reason: 压缩硬盘绝对大幅度影响性能。映射网络硬盘也因为效率问题是不可行的,所以DE排除。
65. You are the administrator of an SQL Server 2000 computer. The server contains a database named Sales. The database stored information that employees use to analyze sales data. You configure the database by using the default options. You create the database tables as shown below:
See http://www.cheet-sheets.com/228/image9.jpg
You import data as a batch process each evening. Users report that the database responds slowly when they run the following query:
SELECT Customers.CustomerName, Invoices.InvoiceID, Invoices.InvoiceDate, OrderDetail.Quantity, Products.Description, Products.SKU, SalesPersons.FirstName, SalesPerson.LastName
FROM Invoices
INNER JOIN Customers ON Invoices.Customer ID = Customer.CustomerID
INNER JOIN OrderDetail ON Invoices.Invoice ID = OrderDetail.InvoiceID
INNER JOIN Products ON OrderDetail.ProductID = Products.ProductID
INNNER JOIN SalesPerson ON Invoices.SalesPersonID = SalesPerson.SalesPersonID
You want to improve the performance of this query. What should you do?
A. Create indexes on the foreign key fields.
B. Create a view to provide the data that the query will use.
C. Create a stored procedure that executes the query.
D. Create cascading UPDATE and DELET triggers to the table.
Answer: A
Reason: 提高性能,又是索引!
---- /
<>< o /| /
<>< (o / |/|
) ) <@ <
( O )( \ |\| <><
) <>< () \| \
\
每天在网易游水的鱼 |
|