1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Natali [406]
3 years ago
9

Suppliers(sid: integer, sname: string, address: string)

Engineering
1 answer:
GuDViN [60]3 years ago
5 0

Answer:

Explanation:

(a) Find the names of suppliers who supply some yellow part.

RA: sname(Suppliers on (color=0yellow0(Parts) on Catalog))

SQL:

SELECT S.sname

FROM Suppliers S, Parts P, Catalog C

WHERE S.sid = C.sid AND P.pid = C.pid AND P.color =’yellow’

(b) Find the sids of suppliers who supply some green part but not ared part.

RA: sid(Suppliers on (color=0green0(Parts) on Catalog))−

sid(Suppliers on (color=0red0(Parts) on Catalog))

SQL:

SELECT S.sid

FROM Suppliers S, Parts P, Catalog C

WHERE S.sid = C.sid AND P.pid = C.pid AND P.color =’green’

EXCEPT

SELECT T.sid

FROM Suppliers T, Parts P, Catalog C

WHERE T.sid = C.sid AND P.pid = C.pid AND P.color =’red’

(c) Find the sids and snames of suppliers who supply a’bolt’ whose price is under 100

dollars or whose color is red.

There is ambiguity here too. Some of you may interpret the questionto mean a bolt

whose price is under 100 dollars or a bolt whose color is red. Someof you may interpret

it to mean a bolt whose price is under 100 dollars or a red part. Ihave given points to

both these versions.

RA: sid,sname(Suppliers on((pname=0bolt0^cost<100)_(color=0red0)(Parts onCatalog)))

RA: sid,sname(Suppliers on((pname=0bolt0^(cost<100_color=0red0))(Parts onCatalog)))

SQL:

SELECT S.sid, S.sname

FROM Suppliers S, Parts P, Catalog C

WHERE S.sid = C.sid AND P.pid = C.pid AND P.pname =’bolt’ AND C.cost < 100

UNION

SELECT T.sid, T.sname

FROM Suppliers T, Parts P, Catalog C

WHERE T.sid = C.sid AND P.pid = C.pid AND P.color =’red’

SELECT S.sid, S.sname

FROM Suppliers S, Parts P, Catalog C

WHERE S.sid = C.sid AND P.pid = C.pid AND P.pname =’bolt’ AND C.cost < 100

UNION

SELECT T.sid, T.sname

FROM Suppliers T, Parts P, Catalog C

WHERE T.sid = C.sid AND P.pid = C.pid AND P.pname =’bolt’ AND P.color = ’red’

(d) Find the sids of suppliers who supply all parts.

