当前位置: 答题翼 > 问答 > 求职面试 > 正文
目录: 标题| 题干| 答案| 搜索| 相关
问题

You are a database developer for a container manufacturing company. The containers prod


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

Height

Container

ContainerID

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 a database developer for a container manufacturing company. The containers prod

  • You are the database administrator for a retail company. The company owns 270 stores. Ever

  • You are administering a database and you receive a requirement to apply the following rest

  • Examine the parameter for your database instance:You generated the execution plan for the

  • In your multitenant container database (CDB) with two pluggable database (PDBs). You want to create a new PDB by using SQL Developer.Which statement is true?()

  • You are managing an Oracle 11g database with ASM storage for which the COMPATIBLE initial