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
A murder in a downtown office building has been widely publicized. You’re a police detective and receive a phone call from a dig
BaLLatris [955]

Answer:

Considering the plain view doctrine, which is an exception to the warrant requirement of the Fourth Amendment, is applied by law enforcement officers and courts who can seize evidence of a crime without a warrant, if the officer observes the evidence in plain view.

Explanation:

For any digital information related to a murder case that has been seized under the plain view doctrine to be used to convict you of a crime, has to comply with three conditions:

1.  The digital evidence must be in out in the open, and easily observable by the officer, this is what "plain view" refers to.

2. The officer must have a legal right to be where he got the information related to the case.

3. The 'incriminating' character of the information must be a clear hint of the murder to fall under the plain view doctrine and the officer´s experience will help him determining whether the information is evidence or not, upon probable cause related to a crime.

7 0
3 years ago
Read 2 more answers
Air, at a free-stream temperature of 27.0°C and a pressure of 1.00 atm, flows over the top surface of a flat plate in parallel f
Morgarella [4.7K]

Answer:

Explanation:

Given that:

V = 12.5m/s

L= 2.70m

b= 0.65m

T_{ \infty} = 27^0C= 273+27 = 300K

T_s= 127^0C = (127+273)= 400K

P = 1atm

Film temperature

T_f = \frac{T_s + T_{\infty}}{2} \\\\=\frac{400+300}{2} \\\\=350K

dynamic viscosity =

\mu =20.9096\times 10^{-6} m^2/sec

density = 0.9946kg/m³

Pr = 0.708564

K= 229.7984 * 10⁻³w/mk

Reynolds number,

Re = \frac{SUD}{\mu} =\frac{\ SUl}{\mu}

=\frac{0.9946 \times 12.5\times 2.7}{20.9096\times 10^-^6} \\\\Re=1605375.043

we have,

Nu=\frac{hL}{k} =0.037Re^{4/5}Pr^{1/3}\\\\\frac{h\times2.7}{29.79\times 10^-63} =0.037(1605375.043)^{4/5}(0.7085)^{1/3}\\\\h=33.53w/m^2k

we have,

heat transfer rate from top plate

\theta _1 =hA(T_s-T_{\infty})\\\\A=Lb\\\\=2.7*0.655\\\\ \theta_1=33.53*2.7*0.65(127/27)\\\\ \theta_1=5884.51w

7 0
3 years ago
A paper clip is made of wire 0.75 mm in diameter. If the original material from which the wire is made is a rod 25 mm in diamete
Bas_tet [7]

Answer:

True strain = 3.7704

Explanation:

Strain is the measure an object that is stretched or deformed. This occurs when a force is applied to an object. Strain deals mostly with the change in length of the object. Strain = Δ L /L = Change in Length over the original Length:

Volume Constancy :

ΔL/L0=A0/ΔA=(D0/ ΔD)=(25mm/0.75mm)^2

ΔL/L0=44.4

Engineering strain:

Engineering strain =ΔL-L0/L0=ΔL/L0-1

Engineering strain =44.4-1=43.4

True strain, ε=In(ΔL/L0)=In(43.4)=3.7704

Note that strain has no unit, so the True strain = 3.7704

8 0
4 years ago
1.0•10^-10 standard form
Drupady [299]

Answer:

1.0 * 10^{-10} = 0.0000000001

Explanation:

Given

1.0 * 10^{-10}

Required

Convert to standard form

1.0 * 10^{-10}

From laws of indices

a^{-x} = \frac{1}{a^x}

So, 1.0 * 10^{-10} is equivalent to

1.0 * 10^{-10} = 1.0 * \frac{1}{10^{10}}

1.0 * 10^{-10} = 1.0 * \frac{1}{10}* \frac{1}{10}* \frac{1}{10}* \frac{1}{10}* \frac{1}{10}* \frac{1}{10}* \frac{1}{10}* \frac{1}{10}* \frac{1}{10}* \frac{1}{10}

1.0 * 10^{-10} = 1.0 * \frac{1}{10000000000}

1.0 * 10^{-10} = 1.0 * 0.0000000001

1.0 * 10^{-10} = 0.0000000001

Hence, the standard form of 1.0 * 10^{-10} is 0.0000000001

3 0
3 years ago
University administrators have developed a Markov model to simulate graduation rates at their school. Students might drop out, r
abruzzese [7]

Solution :

The percentage of the students who have a chance of repeating their current year = 3%

The drop out students for the first year and the sophomores = 6%

Drop out rate of first year and the seniors = 4%

Now for the state space :

S = { first year(1), sophomores(2), juniors(3), seniors(4), graduates(G), Dropouts(D) }

Therefore

the first year students are indicated as '1'

Sophomores are indicated as '2'

Juniors are indicated as '3'

Seniors are indicated as '4

Graduates are indicated as 'G'

Dropouts are indicated as 'D'

The transition diagram is attached below.

The probability of the students who have the chance of repeating their current year = 3/100 = 0.03

Probability of first year dropouts and sophomores = 6/100 = 0.06

Probability of dropout rate of juniors and seniors = 4/100 = 0.04

Therefore, the probability matrix can be made as :

              1        2        3        4       G        D

    \begin{matrix}1\\ 2\\ 3\\ 4\\ G\\ D\end{matrix}      \begin{bmatrix}0.03 & 0.91 & 0 & 0 & 0 & 0.06\\  0& 0.03 & 0.91 & 0 & 0 & 0.06\\  0& 0 & 0.03 & 0.93 & 0 & 0.04\\  0& 0 & 0 & 0.03 & 0.93 & 0.04\\  0& 0 & 0 & 0 & 1 & 0\\  0& 0 & 0 & 0 & 0 & 1\end{bmatrix}  

Here, G represents 'graduates' and D represents 'Dropouts.'

5 0
3 years ago
Other questions:
  • Natural-draft furnaces are no longer available for new installations because they are _____.
    5·1 answer
  • The increasing interconnections of peoples and countries around the world is known as ________.
    14·2 answers
  • If you owned a business, what are some of the ways you could follow green computing recommendations with regards to recycling an
    13·1 answer
  • Hot liquid is flowing in a steel pipe with an inner diameter of D, = 22 mm and an outer diameter of D2 = 27 mm. The inner surfac
    10·1 answer
  • I really don't understand this please help!!!
    15·1 answer
  • Sewage is being treated in two aerated lagoons in series. Each lagoon has a surface area of 5 hectares (ha) and depth of 1 m, an
    12·1 answer
  • When an object is plumb, it is _____.
    11·2 answers
  • What factors affect the temperature when vapor condenses
    12·1 answer
  • Technician A says the compressor is the dividing line of the refrigeration system, low- to high-side. Technician B says the expa
    6·1 answer
  • When driving we use what type of vision
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!