Question

In: Computer Science

The owner of Horne Design Wallcoverings has hired you as a consultant to design a database...

The owner of Horne Design Wallcoverings has hired you as a consultant to design a database management system for his chain of three stores that sell wallpaper and accessories. He would like to track sales, customers and employees. After initial meeting with him, you have developed a list of business rules and specifications to begin the design of an E-R Model. The list of business rules are:

  • Customers place orders through a branch
  • A customer may place many orders
  • A Customer does not always have to order though the same branch all the time
  • Customers may have one or more accounts; although they may also have no accounts.
  • Customer may be a member or non member with Home Design Wallcoverings. As a member, the customer can get certain amount of discount.
  • Accounts related information need to be recorded such as balance, last payment date, last payment amount and accounts type
  • A branch may have many customers
  • A branch may sell all items or may only sell certain items
  • Orders are composed of one or more items
  • Items may be sold by one or more branches
  • An item can be composed of multiple items: for example a dining room wall covering set may consists of wallpaper and borders
  • Home Design Wallcoverings employs 54 employees
  • Each employee have one or more dependents
  • Employees can have one or more skills

Questions / Requirement:

You are required to design a database solution for the above case study by coming out with the following parts:

  1. Identify the entities and provides the possible attributes for each entity.
  2. Draw Enhanced Entity Relationship Diagram using either Crow’s Foot model. Specify primary keys and cardinality in your diagram.
  3. In cases where the above requirement specification is ambiguous, state clearly the assumptions which you made for justifying your modelling choices
  4. Create the tables identified from the above using SQL code (only need the codes to create the tables) – it’s fine even the tables are not go through normalization.

Solutions

Expert Solution

Entity - Entity is anything like place, person etc. which has attributes to describe them.

Entity and attributes for given scenario:

ER diagram using crow foot notation

Here primary keys are underlined for each entity.

Tables for given ER

/* Create a table called customer */
CREATE TABLE customer(cust_Id integer PRIMARY KEY, cust_name char(10),phone int);

/* Create a table called order */
CREATE TABLE order(ord_Id integer PRIMARY KEY,ord_date date, quantity int);

/* Create a table called employee */
CREATE TABLE employee(emp_Id integer PRIMARY KEY, emp_name char(10),skill char(20));

/* Create a table called homeDesign */
CREATE TABLE homeDesign(H_location char(20) );

/* Create a table called account */
CREATE TABLE account(a_Id integer PRIMARY KEY, a_type char(10),balance decimal, last_pay_date date);

/* Create a table called item */
CREATE TABLE item(item_id integer PRIMARY KEY, item_type char(10),price decimal, description char(50));


Related Solutions

You are hired to design a database for a fitness center. As the fitness center is...
You are hired to design a database for a fitness center. As the fitness center is expanding with more than one branch, they want to create a database to keep track of its customers, facilities and employees. Each branch has a unique id and address (building number, street, district, and city). A branch may have more than one facility (e.g. swimming pool, spa, etc.). Each facility must belong to only one branch, and the information for a facility is name...
You are an engineering consultant hired to verify an elevator design. The elevator mass is 500kg...
You are an engineering consultant hired to verify an elevator design. The elevator mass is 500kg and has a maximum occupant capacity of 800kg. Carbon steel cables with total cross sectional area of 64cm2 support the elevator. The maximum speed of the elevator is 2 meters per second. At the maximum speed, each cable extends at least 4 meters and cannot extend more than 22 meters, unstretched. When the car is not moving and the cables are extended by 22...
A firm has hired you as a consultant. This firm is perfectly competitive and has no...
A firm has hired you as a consultant. This firm is perfectly competitive and has no control over price. This firm is selling 10,000 units at a price of $3. Total costs are $40,000. Total variable costs are $35,000. They can produce another unit at a cost of about $3. What do you recommend? shut down continue to operate at a loss in the short run decrease quantity increase quantity
John has been hired to design an exciting carnival ride. Tiff, the carnival owner, has decided...
John has been hired to design an exciting carnival ride. Tiff, the carnival owner, has decided to create the world's greatest Ferris wheel. Tiff isn't into math; she simply has a vision and has told John these constraints on her dream: (i) the wheel should rotate counterclockwise with an angular speed of a = 13 RPM; (ii) the linear speed of a rider should be 200 mph; (iii) the lowest point on the ride should be c = 5 feet...
A firm has hired you as a consultant. This firm is not perfectly competitive--it has some...
A firm has hired you as a consultant. This firm is not perfectly competitive--it has some control over prices. This firm is currently selling 1000 units, generating $10,000 in revenues and $12000 in total costs. The marginal revenue is about $4, it costs them about $5 to make another unit. Per unit variable costs are about $5 per unit. Based on your analysis, what do you recommend? shutdown operate at a loss change nothing decrease price, increase quantity increase price,...
A firm has hired you as a consultant. Their only concern is to maximize profits. This...
A firm has hired you as a consultant. Their only concern is to maximize profits. This firm is in a perfectly competitive industry--they have no control over price. They give you the following information: We're selling 25 units at a price of $15 and at the end of the day we're currently earning a profit of $50. It costs us about $20 to produce another unit. Based on your analysis, what would you advise them to do?
A firm has hired you as a consultant. Their only concern is to maximize profits. This...
A firm has hired you as a consultant. Their only concern is to maximize profits. This firm is not in a perfectly competitive industry--they have some control over price. They give you the following information: We're selling 80 units at a price of $20 and at the end of the day we're currently earning revenues of $1600. Our costs are $2000. It costs us about $25 to produce another unit. Based on your analysis, what would you advise them to...
you are hired as the consultant to a monopolistically competitive firm
you are hired as the consultant to a monopolistically competitive firm. The firm reports the following information about its price, marginal cost, and average total cost. Can the firm possibly be maximizing profit? If the firm is profit maximizing, is the firm in a long-run equilibrium? If not, what will happen to restore long-run equilibrium? a. P < MC, P > ATC I would think that the firm can’t possible be maximizing profit. The firm should raise price, so that...
You are a consultant who has been hired to advise the manager of an international HRM...
You are a consultant who has been hired to advise the manager of an international HRM function, (based in London), that is considering setting up a new office in either Beijing, China or South Africa. You find out that the firm has been keen to expand its operations into emerging markets, but has little experience of foreign subsidiaries, and how to staff them. The manager tasked with developing the strategy has no international experience. Advise the company about the issues...
Database __________ which is the logical design of the database, and the database _______ which is...
Database __________ which is the logical design of the database, and the database _______ which is a snapshot of the data in the database at a given instant in time. a) Instance, Schema b) Relation, Schema c) Relation, Domain d) Schema, Instance
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT