A database of application of wholesaler can be modelled by means of the relations price, in_stock and supplies. Price is a relation over products 1…30, which models the association between prices and stock items. In_stock is a relation over products N, which models the association between stock items and the current number in stock of product. Supplies is a relation over suppliers products which models the relation between a supplier and the product that is delivered by that supplier. If the current value of these relations are following: price = {(nut, 5), (bolt, 13), (screw, 3), (board, 25), (fastener, 23)}, in_stock = {(nut, 700), (bolt, 2200), (screw, 55), (board, 0), (fastener, 600)}, supplies = {(Thomas, nut), (Thomas, bolt), (Wilks, bolt), (Wilks, screw), (Wilks, board), (Wilks, fastener), (Rogers, board), (Rogers, fastener)}, then what is the value of the following expressions? i. {nut, bolt} price ii. dom(price 1…15). iii. rng(price 1…10). iv. dom(supplies; (in_stock {0})). v. price {(hanger, 5 ) , (screw, 7 ) } vi. dom(supplies;(price 5 … 2 5)). vii. supplies |{ | Rogers, Wilson} )( . viii. ((supplies; price) 1 … 1 5 ) | | Robinson, Rogers )( . ix. {Thomas } supplies. x. (in_stock {0} ) ( | |nut, bolt ) .
A
supplies. Price is a relation over products
1…30, which models the association between prices and
stock items. In_stock is a relation over products
N, which models the association between stock items
and the current number in stock of product. Supplies is a relation over suppliers
products which
models the relation between a supplier and the product that is delivered by that supplier. If the current
value of these relations are following:
price = {(nut, 5), (bolt, 13), (screw, 3), (board, 25), (fastener, 23)},
in_stock = {(nut, 700), (bolt, 2200), (screw, 55), (board, 0), (fastener, 600)},
supplies = {(Thomas, nut), (Thomas, bolt), (Wilks, bolt), (Wilks, screw), (Wilks, board), (Wilks,
fastener), (Rogers, board), (Rogers, fastener)},
then what is the value of the following expressions?
i. {nut, bolt} price
ii. dom(price 1…15).
iii. rng(price 1…10).
iv. dom(supplies; (in_stock {0})).
v. price
{(hanger,
5
)
, (screw,
7
)
}
vi. dom(supplies;(price
5
…
2
5)).
vii. supplies |{ | Rogers, Wilson} )(
.
viii. ((supplies; price)
1
…
1
5
)
| | Robinson, Rogers )(
.
ix.
{Thomas
} supplies.
x. (in_stock {0}
)
( | |nut, bolt
) .
Step by step
Solved in 2 steps with 1 images