Sunteți pe pagina 1din 4

Tsai Shen Wu P.

“Gogoroll” which is a small-scale company around 50 employees selling electric scooter


to the customers in the U.S. through various sales channels. In this database, I want to focus on
the sales department. This department is charge of choosing sales channels, analyze sales data,
checking stock and knowing the information of products. We need this database to select the
information of our products, see the profits of its salesperson and let retailer can know the stock
status immediately.

Entities and attributes

PRODUCTS This table is to store the information about products (electric scooters).
PRO_NAME the name of product.
PRO_ID the primary key of this table. Every product has a unique ID.
PRO _SALES_ID The ID of responsible sale.
PRO_SPEED the maximum speed of scooter.
PRO_BATTERY the capacity of battery.
PRO_PRICE the price of product.

STOCK This table is to store the stock statue of products.


STOCK_PRO_ID the ID of product.
STOCK_QTY the quantity of products in the stock
STOCK_LOC the specific location of product

RET_PRO This table is a bridge between retail and product


PRO_ID the ID of product.
RET_ID The ID of retail

RETAILER This table is to store retailers’ information and sales information.


RET_NAME the name of retailer.
RET_SALES_ID The ID of responsible sale.
RET_ID the ID of retailer.
RET _PRICE the product’ price of retailer.
RET_QTY the quantity of products gives to retailer.

SALES This table is to record the sales information, performance and retailer
SALES_ID the employee ID of salesperson.
SALES_FNAME the first name of salesperson.
SALES _LNAME the last name of salesperson.
SALES_REVENUE the revenue each salesperson on each retailer.
Tsai Shen Wu P.2

Business rules
Each salesperson in charge of one to many retailers(1,N) , each retailer only belongs to one
salesperson(1,1). This relationship is 1: M. Because of business rules. It is a week relationship,
because salesperson need retailer to sell the products. The relationship is mandatory on the
“many” side because business rules say that every salesperson need have at least “one” retailer. It
is mandatory on the one side because business rules say that every retailer “must” belong to a
salesperson.

Each salesperson in charge of one to many products(1,N) , each product only belongs to one
salesperson (1,1). This relationship is 1: M. Because of business rules. It is a week relationship,
salesperson can take many products to retailer. The relationship is mandatory on the “many” side
because business rules say that every salesperson need have at least “one” product. It is
mandatory on the one side because business rules say that every product “must” belong to a
salesperson.

Many products can be stored in same warehouse(0,N). we can have nothing in warehouse. One
warehouse can store many products (1,1). We only have one warehouse. This relationship is
1: M. Also, these two tables are strong relationship. warehouse is for storing products. If product
table remove. We also don’t need warehouse. The relationship is potional on the “many” side
because business rules say that every warehouse can have no product. It is mandatory on the one
side because business rules say that every product “must” belong to a warehouse.

Many retailers can sell one to many kinds of products(1,N) , one type of product can be sold by
many retailers(1,N). This relationship is M:M, because both entities can have 1 to more another
entity. I use a bridge table to connect these two entities. So, the bridge side is (1,N) and the other
side on both is (1,1). The relationship is required on the both “many” side because business rules
say that every retailer need have at least “one” product and every retailer “must” belong to at
least one salesperson.

Product is a supertype, because we can have subtype E-scooter and hoverboard. E-scooter have
the two distinctive attributes, the material of frame and the size of tires. Hoverboard have an
attribute of balance system. Because one supertype can have 0 to Many subtype, each subtype
can only have one supertype. Therefore, the relationship between supertype and two subtype is
1: M.
Tsai Shen Wu P.3

Relation ER

User

Internal USER Description


CEO CEO has the authority to see every table. Typically, we
use an ERP to produce visualized reports.
Salesperson Salesperson can see almost everything. But in sales
table. A salesperson only can see his revenue.
external retailer Retailer can through a web service to connect to
database to see stock statue.

DBMS architecture
In this case, I will prefer to use the 3-tier DBMS architecture. Because most of our users is not an
engineer. They need a graphical interface to see the data. This architecture has a GUI layer,
which provide a graphical user interface for the end of users to interact with DBMS.
Also, we have application layer which can do the various operations programmatically on the
DBMS. The application layer transfers the user’s request to SQL language. I think this
architecture is safer to database administrator. External software can’t see your database directly.
We can decide what data we want to show for users. For users, a graphical interface is easier to
Tsai Shen Wu P.2

operate a database without SQL language. Users don’t need to know the application layer and the
DBMS system.

S-ar putea să vă placă și