RA: sid((sid,pid(Catalog))/(pid(Parts))

SQL:

SELECT C.sid

FROM Catalog C

WHERE NOT EXISTS (( SELECT P.pid

FROM Parts P )

EXCEPT

(SELECT C1.pid

FROM Catalog C1

WHERE C1.sid = C.sid ))

(e) Find pids of parts supplied by at least two differentsuppliers

RA: (CatPairs(1 !sid1, 2 !pid1, 3 !cost1, 4 !sid2, 5 !pid2, 6!cost2), Catalog×

Catalog)

pid1((pid1=pid2)^(sid16=sid2)CatPairs)

SQL:

SELECT P.pid

FROM Catalog P, Catalog C

WHERE P.pid = C.pid AND P.sid <> C.sid

(f) Find the names of suppliers who supply some brown part.

RA: sname(Suppliers on (color=0brown0(Parts) on Catalog))

SQL:

SELECT S.sname

FROM Suppliers S, Parts P, Catalog C

WHERE S.sid = C.sid AND P.pid = C.pid AND P.color =’brown’

(g) Find the sids of suppliers who supply some yellow part but nota red part.

RA: sid(Suppliers on (color=0yellow0(Parts) on Catalog))−

sid(Suppliers on (color=0red0(Parts) on Catalog))

SQL:

SELECT S.sid

FROM Suppliers S, Parts P, Catalog C

WHERE S.sid = C.sid AND P.pid = C.pid AND P.color =’yellow’

EXCEPT

SELECT T.sid

FROM Suppliers T, Parts P, Catalog C

WHERE T.sid = C.sid AND P.pid = C.pid AND P.color =’red’

(h) Find the sids and snames of suppliers who supply a’nut’ whose price is under 10 dollars

or whose color is pink.

There is ambiguity here too. Some of you interpret the question asa nut whose price is

under 10 dollars or a nut whose color is pink. Some of youinterpret it as a nut whose

price is under 10 dollars and a part whose color is pink. Bothversions are treated as

correct answers.

RA: sid,sname(Suppliers on((pname=0nut0^cost<10)_(color=0pink0)(Parts onCatalog)))

RA: sid,sname(Suppliers on((pname=0nut0^(cost<10_color=0pink0))(Parts onCatalog)))

SQL:

SELECT S.sid, S.sname

FROM Suppliers S, Parts P, Catalog C

WHERE S.sid = C.sid AND P.pid = C.pid AND P.pname =’nut’ AND C.cost < 10

UNION

SELECT T.sid, T.sname

FROM Suppliers T, Parts P, Catalog C

WHERE T.sid = C.sid AND P.pid = C.pid AND P.color =’pink’

SELECT S.sid, S.sname

FROM Suppliers S, Parts P, Catalog C

WHERE S.sid = C.sid AND P.pid = C.pid AND P.pname =’nut’ AND C.cost < 10

UNION

SELECT T.sid, T.sname

FROM Suppliers T, Parts P, Catalog C

WHERE T.sid = C.sid AND P.pid = C.pid AND P.pname =’nut’ AND P.color = ’pink

You might be interested in
Two basic types of mechanical fuel injector systems?​
REY [17]

Answer:

Single-point or throttle body injection. Port or multipoint fuel injection.

4 0
3 years ago
Read 2 more answers
The yield strength of mild steel is 150 MPa for an average grain diameter of 0.038 mm ; yield strength is 250 MPa for average gr
djyliett [7]

Answer:

Explanation:

Hall-Petch equation provides direct relations between the strength of the material and the grain size:

σ=σ0+k/√d , where d- grain size, σ- strength for the given gran size, σ0 and k are the equation constants.

As in this problem, we don't know the constants of the equation, but we know two properties of the material, we are able to find them from the system of equations:

σ1=σ0+k/√d1

σ2=σ0+k/√d2 , where 1 and 2 represent 150MPa and 250MPa strength of the steel.

Note, that for the given problem, there is no need to convert units to SI, as constants can have any units, which are convenient for us.

From the system of equations calculations, we can find constant: σ0=55.196 MPa, k=18.48 MPa*mm^(0.5)

Now we are able to calculate strength for the grain diameter of 0.004 mm:

σ=55.196+18.48/(√0.004)=347.39 MPa

The strength of the steel with the grais size of 0.004 mm is 347.39 MPa.

6 0
4 years ago
Pin supports, such as that at A, may have horizontal and vertical components to the support reaction. Roller supports, such as t
aliya0001 [1]

Answer:

hello your question is incomplete below is the missing part of the question and attached is the missing diagram

In the simply-supported beam shown in the figure below, d1=14 ft, d2=7 ft, and F=15 kips. so find Az, Ay, By.(in kips)

answer :

Reaction force at B = 10 kips

Reaction force in the y axis = 5 kips

Reaction force in the Z direction = 0 kips

Explanation:

Taking moment about point A

∑ Ma = 0

By + ( d1 + d2 ) - F*d1 = 0

By ( reaction force at B ) = ( 15 * 14 ) / ( 21 ) =  10 kips

Applying equilibrium  forces in the Y-axis

∑ Fy = 0

Ay - F + By = 0

where : F = 15, By = 10

hence ; Ay = 5 kips

applying equilibrium forces in the Z-direction

∑ Fz = 0

Az = 0 kips

6 0
3 years ago
A piston–cylinder assembly contains 5 kg of air, initially at 2.0 bar, 30 C. The air undergoes a process to a state where the pr
Ainat [17]

Answer: wor done is 145. 06kJ

Heat transfer is 135.53kJ

Explanation:

No of moles of air = mass/molar mass = 5000g/28gmol^-1 = 172.65mol

P1 = 2bar =2*101300 =202600pa

T1 = 30° +273k = 303k

P2 =p1 = 202600pa

V2 =? T2 =?

Using pV = nRT

R = 8.314 PA m^3 mol^-1 k^-1

V1 = (172.65*8.314*303)/202600

V1 = 2.146m^3

For second state, 1.5pv = const = P1V1

V2 = (202600*2.146)/(1.5*202600)

V2 = 1.43m^3

Volume change = 2.146 - 1.43 =0.715m^3

Word done = pressure* volume change

W = 202600*0.716 = 145061.6J

= 145.061kJ

Using V1/T1 = V2/T2

T2 = V2T1/V1

=(1.43*303)/2.146 = 201.9k

For internal energy U

U = nCv*(T2 - T1)

*CV is the heat capacity at const. vol approximately 0.718J mol^-1 k^-1

U = 172.65*0.718*(201.9-303)

U = -12532.6J = -12.532kJ

The -ve means the system lost internal energy.

Q = U+W = total heat energy of system

Q = - 12.532+145.061 = 132.52 kJ

7 0
4 years ago
Three parallel three-phase loads are supplied from a 480V (line-line RMS), 60 Hz three-phase supply. The loads are as follows: L
Travka [436]

Answer:

The total system active power P = P_1 + P_2 + P_3 = 34.91 KW

Explanation:

Load 1: Active power P_1 = 20 HP = 14.91kW;

Reactive power Q1 = P tan(\phi)

                               = 14.91\times tan(cos^{-}0.8) = 11.18 kvar&#10;

Load 2: Active power P_2 = 20 kW;

Reactive power Q2 = 0 since the load is purely resistive.

Load 3: Active power P_3 = 0 due to purely capacitiveload

           Reactive power Q_3 = -20 Var

a) since all three loads are connected in parallel therefore

    The total system active power P = P_1 + P_2 + P_3 = 34.91 KW

Total system reactive power Q = Q_1 + Q_2 + Q_3 = 11.18 + 0 -20 = -8.82 kVar

Since Q = 0, the power factor is unity.

Supply current per phase is given by

I = \frac{P}{\sqrt{3}V_{L}}

= \frac{34910}{\sqrt{3}\times 480} = 41.99 A

5 0
3 years ago
Other questions:
  • A cylindrical hot water storage tank (see sketch) for a set of collectors is located in the basement of a dwelling. The tank is
    13·1 answer
  • For all substances, Cp&gt;C. Why is that?
    15·1 answer
  • The quotient of 300 and the sum of b and 24
    9·1 answer
  • 1. Asphyxiation is a hazard posed by Compressed Natural Gas (CNG) vehicles and can be detected when you notice
    7·1 answer
  • Differentiate between isohyetal method and arithmetical average method of rainfall​
    10·1 answer
  • What is the most common type of suspensions system used on body over frame vehicles?
    15·1 answer
  • Given a manhole with the outlet invert elevation of 2605. A run of 48 inch pipe connects to the next manhole at an invert elevat
    8·1 answer
  • The product of two factors is 4,500. If one of the factors is 90, which is the other factor?
    15·1 answer
  • 12 inches is equivalent to_ foot.<br><br>A. 1<br>B. 12<br>C. 24<br>D. 36<br>​
    14·1 answer
  • 4. A banking system provides users with several services:
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!