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 exhi

题目

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.


相似考题

1.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 from the mainframe. database.The server in Los Angeles contains a Data Transformation Services (DTS) package that uses OLE DB to connect to the company's mainframe. database. The DTS package extracts and transforms data about buyers and products for that region. The DTS package then writes the data to the SQL Server database in Los Angeles.You need to configure a SQL Server computer for the new branch office in Sydney. You want to copy the Los Angeles package and modify it so that it writes data to the SQL Server database in Sydney.You use the DTS Designer to modify the DTS package so that it imports regional data from the mainframe. database to the server in Sydney. The modified DTS package runs successfully on the server in Los Angeles. You save this DTS package to the server in Sydney, but the server in Sydney cannot connect to the mainframe. database.You want to enable the server in Sydney to connect to the mainframe. database. What should you do?A.Change the connection properties in the DTS package so that the package uses new login credentials to connect to the mainframe. database.B.Modify the workflow in the DTS package so that the server in Sydney is included.C.On the server in Sydney, install an OLE DB provider for the mainframe. database.D.On the server in Sydney, delete and then re-create the DTS package.

更多“You are a database developer for a container manufacturing company. The containers prod ”相关问题
  • 第1题:

    以下程序的输出结果是_____。 include class object {private:int val; public:objec

    以下程序的输出结果是_____。

    include<iostream.h>

    class object

    { private:

    int val;

    public:

    object( ) ;

    object(int i) ;

    ~object( ) ;};

    object: :object( )

    { val=0;

    cout < < "Default constructor for object" < < endl;}

    object: :object(int i)

    { val=i;

    cout < < "Constructor for object" < < val < < endl;}

    object: :~object( )

    { cout < < "Destructor for object" < < val < < endl;}

    class container{ private:

    object one;

    object two;

    int data;

    public:

    container( ) ;

    container(int i,int j,int k) ;

    ~container( ) ;};

    container: :container( )

    { data=0;

    cout < < "Default constructor for container" < < endl;}

    container: :container(int i,int j,int k) :two(i) ,one(j)

    { data=k;

    cout < < "Constructor for container" < < endl;}

    container: :~container( )

    { cout < < "Destructor for container" < < endl;}

    void main( )

    { container anObj(5,6,10) ;}


    正确答案:Constructor for object6 Constructor for object5 Constructor for container Destructor for container Destructor for object5 Destructor for object6
    Constructor for object6 Constructor for object5 Constructor for container Destructor for container Destructor for object5 Destructor for object6 解析:C++语言中的构造函数和析构函数分别是在声明对象时和对象调用完毕后调用,本题中的调用就是这样成对出现的。

  • 第2题:

    Marrywantstocreateanewapplicationonhislaptopthatdoesnothaveanydesignelementsinit.Whichoneofthefollowingshouldhedotobeginhisprocess?()

    A.selectfile->Database->newandgiveitafilenameof“blank.nsf”

    B.selectfile->Database->new,chooselocalastheserver,andchosetheblanktemplate

    C.selectfile->Database->new,chooselocalastheserver,andchosethedefault.ntftemplate

    D.selectfile->Database->new,giveitafilenameof“blank.nsf”,andchosetheblanktemplate


    参考答案:B

  • 第3题:

    所有网格行必须在一个带有.container类或.container-fluid类的容器元素中


    GridLayout

  • 第4题:

    下列哪种CSS属性不能让页面在浏览器中居中显示(网页中所有可显示的元素都包含在一个id为container的div盒子内)()。

    A.container{margin:0auto;width:780px;}

    B.container{position:relative;width:780px;left:50%;margin-left:-390px;}

    C.container{margin:0auto;width:85%;}

    D.container{position:relative;width:780px;right:50%;margin-left:390px;}


    正确答案:D

  • 第5题:

    Anadministratorisplanningaclusterrunningapplicationsin3separateresourcegroups.RGA-Database1RGB-WebServerRGC-Database2Database1andDatabase2mustbeonlinebeforetheWebServer.AllresourcegroupshaveaStartupPolicyofOnlineonHomeNodeOnly.Whichofthefollowingwillensurethattheresourcegroupsareprocessedinthecorrectorder?()

    A.SettheSerialAcquisitionOrder

    B.SettheParallelAcquisitionOrder

    C.ConfigureOnlineontheSameNodeDependency

    D.ConfigureOnlineonDifferentNodesDependency


    参考答案:A

  • 第6题:

    如下命令不能求得100的阶乘的是:

    A.prod(1:100)

    B.prod(1:1:100)

    C.prod(100:-1:1)

    D.sum(1:100)


    sum(1:100)