Question The following questions should be answered with the
Question: The following questions should be answered with the use of SQL Developer.
The following questions should be answered with the tables above:
a.) Write a stored procedure to display the average fee that the dogs with dogName X were charged. X is to be an input parameter to the stored procedure. It is expected that your stored procedure will work for any instances of the above schema. Demonstrate that the stored procedure works by trying it on the above tables.
b.) Write a stored procedure to display the locations at which the veterinarians with vetName X performed exams. It is expected that your stored procedure will work for any instances of the above schema. Demonstrate that the stored procedure works by trying it on the above tables.
Problem B Implementation is to be done using your Implement as stored procedures the following. Oracle account: Both parts of this problem involve the following schema: Veterinarians (licenscNum Integer, vetName: String), Examine (licenseNum: Integer, did: Integer, lid: Integer, fee: Real); Dogs (did: Integer, dogName: String); Location (lid: Integer, locName: String) Use the following instances: Veterinarians: vetN Alice licenseNum 211 Fido 731 fee 10 20 30 50 35 lid did 1001 1003 100 100 1002 100 1002 100 100 731 731 35 731 58 211 Location: lid St. Cloud Mi Duluth 001 1003Solution
b)
a)
a generation chief is in charge of booking the month to month creation levels
of a specific item for an arranging skyline of twelve months. For arranging purposes, the
administrator was given the accompanying data:
• The aggregate interest for the item in month j is dj , for j = 1, 2, . . ., 12. These could
either be focused on qualities or be founded on figures.
• The cost of creating every unit of the item in month j is cj (dollars), for j = 1,
2, . . ., 12. There is no setup/altered cost for generation.
• The stock holding cost per unit for month j is hj (dollars), for j = 1, 2, . . ., 12.
These are caused toward the end of every month.
• The creation limit for month j is mj , for j = 1, 2, . . ., 12.
The chief\'s undertaking is to create a generation calendar that minimizes the aggregate generation
furthermore, stock holding costs over this twelve-month arranging skyline.
To encourage the detailing of a direct program, the administrator chooses to make the accompanying
improving suppositions:
1. There is no underlying stock toward the start of the main month.
2. Units planned for creation in month j are quickly accessible for conveyance at
the start of that month. This implies as a result that the creation rate is vast.
3. Deficiency of the item is not permitted toward the end of any month.
To comprehend things better, let us consider the main month. Assume, for that month, the
arranged generation level equivalents 100 units and the request, d1, parallels 60 units. At that point, since
the underlying stock is 0 (Assumption 1), the closure stock level for the primary month
would be 0 + 100 60 = 40 units. Take note of that every one of the 100 units are quickly accessible for
conveyance (Assumption 2); and that given d1 = 60, one must deliver no under 60 units
in the main month, to dodge lack (Assumption 3). Assume facilitate that c1 = 15 and
h1 = 3. At that point, the aggregate cost for the primary month can be processed as: 15×100+3×40 = 1380
dollars.
Toward the begin of the second month, there would be 40 units of the item in stock,
what\'s more, the relating finishing stock can be processed comparably, in light of the underlying
stock, the planned creation level, and the aggregate interest for that month. The same
plan is then rehashed until the end of the whole arranging skyline.
1
We now continue with a direct programming (LP) plan of this issue.
The Decision Variables
The chief\'s assignment is to set a creation level for every month. Accordingly, we have twelve
choice factors:
xj = the creation level for month j, j = 1, 2, . . ., 12.
The Objective Function
Consider the main month once more. From the examination above, we have:
The generation cost measures up to c1x1.
The stock holding cost measures up to h1(x1 d1), accepting that the closure stock level,
x1 d1, is nonnegative.
Subsequently, the aggregate cost for the principal month breaks even with c1x1 + h1(x1 d1).
For the second month, we have:
The generation cost levels with c2x2.
The stock holding cost measures up to h2(x1d1+x2d2), expecting that the consummation stock
level, x1 d1 + x2 d2, is nonnegative. This takes after from the way that the beginning
stock level during the current month is x1 d1, the generation level during the current month is x2,
what\'s more, the interest during the current month is d2.
Consequently, the aggregate cost for the second month measures up to c2x2 + h2(x1 d1 + x2 d2).
Continuation of this contention yields that:
The aggregate creation cost for the whole arranging skyline measures up to
X
12
j=1
cjxj c1x1 + c2x2 + . . . + c12x12 ,
where we have presented the standard summation documentation (\"\" implies by definition).


