diff --git a/BDL.xml b/BDL.xml new file mode 100755 index 0000000..4db2361 --- /dev/null +++ b/BDL.xml @@ -0,0 +1,590 @@ + + + + +
+ + System specification and details + +

Better Digital, Ltd. (BDL) is a large U.S. company that produces a wide range of consumer electronics devices such as radios, stereo components, digital clocks, universal remotes, etc., which they sell in bulk to various retailers. The company has branches in several major U.S. cities, and employs about 9000 staff across six departments: Central Management, Sales Marketing, Personnel, Manufacturing, Inventory and Accounts.

+ +

BDL are currently designing and implementing a new corporate database that will be located at the company headquarters in Los Angeles. The requirements analysis phase of the project is almost complete, and you have been brought in as a lead database developer. It will be your task to implement an initial prototype of the specification resulting from the requirements analysis phase. An ERD of the proposed database is shown in , and more detailed specifications of the database requirements may be found in the following sections.

+ + +
+ ERD of Better Digital’s database (Barker notation) + + ERD of Better Digital’s database (Barker notation) + +
+ + +
+ + The <tt>Staff</tt> entity + + + + + + + + + + + + Column + Description + + + + + Staff_ID + Internally generated 7 digit identifier + + + * + Surname + Up to 50 characters + + + * + Firstnames + Up to 50 characters + + + * + Phone + (see below) + + + * + Address + Up to 150 characters + + + * + Department + (see below) + + + * + Position + (see below) + + + * + Salary + Monetary, 1000.0099999.99 + + + o + Comments + Arbitrary text + + + + + + + + As noted above, BDL has about 9000 employees. The usual details such as name, address and phone number will be recorded. The phone number must cater for both (U.S.) landline and mobile numbers. + + There are six possible departments, as follows: Central Management, Sales Marketing, Personnel, Manufacturing, Inventory and Accounts. + + There are twenty possible employee positions, as + follows: CEO, CTO, CFO, CIO, Director, President, Vice-President, Manager, Personal Assistant, Secretary, Technician, Researcher, Designer, Assembler, Programmer, Contractor, Sales Representative, Accountant, Inventory and Assistant. + + Salary values are monthly. + + + +
+ + +
+ + The <tt>Customer</tt> entity + + + + + + + + + + Customer + + + + + Column + Description + + + + + Customer_ID + Internally generated 7 digit identifier + + + * + Name + Up to 50 characters + + + o + Contact_Person + Up to 50 characters + + + * + Phone + (see below) + + + * + Address + Up to 200 characters + + + o + Email + Up to 50 characters + + + o + Comments + Arbitrary text + + + + + + + +

BDL’s customers are retail outlets of various sizes. BDL currently has about 400000 customers on its books, increasing by about 10000 per year. The usual details will be recorded for each customer: name, address, phone and optionally the name of a contact person and an email address. The phone number must cater for full international numbers, as many of BDL’s customers are based outside the U.S.

+ +
+ + +
+ + The <tt>Supplier</tt> entity + + + + + + + + + + Supplier + + + + + Supplier_ID + Internally generated 7 digit identifier + + + * + Name + Up to 50 characters + + + o + Contact_Person + Up to 50 characters + + + * + Phone + (see description for Customer entity) + + + * + Address + Up to 200 characters + + + o + Email + Up to 50 characters + + + o + Comments + Arbitrary text + + + + + + + +

BDL orders components from a small group of trusted suppliers (of which there are currently thirty-three). Many of these suppliers overlap in the components that they supply, thus enabling BDL to take advantage of special deals, and providing alternative sources for components. BDL normally buys components from the supplier offering the best deal at the time of ordering (pricing data will not be stored in the database because they change too frequently). The details to be recorded for suppliers are identical to those for customers.

