Database systems 1.) (25 POINTS) Assume that you are hired to design an automate
ID: 3891325 • Letter: D
Question
Database systems
1.) (25 POINTS) Assume that you are hired to design an automated system for a florist which currently uses a manual system to perform business. For the florist, there are three storage components with the following details: Flower component that with properties ItemID, ItemName, NumberOfltems, UnitPrice, Date brought in to the florist, and the maximumLifeTime of the flower. - Price component to store the ItemID and the corresponding price for this item, where item is a flower Sales component with properties ItemID, NumberOfltemsSold, and the Unit Price. The florist uses these storage units to maintain its inventory, and also calculate its daily income. 1.A.) (I0 POINTS) How would you design an automated system for this florist by using files only for a simple programming language? Please explain your design in detail (what type of programming components - structures, variables, data types, etc. - you will use, what programming language you would choose, why, etc.) 1.B.) (I0 POINTS) How would you design an automated system for this florist by using a database? Please describe your relational model, i.e. tables, attributes, data types, and relational database constraints. 1.C.) (5 POINTS) Compare your design in A and B and specify which one is a better design and why.Explanation / Answer
If you have any doubts, please give me comment...
1A) I will choose C++, because it is object oriented programming language, In this we can define structures for storing data and We will use dynamic memory allocation for storing data.
struct Flower{
int ItemID;
string itermName;
int numberOfItems;
double unitPrice;
string dateBrough;
int maximum_life_time;
};
struct Price{
int ItemID;
doubel price;
};
struct Sales{
int ItemID;
int numberOfItemsSold;
double unitPrice;
};
1B)
Flower(ItemID, itermName, numberOfItems, unitPrice, dateBrough, maximum_life_time);
Price(ItemID, price);
Sales(ItemID, numberOfItemsSold, unitPrice);
1C)
Comparing both storing of data using relational database. It has key Indexes to search data easily and security.
2)
Staff(staffLastname, streetNo, street, city, zip);
Primary Key: staffLastname
WorksAt(staffLastname, branchName, hourlyPaid, monthlyPaid, salary);
Primary key: staffLastname, branchName, it is composite key. staffLastname foregin key references Staff, branchName foreign key references Branch
Branch(branchName, city);
Primary key: branchName
3)
A) Find students who are enrolled after year of 2016.
B) Find sid, cid, fname, lname of the student who are enrolled;
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.