[主观题]

You are a database developer for a container manufacturing company. The containers produced by your company are a number of different sizes and shapes. The tables that store the container information are shown in the Size, Container, and Shape Tables exhibit:

Size

SizeID

SizeName

H.eight

C.ontainer

C.ontainerID

ShapeID

SizeID

Shape

ShapeID

ShapeName

Measurements

A. sample of the data stored in the tables is shown below:

Size Table

SizeID SizeName Height

1 Small 40

2 Medium 60

3 Large 80

4 Jumbo 100

Shape Table

ShapeID ShapeName Measurement

1 Triangle 10

2 Triangle 20

3 Triangle 30

4 Square 20

5 Square 30

6 Square 40

7 Circle 15

8 Circle 25

9 Circle 35

Periodically, the dimensions of the containers change. Frequently, the database users require the volume of a container. The volume of a container is calculated based on information in the shape and size tables.

You need to hide the details of the calculation so that the volume can be easily accessed in a SELECT query with the rest of the container information. What should you do?

A. Create a user-defined function that requires ContainerID as an argument and returns the volume of the container.

B. Create a stored procedure that requires ContainerID as an argument and returns the volume of the container.

C. Add a column named volume to the container table. Create a trigger that calculates and stores volume in this column when a new container is inserted into the table.

D. Add a computed column to the container table that calculates the volume of the container.

参考答案与解析:

相关试题

You are the database administrator for a

[单选题]You are the database administrator for a retail company. The company owns 270 stores. Every month, each store submits approximately 2,000 sales records, which are loaded into a SQL Server 2000 database at the corporate headquarters.A. Data Transforma

  • 查看答案
  • You are the database administrator for a

    [单选题]You are the database administrator for a financial services company. Employees enter data 24 hours a day into a SQL Server 2000 database. These employees report slower response times when new account information is gathered from branch offices and ad

  • 查看答案
  • You are a database administrator in the

    [单选题]You are a database administrator in the Los Angeles branch office of a specialty foods supplier. A mainframe. database at the headquarters contains all company data. Each branch office contains a SQL Server 2000 computer that imports regional data fr

  • 查看答案
  • You are the database administrator of a

    [单选题]You are the database administrator of a SQL Server 2000 computer. The server contains your company's Accounts database. Hundreds of users access the database each day.B.ecause you have had power interruptions in the past, you want to perfect the phy

  • 查看答案
  • You are managing a 24*7 database. The ba

    [多选题] You are managing a 24*7 database. The backup strategy for the database is to perform user-managed backups. Identify two prerequisites to perform the backups.()A . The database must be opened in restricted mode.B . The database must be configured t

  • 查看答案
  • In developing a hospital database, it is

    [单选题]In developing a hospital database, it is determined that on the average, each patient will have 6 treatments during a hospital stay.The average length of a stay is three days.The hospital has 1000 beds.There are on the average 800 patients occupying

  • 查看答案
  • The complete database application can be

    [单选题]The complete database application can be divided into three major categories:data presentation.businesslogic,and data______.A.storageB.statisticsC.disposeD.analysis

  • 查看答案
  • The______scheme in a database system is

    [单选题]The______scheme in a database system is responsible for the detection of failures and for the restoration of the database to a state that existed before the occurrence of the failure.A.queryB.testC.checkD.RecoveryA.B.C.D.

  • 查看答案
  • MMDB(Molecular Modeling Database)

    [名词解释] MMDB(Molecular Modeling Database)

  • 查看答案
  • Arelation(from the relational database m

    [单选题]Arelation(from the relational database model)consistsof(由⋯⋯组成)a set of tuples(元组),whichimplies(意味着)that().A.all tuples in a relation must be distinct(独一无二的)B.every relation has a key(键)C.all of the aboveD.for any two tuples,the values associated with

  • 查看答案
  • You are a database developer for a conta