
Concept explainers
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
) .
![Question 1:
[Marks: =20]
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 xproducts 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?
{nut, bolt} 4 price
ii. dom(price > 1...15).
iii. ng(price > 1...10).
i.
iv. dom(supplies; (in_stock > {0})).
price e {(hanger,5), (screw, 7)}
vi. dom(supplies:(price> 5...25)).
vii. supplies (| {Rogers, Wilson} |).
V.
viii.
((supplies; price) > 1..15) ({Robinson, Rogers} |).
ix.
{Thomas} < supplies.
(in_stock> {0}) ({nut, bolt} |) .
х.](https://content.bartleby.com/qna-images/question/cc191746-8a0e-40d3-8810-7ee0644a2947/7e855e65-710c-4b35-a7df-691d170fba19/whyc7qc_thumbnail.png)

Step by stepSolved in 2 steps with 1 images

- Consider the following two tables in a banking database application. Account = {AccNumber, Type, Balance} Customer={CustID, FirstName, LastName, Address, AccNumber} An account type could be saving or checking. The meaning of the other attributes used should be clear. (a). Identify a suitable domain for each attribute. (b). For each relation, give a possible instance with at least 3 tuples. (c). Identify at least 3 problems with the design of this database and propose an equivalent database schema (i.e., having the same information content) but does not suffer from these problems. Describe your new design using the E/R notation.arrow_forwardASSESSMENT 02 1. You are required to design and implement a database system for a pharmacy shop with only one branch. The following is the description from the manager, Mr. Seth Akoto. "here, medicines that require prescriptions are sold only to people that have prescriptions. It is the pharmacy attendant that serves customers when they enter the pharmacy. Usually, people walk in and either give the prescription or mention the medicine they wish to purchase. The worker then searches to see if the medicine is in stock. If in stock, worker accepts payment from customer and gives the medicine and a receipt to the customer.“ 1. Determine all the entities from the description given by Mr. Akoto. 2. Assuming Mr. Akoto only wants a database system that would keep records of medicine{name of medicine, amount in grams in stock} and purchases{medicine bought, amount in grams bought, who attended to customer, when it was sold, contact and name of customer that bought the medicine} a. Draw and ER…arrow_forwardSuppose we have a database for an university. The requirements are as follows: • Professors have an SSN, a name, an age, a rank, and a research specialty. • Projects have a project number, a sponsor name (e.g., NSF), a starting date, an ending date, and a budget. • Graduate students have an SSN, a name, an age, and a degree program (e.g., M.S. or Ph.D.). • Each project is managed by one professor (known as the project’s principal investigator). • Each project is worked on by one or more professors (known as the project’s co-investigators). • Professors can manage and/or work on multiple projects. • Each project is worked on by one or more graduate students (known as the project’s research assistants). • When graduate students work on a project, a professor must supervise their work on the project. Graduate students can work on multiple projects, in which case they will have a (potentially different) supervisor for each one. The FDs for the above requirements are given as, • PSSN →…arrow_forward
- Consider the following database scheme Employee (SSN, fname, lname, salary, deptno) Department (deptno, dname, total_salary) Where total salary is a derived attribute that represents the total salary of employees working in a specific department. Write a trigger to compute the total_salary in the event of inserting one or more new employee record(s) in the employee table.arrow_forwardSuppose a single relation (table) is used to record the information about students’ enrollment in courses. We assume that each student may enroll in more than one course and one course is assigned to one instructor. All questions below are based on the following ENROLLMENT unnormalized table. ENROLLMENT StudentID StuName CourseCode CourseName Grade CreditHr Instructor InstrOffice 1021234 Ali 1102 1201 Database Internet A B 3 3 Zaid Sumaiya 5.01 5.05 1024131 Amina 1201 1401 Internet Operating System C B 3 3 Sumaiya Abdullah 5.05 5.10 1. What would be the First Normal Form (1NF) relation? Identify the primary key. 2. Identify the functional dependencies represented by the attributes shown in the ENROLLMENT table. Label partial or transitive dependency where applicable.arrow_forwardConsider that a database contains the following relations PARENT(X, Y), and a relation BIRTH(X, B), where B is the birthdate of a person X. The following information is used for question (b), (c) that we have the following family treearrow_forward
- Let R₁ and R₂ be the relations on X={a,b,c}, R₁={ (b,a), (c,b), (a,c) } R₂={ (a,c), (b,c)} R₁-¹= R₂ ° R₁=arrow_forwardPlease create an ER Diagram for the sports case study. I have also uploaded a sample ER Diagram so please take a look at that as well.arrow_forwardA relation FarmVisit is defined below with attributes in the table headings. FarmVisit visitorID visitorName date farmID farmName t1 H001 John 1 Feb 2021 A10 Green Field t2 Н005 Ashley 1 Jan 2021 A10 Green Field t3 но05 Ashley 1 Feb 2021 A10 Green Field t4 H005 Ashley 15 Apr 2021 H02 Есо t5 Но06 Ashley 15 Apr 2021 A11 Green Field a) Write down examples of tuples (i.e., tl, t2) to show neither of the following is a functional dependency: (i) visitorID -> date (ii) date -> farmID b) Write down the functional dependency (FDs) using the above data, which can represent all possible data. The FDs should be non-trivial and the determinants of the FDs should contain minimal number of attributes required. c) Using the tuples given, can (visitorID, farmID) be the primary key of FarmVisit? Explain why. d) What the highest normal form by which the FarmVisit relation can be classified? Explain why.arrow_forward
- What is the link between the main key of a relation and the functional connections between all of its attributes?arrow_forwardChange the Class Diagram to have (Generalization, Aggregation, Composition, Association and multiplicity) relations.arrow_forwardBy adding a time characteristic, a relation may be turned into a temporal relation, but will the functional linkages be preserved? How is this issue addressed in a database that tracks time periods?arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education





