This assessment focuses on the analysis of a case study of Merrill Hand Tools Ltd (MHT) and the development of an Entity Relationship (ER) diagram using top-down and bottom-up modelling approaches.
Contribute Materials
Your contribution can guide someone’s learning journey. Share your
documents today.
ER MODELLING
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.
TABLE OF CONTENTS INTRODUCTION...........................................................................................................................1 TASK A...........................................................................................................................................1 Analysis of Case study.................................................................................................................1 Top- down Modelling approach to produce Entity relationship Diagram (ER)..........................2 Bottom-Up modelling approach to identify Functional dependencies........................................3 Combination of both order and customer table...........................................................................6 ER diagram..................................................................................................................................9 TASK B.........................................................................................................................................11 Database used............................................................................................................................11 Table creation statement............................................................................................................11 Sample data of tables.................................................................................................................16 Data Dictionary information (primary keys, foreign keys, constraints)....................................19 SQL code for querying tables....................................................................................................22 CONCLUSION..............................................................................................................................33 REFERENCES..............................................................................................................................34
INTRODUCTION Entity relationship modelling also known as ER modelling is a kind of graphical approach which is used for designing a database (Hossain, Rajan and Schwitter, 2019). It is a high- level data model which is used for defining data elements and their relationship for a specified software system. It helps in explaining entity types and relationship between them. This assessment will lay emphasis upon a case study of Merrill Hand Tools Ltd (MHT) who have decided of undertaking major systems reengineering project. In this assessment two main task will be focused. First task will focus upon analysis of case study has been done, top- down modelling, bottom- up modelling and ER diagram has been developed. In second task Table creation statements, Data dictionary information, SQL code for querying tables, and justification of ER diagram and assumptions made. TASK A Analysis of Case study This case study is about Merrill Hand Tools Ltd (MHT) which is a family run business in Sheffield that manufacturers different range of hand tools from general tooling to specialist woodworking tools and agricultural implements. Currently they have three divisions: Product Development, Manufacturing, and Marketing and Sales and each of these divisions has a vice precedent who report to CEO. All the three divisions are facing some kinds of issues such as: programmer in manufacturing department can only fix superficial user interface issues and repair corrupted data files but he cannot be a part of original program development. Their current databasehasseveralproblemssuchlikelimittonumberofsimultaneoususers,data inconsistencies etc. Due to this, they have decided to undergo major systems reengineering project in which new information system division will be developed along with three existing systems. This new department will be led by Chief Information Officer who will hire Lead Programmer, a Database Administrator, and a Lead Analyst. CIO will be developing a data administration plan, roadmap that documents all application programs required for supporting corporate operations, developing and hosting a Web app, ER diagrams and data dictionaries, and will implement planned system. 1
Top- down Modelling approach to produce Entity relationship Diagram (ER) A top down approach is based on the process that can essentially breaking down of system to gain insight into its compositional sub-system in a reverse engineering fashion(Suraprajit, 2019). By using this model, it is basically describing the overview of system which are formulated without going into detail for any part. Each and every node that can refined into specified manner until the overall specification is detailed enough to validate model. Sometimes, it is breaking down of system in order to gain more insight into compositional sub system within reverse manner. Sometimes, it is completely formulated the entire system while specifying but not detail. As per considered the top down approach which become easier to manipulate the data. However, black box may fail due to clarifying the elementary mechanism or detailed enough in the realistic validate the model. This kind of top down approach is starts with big picture which breaks down from there into smaller segments. As per given scenario, top-down approach is consider as investment strategy that can select various industries and tries to achieve a balance in the investment portfolio. Through this approach, it is primarily analysing the risk by aggregating the certain impact of internal operational failure. it means that measure the variances in the economic variables that are explained by its current external macro-economic factors. Top down ER model- Figure1Top down Approach 2
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
On the basis of case study, it has been produced the tool in which identifying the procedures of Merill Hand tools manufacturing process. Top dowm Model relationship- Customer and customer order Each and every consumer may have rights to place the order Every order need to be placed by one consumers. Customer and Sales A potential client has been established the connection to one or more marketing or sales agent. Sales agent can help to manage one and many consumers. Manufacturing line and inventory An efficient manufacturing line will be producing one or many finished goods. Each finished goods which belongs to one and one manufacturing line per day Testing and Staff/HR Staff member can test one or many products Testing the products that can easily done by one or one staff members Raw material requirements and manufacturing line Each and every material requirement produce one to one items Manufacturing line requests for one to many in raw materials needs. Bottom-Up modelling approach to identify Functional dependencies Bottom- Up modelling is a kind of an Approach that helps in piecing a system together in order to give rise to more complex systems(Streicher and et.al., 2019). It helps in making sub system of existing system. It helps in linking large components that are linked together until complete system is formed. It can also be said that it helps in developing small seeds of the system that together helps in growing complete and complex projects together. Some of the main advantages of this modelling approach are: it helps in taking decision related to reusable low- level utilities for identifying ways in which these reusable low- level utilities can be put together for creation of high- level construct. This approach completely contrasts with top- down modelling. 3
Bottom Up modelling is used to resolve smaller problems so that it can be integrated as whole and complete solution. This modelling is also used to reduce redundancy using data encapsulation and data hiding. It helps in identifying functional dependencies within a project so that it can be completed without any issues in a project and appropriate manner. The normalization process from zero normal form to 3rd normal form for the bottom up model 0NF1NF 4
2NF 3NFSplit into smaller tables such as order and customer 5
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.
ER diagram Entity relationship diagram can be defied as a structure of database that helps in development of database in a proper and accurate manner(Ghosh and et. al., 2018). It can also be said that ER diagram is a blueprint of database using which database is developed in a proper and accurate manner. This diagram helps in identifying main entities and their attributes in a proper and effective manner. It further helps in explaining relationship between all the entity sets in a proper manner. it is used while designing and developing a database for identifying main tables of database and type of data those tables will be storing in a proper and appropriate manner.Below ER diagram clearly explains that there are seven main entities in this database that are:Customer,customer Order, product, inventoryitem,Staff, sales, shipment,RM requirement, RM inventory, testing and Supplier. Figure2Entity Relationship Diagram In above diagram, it has been represented the Entity relationship diagram according to the given case study. In order to identify the different kind of entities and their attributes. These are helping to create appropriate relationship between one or more database tables. 9
For Example- Relationship between customer and customer order Order id is a primary key in which representing as foreign key into customer table. Therefore, it has been shown as relationship between both customer and order table. By using foreign key, each and every customer can use as unique order number to access information of particular products. In this way, it will be creating as one to many relationship. One customer can identify the information different product information through order number. Relationship between supplier and customer order Order_id is stored in supplier table as foreign key in order to establish a relationship between both CustomerOrder and Supplier table. In this way, supplier can select a particular product through order Id and transport from another place. Therefore, it will create one to many relational where one supplier can supply many orders. It can help to maintain or control supply chain management process within manufacturing areas. Relationship between testing and Manufacturing Line In manufacturing line table, Line_number is a primary key in which represent as foreign key into testing table. In this way, it has been developed the relationship between manufacturing and testingtable.Throughthis,ithasbeenidentifiedthattestcanhappenonthebasisof manufacturing line of particular product. It should be categorised into line number and become easier to identify the accurate result or outcome. One to many relationship has been established between both testing and manufacturing line database tables. 10
TASK B Database used Database used for implementation of data model produced for MERRILL HAND TOOLS LTD. is Microsoft SQL server (Mukherjee, 2019). Microsoft SQL server is a relational database management server which is developed by Microsoft. It provides an advantage to database developers to move their data to cloud, export or important data within current or existing database, Table creation statement CustomerOrder table CREATETABLE[dbo].[CustomerOrder]( [order_id][varchar](50)NOTNULL, [Model_no][varchar](50)NULL, [Quantity][int]NULL, [product_name][varchar](50)NULL, CONSTRAINT[PK_CustomerOrder]PRIMARYKEYCLUSTERED ( [order_id]ASC )WITH(PAD_INDEX=OFF,STATISTICS_NORECOMPUTE=OFF,IGNORE_DUP_KEY=OFF, ALLOW_ROW_LOCKS=ON,ALLOW_PAGE_LOCKS=ON)ON[PRIMARY] )ON[PRIMARY] GO 11
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.
Fault report CREATETABLE[dbo].[Fault_report]( [Fault_id][varchar](50)NOTNULL, [Customer_id][varchar](50)NULL, [order_id][varchar](50)NULL, [Product_id][varchar](50)NULL, [Fault][varchar](50)NULL, CONSTRAINT[PK_Fault_report]PRIMARYKEYCLUSTERED ( [Fault_id]ASC )WITH(PAD_INDEX=OFF,STATISTICS_NORECOMPUTE=OFF,IGNORE_DUP_KEY=OFF, ALLOW_ROW_LOCKS=ON,ALLOW_PAGE_LOCKS=ON)ON[PRIMARY] )ON[PRIMARY] GO Raw Material Order table CREATETABLE[dbo].[Raw_material_order]( [Rm_order_number][varchar](50)NOTNULL, [RMrequirement_id][varchar](50)NOTNULL, [Line_number][varchar](50)NOTNULL, [date_order][date]NOTNULL, [Quantity_order][varchar](50)NOTNULL, [Quantity_received][varchar](50)NOTNULL, [delivery][varchar](1)NULL, CONSTRAINT[PK_Raw_material_order]PRIMARYKEYCLUSTERED ( [Rm_order_number]ASC )WITH(PAD_INDEX=OFF,STATISTICS_NORECOMPUTE=OFF,IGNORE_DUP_KEY=OFF, ALLOW_ROW_LOCKS=ON,ALLOW_PAGE_LOCKS=ON)ON[PRIMARY] )ON[PRIMARY] GO Production line CREATETABLE[dbo].[Production_line]( [Model_no][varchar](50)NOTNULL, [line_number][varchar](50)NOTNULL, [manufacture_date][date]NOTNULL, [quantityproduced][varchar](50)NOTNULL, [serialnumber][varchar](50)NOTNULL )ON[PRIMARY] GO 15
Suppliers table CREATETABLE[dbo].[Supplier]( [Supplier_id][varchar](50)NOTNULL, [Supplier_name][varchar](50)NULL, [Supplier_phnoeno][numeric](18,0)NULL, [Supplier_email][varchar](50)NULL, [Order_id][varchar](50)NULL, CONSTRAINT[PK_Supplier]PRIMARYKEYCLUSTERED ( [Supplier_id]ASC )WITH(PAD_INDEX=OFF,STATISTICS_NORECOMPUTE=OFF,IGNORE_DUP_KEY=OFF, ALLOW_ROW_LOCKS=ON,ALLOW_PAGE_LOCKS=ON)ON[PRIMARY] )ON[PRIMARY] GO Testing table CREATETABLE[dbo].[Testing]( [test_id][varchar](50)NOTNULL, [test_description][varchar](50)NULL, [test_results][varchar](50)NULL, [line_number][varchar](50)NULL, CONSTRAINT[PK_Testing]PRIMARYKEYCLUSTERED ( [test_id]ASC )WITH(PAD_INDEX=OFF,STATISTICS_NORECOMPUTE=OFF,IGNORE_DUP_KEY=OFF, ALLOW_ROW_LOCKS=ON,ALLOW_PAGE_LOCKS=ON)ON[PRIMARY] )ON[PRIMARY] GO Input / Insertion command for every database tables- INSERT[dbo].[CustomerOrder]([order_id],[Model_no],[Quantity],[product_name]) VALUES(N'Co_101',N'Model_102',20,N'screwdrivers') GO INSERT[dbo].[CustomerOrder]([order_id],[Model_no],[Quantity],[product_name]) VALUES(N'Co_102',N'Model_103',30,N'edge') GO INSERT[dbo].[CustomerOrder]([order_id],[Model_no],[Quantity],[product_name]) VALUES(N'Co_103',N'Model_101',40,N'handtool') GO INSERT[dbo].[CustomerOrder]([order_id],[Model_no],[Quantity],[product_name]) VALUES(N'Co_105',N'Model_104',10,N'cutting,diving,edgem,handtool') GO INSERT[dbo].[Customers]([Customer_id],[Sales_id],[Customer_name], [Customer_phone_no],[Customer_email],[order_id],[product_id])VALUES (N'Cust_101',N'Sales_101',N'David',CAST(125544778ASNumeric(18,0)), N'david@gmail.com',N'Co_101',N'Product_101') GO INSERT[dbo].[Customers]([Customer_id],[Sales_id],[Customer_name], [Customer_phone_no],[Customer_email],[order_id],[product_id])VALUES 16
(N'Cust_102',N'Sales_102',N'Thomas',CAST(125688965ASNumeric(18,0)), N'Thomas@gmail.com',N'Co_103',N'Product_103') GO INSERT[dbo].[Customers]([Customer_id],[Sales_id],[Customer_name], [Customer_phone_no],[Customer_email],[order_id],[product_id])VALUES (N'Cust_103',N'Sales_103',N'James',CAST(315447856ASNumeric(18,0)), N'james@gmail.com',N'Co_102',N'Product_105') GO INSERT[dbo].[Fault_report]([Fault_id],[Customer_id],[order_id],[Product_id], [Fault])VALUES(N'Fault_101',N'Cust_101',N'Co_101',N'Product_101', N'defective') GO INSERT[dbo].[HR/Staff]([Staff_id],[Staff_name],[Department],[Staff_phoneno], [Line_number])VALUES(N'Staff_101',N'Samuel',N'Manufacuting',CAST(213254878 ASNumeric(18,0)),N'Line_101') GO INSERT[dbo].[HR/Staff]([Staff_id],[Staff_name],[Department],[Staff_phoneno], [Line_number])VALUES(N'Staff_102',N'Theo',N'production',CAST(214587452AS Numeric(18,0)),N'Line_102') GO INSERT[dbo].[HR/Staff]([Staff_id],[Staff_name],[Department],[Staff_phoneno], [Line_number])VALUES(N'Staff_103',N'Dylan',N'sales',CAST(213266998AS Numeric(18,0)),N'Line_103') GO INSERT[dbo].[HR/Staff]([Staff_id],[Staff_name],[Department],[Staff_phoneno], [Line_number])VALUES(N'Staff_104',N'Luca',N'HR',CAST(213244875AS Numeric(18,0)),N'Line_103') GO INSERT[dbo].[HR/Staff]([Staff_id],[Staff_name],[Department],[Staff_phoneno], [Line_number])VALUES(N'Staff_105',N'Jaxon',N'customer_service',NULL, N'Line_102') GO INSERT[dbo].[Inventory]([Model_no],[Item_description],[item_name], [Quantity],[finished_tool],[Raw_material_id])VALUES(N'Model_101',N'Edge cuttingtools',N'Chisel',10,N'cutter',N'Raw_101') GO INSERT[dbo].[Inventory]([Model_no],[Item_description],[item_name], [Quantity],[finished_tool],[Raw_material_id])VALUES(N'Model_102',N'Cutting tools',N'Cutter',10,N'cutter',N'Raw_102') GO INSERT[dbo].[Inventory]([Model_no],[Item_description],[item_name], [Quantity],[finished_tool],[Raw_material_id])VALUES(N'Model_103',N'Driving tools',N'screwdriver',20,N'cutter',N'Raw_103') GO INSERT[dbo].[Inventory]([Model_no],[Item_description],[item_name], [Quantity],[finished_tool],[Raw_material_id])VALUES(N'Model_104',N'Cutting tools',N'Scrollsaw',10,N'cutter',N'Raw_104') GO INSERT[dbo].[ManufacturingLine]([Line_number],[Model_no], [manufacturing_date],[Quantity_produced])VALUES(N'Line_101',N'Model_101', CAST(0x1E420B00ASDate),30) GO INSERT[dbo].[ManufacturingLine]([Line_number],[Model_no], [manufacturing_date],[Quantity_produced])VALUES(N'Line_102',N'Model_102', CAST(0x50420B00ASDate),10) GO 17
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.
INSERT[dbo].[ManufacturingLine]([Line_number],[Model_no], [manufacturing_date],[Quantity_produced])VALUES(N'Line_103',N'Model_103', CAST(0x53420B00ASDate),20) GO INSERT[dbo].[ManufacturingLine]([Line_number],[Model_no], [manufacturing_date],[Quantity_produced])VALUES(N'Line_104',N'Model_104', CAST(0x1A3B0B00ASDate),40) GO INSERT[dbo].[Product]([product_id],[product_name],[product_category], [product_size],[product_price],[order_id])VALUES(N'Product_101',N'Cutter', N'Cuttingtool',10,3,N'Co_101') GO INSERT[dbo].[Product]([product_id],[product_name],[product_category], [product_size],[product_price],[order_id])VALUES(N'Product_102',N'Pliers', N'Mechanicalhandtool',15,5,N'Co_102') GO INSERT[dbo].[Product]([product_id],[product_name],[product_category], [product_size],[product_price],[order_id])VALUES(N'Product_103',N'Height Gages',N'Measuringtool',12,4,N'Co_103') GO INSERT[dbo].[Product]([product_id],[product_name],[product_category], [product_size],[product_price],[order_id])VALUES(N'Product_104', N'screwdrivers,Pliers',N'DrivingTool',20,2,N'Co_106') GO INSERT[dbo].[Product]([product_id],[product_name],[product_category], [product_size],[product_price],[order_id])VALUES(N'Product_105',N'Chisel, Cutter',N'Edgecuttingtool',10,8,N'Co_105') GO INSERT[dbo].[Production_line]([Model_no],[line_number],[manufacture_date], [quantityproduced],[serialnumber])VALUES(N'Model_101',N'Line_101', CAST(0xCA410B00ASDate),N'10',N'111') GO INSERT[dbo].[Production_line]([Model_no],[line_number],[manufacture_date], [quantityproduced],[serialnumber])VALUES(N'Model_102',N'Line_102', CAST(0xD73B0B00ASDate),N'20',N'222') GO INSERT[dbo].[Production_line]([Model_no],[line_number],[manufacture_date], [quantityproduced],[serialnumber])VALUES(N'Model_103',N'Line_103', CAST(0x3D3D0B00ASDate),N'30',N'333') GO INSERT[dbo].[Production_line]([Model_no],[line_number],[manufacture_date], [quantityproduced],[serialnumber])VALUES(N'Model_104',N'Line_104', CAST(0xE23C0B00ASDate),N'20',N'444') GO INSERT[dbo].[Raw_material_order]([Rm_order_number],[RMrequirement_id], [Line_number],[date_order],[Quantity_order],[Quantity_received],[delivery]) VALUES(N'10001',N'RM_101',N'Line_101',CAST(0x91400B00ASDate),N'1',N'1', N'2') GO INSERT[dbo].[Raw_material_order]([Rm_order_number],[RMrequirement_id], [Line_number],[date_order],[Quantity_order],[Quantity_received],[delivery]) VALUES(N'10002',N'RM_102',N'Line_102',CAST(0xA3410B00ASDate),N'2',N'2', N'2') GO INSERT[dbo].[Raw_material_order]([Rm_order_number],[RMrequirement_id], [Line_number],[date_order],[Quantity_order],[Quantity_received],[delivery]) VALUES(N'10003',N'RM_103',N'Line_103',CAST(0x90400B00ASDate),N'3',N'3', N'3') 18
GO INSERT[dbo].[Raw_material_order]([Rm_order_number],[RMrequirement_id], [Line_number],[date_order],[Quantity_order],[Quantity_received],[delivery]) VALUES(N'10004',N'RM_104',N'Line_104',CAST(0xEE400B00ASDate),N'4',N'4', N'2') GO INSERT[dbo].[RM requirement]([RMrequirement_id],[production_quantity], [Line_number],[Raw_material_id])VALUES(N'RM_101',N'10',N'Line_101', N'Raw_101') GO INSERT[dbo].[RM requirement]([RMrequirement_id],[production_quantity], [Line_number],[Raw_material_id])VALUES(N'RM_102',N'5',N'Line_102', N'Raw_102') GO INSERT[dbo].[RM requirement]([RMrequirement_id],[production_quantity], [Line_number],[Raw_material_id])VALUES(N'RM_103',N'10',N'Line_103', N'Raw_103') GO INSERT[dbo].[RM requirement]([RMrequirement_id],[production_quantity], [Line_number],[Raw_material_id])VALUES(N'RM_104',N'15',N'Line_101', N'Raw_102') GO INSERT[dbo].[RM_Inventroy]([Raw_material_id],[RM_name],[RM_quanity])VALUES (N'Raw_101',N'Wood',20) GO INSERT[dbo].[RM_Inventroy]([Raw_material_id],[RM_name],[RM_quanity])VALUES (N'Raw_102',N'Steel',20) GO INSERT[dbo].[RM_Inventroy]([Raw_material_id],[RM_name],[RM_quanity])VALUES (N'Raw_103',N'Stainless_Steel',10) GO INSERT[dbo].[RM_Inventroy]([Raw_material_id],[RM_name],[RM_quanity])VALUES (N'Raw_104',N'Rubber',30) GO INSERT[dbo].[SalesPerson]([Sales_id],[sales_name],[sales_email], [sales_phoneno])VALUES(N'Sales_101',N'Oliver',N'oliver_gmail.com', CAST(123456789ASNumeric(18,0))) GO INSERT[dbo].[SalesPerson]([Sales_id],[sales_name],[sales_email], [sales_phoneno])VALUES(N'Sales_102',N'Harry',N'harry@gmail.com', CAST(123654789ASNumeric(18,0))) GO INSERT[dbo].[SalesPerson]([Sales_id],[sales_name],[sales_email], [sales_phoneno])VALUES(N'Sales_103',N'George',N'george_gmail.com', CAST(652314798ASNumeric(18,0))) GO INSERT[dbo].[SalesPerson]([Sales_id],[sales_name],[sales_email], [sales_phoneno])VALUES(N'Sales_104',N'Noah',N'noah@gmail.com',CAST(125489643 ASNumeric(18,0))) GO INSERT[dbo].[Shipping]([Shipment_id],[Shipment_date],[Shipping_address], [order_id])VALUES(N'Ship_101',CAST(0x51420B00ASDate),N'61WellfieldRoad', N'Co_103') GO INSERT[dbo].[Shipping]([Shipment_id],[Shipment_date],[Shipping_address], [order_id])VALUES(N'Ship_102',CAST(0x54420B00ASDate),N'14TottenhamCourt Road',N'Co_101') GO 19
INSERT[dbo].[Shipping]([Shipment_id],[Shipment_date],[Shipping_address], [order_id])VALUES(N'Ship_103',CAST(0x1F420B00ASDate),N'BusinessCentremain road',N'Co_102') GO INSERT[dbo].[Supplier]([Supplier_id],[Supplier_name],[Supplier_phnoeno], [Supplier_email],[Order_id])VALUES(N'Sup_101',N'Leo',CAST(5566887985AS Numeric(18,0)),N'leo@gmail.com',N'Co_101') GO INSERT[dbo].[Supplier]([Supplier_id],[Supplier_name],[Supplier_phnoeno], [Supplier_email],[Order_id])VALUES(N'Sup_102',N'Oscar',CAST(3268554895AS Numeric(18,0)),N'oscar@gmail.com',N'Co_102') GO INSERT[dbo].[Supplier]([Supplier_id],[Supplier_name],[Supplier_phnoeno], [Supplier_email],[Order_id])VALUES(N'Sup_103',N'Charlie',CAST(3255478991AS Numeric(18,0)),N'charlie@gmail.com',N'Co_103') GO INSERT[dbo].[Testing]([test_id],[test_description],[test_results], [line_number])VALUES(N'Test_101',N'Unit_testing',N'pass',N'Line_101') GO INSERT[dbo].[Testing]([test_id],[test_description],[test_results], [line_number])VALUES(N'Test_102',N'component_testing',N'pass',N'Line_102') GO INSERT[dbo].[Testing]([test_id],[test_description],[test_results], [line_number])VALUES(N'Test_103',N'safety_testing',N'fail',N'Line_103') GO Sample data of tables CustomerOrder table Order_idModel_noQuantity Co_101Model_10220 Co_102Model_10330 Co_103Model_10140 Customers table Customer_idSales_idCustomer_nameCustomer_phonenoCustomer_emailOrder_idProduct_id Cust_101Sales_101David125544778david@gmail.comCo_101Product_101 Cust_102Sales_102Thomas125688965Thomas@gmail.comCo_103Product_103 Cust_103Sales_103James315447856james@gmail.comCo_102Product_105 HR/Staff table Stadd_idStaff_nameDepartmentStaff_phonenoLine_number Staff_101SamuelManufacuting213254878Line_101 Staff_102Theoproduction214587452Line_102 20
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
SQL code for querying tables Question 1:List of tools produced by the company SQL Code: Selectproduct_id,product_name fromProduct Result: Question 2:Show the test results for one of the tools produced by the company. SQL Code: SelectTesting.test_id,Testing.test_description,Testing.test_results, ManufacturingLine.Line_number, Inventory.Model_no,Inventory.item_name fromTesting joinManufacturingLineonTesting.line_number=ManufacturingLine.Line_number joinInventoryonInventory.Model_no=ManufacturingLine.Model_no whereInventory.item_name='screwdriver' Result: 29
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.
Result: Question 6:Current inventory levels of raw materials SQL Code: selectRaw_material_id,RM_name,RM_quanityas'currentinventroylevel' fromRM_Inventroy Result: Question 7:List record of test(s) conducted on a given tool (Chisel) SQL Code: SelectInventory.Model_no,Inventory.item_name,Testing.test_id, Testing.test_description, Testing.test_results,Testing.line_number fromTesting joinManufacturingLineonTesting.line_number=ManufacturingLine.Line_number joinInventoryonInventory.Model_no=ManufacturingLine.Model_no whereInventory.item_name='Chisel' Result: Question 8:List of raw materials required to produce a given tool. SQL Code: Select[RM requirement].Raw_material_id,[RM requirement].RMrequirement_id, RM_Inventroy.RM_name, ManufacturingLine.Model_no,Inventory.item_name from[RM requirement] joinManufacturingLineon[RM requirement].Line_number= ManufacturingLine.Line_number joinInventoryonInventory.Model_no=ManufacturingLine.Model_no JoinRM_InventroyonRM_Inventroy.Raw_material_id=[RM requirement].Raw_material_id 31
whereInventory.item_name='Chisel' Result: 9.Create a new order for an existing Customer. insertintoCustomerOrder(order_id) values('Co_105'); 10.Add 4 different items to the order created updateCustomerOrder setproduct_name='cutting,diving,edgem,handtool' whereorder_id='Co_105' 32
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Result 11.Calculate and show the cost of each line in the order SELECTCustomerOrder.order_id,Product.product_name, ManufacturingLine.Line_number,Product.product_price FROMCustomerOrderINNERJOIN ProductONCustomerOrder.order_id=Product.order_id INNERJOIN ManufacturingLineONCustomerOrder.Model_no= ManufacturingLine.Model_no WHERE(CustomerOrder.order_id='Co_105') Result 33
12.Calculate and show the total cost of the order SELECTCustomerOrder.order_id,Product.product_price FROMCustomerOrderINNERJOIN ProductONCustomerOrder.order_id=Product.order_id WHERE(CustomerOrder.order_id='Co_105') Result 13.List all the raw materials the company manages SELECT[RM requirement].Raw_material_id, ManufacturingLine.Quantity_produced FROM[RM requirement]INNERJOIN ManufacturingLineON[RM requirement].Line_number= ManufacturingLine.Line_number Result 14.Schedule the production line for the tools requested in the order SELECTCustomerOrder.order_id,Production_line.manufacture_date, Inventory.item_name FROMProduction_lineINNERJOIN InventoryONProduction_line.Model_no= Inventory.Model_noINNERJOIN CustomerOrderONInventory.Model_no= CustomerOrder.Model_no WHERE(CustomerOrder.order_id='Co_105') 34
Result 15 show the list of raw materials and quantities required for its manufacturing. SELECTRM_Inventroy.Raw_material_id,RM_Inventroy.RM_quanity, Inventory.item_name FROMRM_InventroyINNERJOIN InventoryONRM_Inventroy.Raw_material_id= Inventory.Raw_material_id WHERE(Inventory.item_name='Screwsaw') Question 16:create a new Delivery of raw materials order/note. SQL Code: AltertableRaw_material_order ADDdeliveryvarchar; Result: 35
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.
Question 17:Update the inventory of raw materials by adding the raw materials delivered in question 16. SQL Code: UpdateRaw_material_order setdelivery=1 Result: 18.Add these tools to the inventory of finished tools. updateInventory setfinished_tool='Screwsaw' Result 36
19Create a shipment for the order created SELECTShipping.Shipment_id,Inventory.Model_no,Inventory.finished_tool, Shipping.order_id FROMShippingINNERJOIN CustomerOrderONShipping.order_id= CustomerOrder.order_idINNERJOIN InventoryONCustomerOrder.Model_no=Inventory.Model_no WHERE(Shipping.order_id='Co_105') 37
20Create a new Problem Report for it. insertintoFault_report values('Fault_102','Cust_103','Co_104','Product_106',‘faulty’) 38
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
CONCLUSION From the above assignment it has been summarized that there are various kinds of approaches or models that can be used for developing a database. One of the approaches is top- down approach which is used for breaking down a system or a project into its compositional sub- system in order to understand a system in more appropriate manner. Whereas Bottom- Up approach is used for identifying ways in which sub components of a system can be put together for development of a new complex system. Lastly it has also been analysed that ER diagram is an important model which is used for identification of main entities of the database for development of database in a proper and accurate manner. 39
REFERENCES Books and Journals Ghosh, S., and et. al., 2018, December. Automated Generation of ER Diagram from a Given Text in Natural Language. In2018 International Conference on Machine Learning and Data Engineering (iCMLDE)(pp. 91-96). IEEE. Hossain, B.A., Rajan, G. and Schwitter, R., 2019. CNL-ER: A Controlled Natural Language for Specifying and Verbalising Entity Relationship Models. InProceedings of the The 17th Annual Workshop of the Australasian Language Technology Association(pp. 126-135). Mukherjee, S., 2019. Indexes in Microsoft SQL Server.arXiv preprint arXiv:1903.08334. Mukherjee,S.,2019.SQLServerDevelopmentBestPractices.InternationalJournalof Innovative Research in Computer and Communication Engineering,10. Streicher, K.N., and et.al., 2019. Analysis of space heating demand in the Swiss residential building stock: Element-based bottom-up model of archetype buildings.Energy and Buildings.184.pp.300-322. Suraprajit, P., 2019. Bottom-up vs top-down model: The perception of reading strategies among Thai university students.Journal of Language Teaching and Research.10(3). pp.454- 460. 40