+ +
+ + +
+ + The <tt>Product</tt> entity + + + + + + + + + + + + Column + Description + + + + + Product_Code + Internally generated 8 digit identifier + + + * + Description + Up to 50 characters + + + * + Stock_Count + Number of units in stock, 099999 + + + o + Restock_Level + Number of units to restock to, 099999 (see below) + + + o + Minimum_Level + Threshold at which restocking occurs (see below) + + + * + List_Price + Monetary, 0.0099999.99 + + + o + Assembly_Manual + Assembly instructions in PDF format + + + o + Assembly_Program + Compiled Java class for assembly line + + + + + + + + BDL currently manufactures 16492 different products, which are assembled from various components (resistors, capacitors, controller chips, power supplies, cases, etc.). BDL can manufacture products on demand in response to a sale, but they also produce an ongoing supply of the most popular products. These are stored in a warehouse and used to fulfil sales. + + Popular products have a restock and a minimum stock level. If the stock count for a product falls below the minimum level, an alert is raised by the inventory management application to Inventory staff, who then request Manufacturing to make more of the product. Manufacturing then produce enough units to bring the number in stock back up to at least the restock level (the smallest possible production run is fifty units). The minimum level must therefore be smaller than the restock level; it may be zero. + + The database will contain the assembly instructions for each product, where applicable. The Assembly_Manual column will contain a PDF detailing the assembly procedure for each product in human-readable form. These PDFs will average about 150 KB each. The Assembly_Program column will contain a compiled Java class file that can be downloaded from the database and used to control one of BDL’s fifty automated assembly lines. These files will average about 50 KB each. + + + +
+ + +
+ + The <tt>Component</tt> entity + + + + + + + + + + + + Column + Description + + + + + Component_Code + Internally generated 8 digit identifier + + + + Suppliers_Code + Up to 25 character identifier provided by supplier + + + * + Description + Up to 100 characters + + + * + Stock_Count + Number of units in stock, 09999999 + + + + + + + + Components are ordered from suppliers and used to assemble products. BDL currently uses about 120000 different components. While BDL always has some components in stock, it usually works on a just-in-time ordering system, where components are ordered shortly before they are actually required. This means that there will be frequent small orders to suppliers for components. + + The same component may be used in many different products, and multiple times in the same product. + + The same component is often provided by more than one supplier. For example, 35 ohm resistor might be available from thirteen different suppliers, at varying prices (pricing data will not be stored in the database because they change too frequently). Although it leads to duplication of component descriptions, BDL have decided for practical reasons to individually store details of each component from each supplier (so in the example above, 35 ohm resistor would appear thirteen times). + + Since BDL has no control over how suppliers identify their components, different suppliers may sometimes use the same component codes for different components. For example, Western Electronics may use the code BC882719 for 35 ohm resistors, whereas Eastern Electrical Supplies may use the same code for large red LEDs. + + + +
+ + +
+ + The <tt>Assembly</tt> entity + + + + + + + + + + + + Column + Description + + + + * + Quantity + Number of units of this component used, 1–9999 + + + + + + + + Each product can be made from at least two up to hundreds of distinct components. Some components (e.g., transistors) occur many times in the same product. + +
+ + +
+ + The <tt>Sale<underscore />head</tt> and <tt>Sale<underscore />line</tt> entities + + + + + + + + + + Salehead + + + + + Column + Description + + + + + Sale_Num + Internally generated 10 digit identifier + + + * + Sale_Date + Date and time of sale (cannot be in future) + + + * + Status + Current status of sale (see below) + + + o + Comments + Arbitrary text + + + + + + + + + + + + + + Saleline + + + + + Column + Description + + + + * + Quantity + Number of units of a product sold, up to 9999 + + + * + Actual_Price + Unit sale price, 0.0099999.99 + + + + + + + + On a typical working day, BDL makes about seven thousand sales. Each sale is typically for some quantity (possibly several thousand) of each of about seven to ten different products. For example, a customer might buy twenty-three remote garage door openers and two burglar alarm systems in the same sale. + + Products may sell for a different (usually lower) price from that listed (e.g., bulk discounts, cash payments, etc.). + + The status of a sale must be one of the following: pending, in progress, cancelled, backordered or shipped. + + + +
+ + +
+ + The <tt>Order<underscore />head</tt> and <tt>Order<underscore />line</tt> entities + + + + + + + + + + Orderhead + + + + + Column + Description + + + + + Order_Num + Internally generated 10 digit identifier + + + * + Order_Date + Date and time of order (cannot be in future) + + + * + Due_Date + Date that final shipment is due (after Order_Date) + + + * + Status + Current status of order (see below) + + + o + Comments + Arbitrary text + + + + + + + + + + + + + + Orderline + + + + + Column + Description + + + + * + Qty_Ordered + Number units of a component ordered, up to 99999 + + + * + Price + Unit price (see below) + + + * + Qty_Received + Number of components received (see below) + + + + + + + + BDL places an average of about 320 orders to suppliers per working day. Each order is typically for some quantity (possibly tens of thousands) of each of about fifteen to twenty different components. + + Since pricing data will not be stored with the actual component data, the unit prices paid for components must be recorded on the order. Prices are in the range 0.009999.99. + + Components arrive in shipments from a supplier, which may or may not correspond to the original order (for example, a single shipment might include components from several different orders to that supplier). When a shipment arrives, the Inventory staff need to note on the original order how many of each component they have received, so that they can determine when the order is complete (this happens when the number of components received is equal to the number of components ordered). This will also enable them to tell when they have received more components than they originally ordered. + + The status of an order must be one of the following: in progress or complete. + + + +
+ +
+ +