Question

In: Computer Science

Metal Holdings Inc. You have been assigned the task of creating a simple relational database using...

Metal Holdings Inc.

You have been assigned the task of creating a simple relational database using SQLite database by the owner of “Metal Holdings” who is in the business of selling industrial metals to customers (mostly wholesale suppliers) who buy from the company.

Your goal is to design and build a database that would be responsible for:

  • Managing a product table containing all metals which at a minimum should provide information such as name, description and price of each metal sold by the company.
  • Manage a list of customers who would be purchasing metals from the company. The owner is interested in name, location, contact as well as whether the customer is a retail or wholesale buyer.
  • Manage and maintain a complete inventory of all orders shipped by the company to customers.
  • The owner wants to maintain the following information about each order at a minimum, but not limited to:
    • Date of the OrderShipping information such as date and status.
    • Product purchased and Quantity ordered.
    • Customer Information.
    • Each customer can purchase 1-to-many products (metals) in a single order.

The following is a list of metals sold by the company (these below metals should be available in your uploaded SQLite database):

  • Copper
  • Aluminium
  • Silver
  • Steel
  • Bronze
  • Brass
  • Lead
  • Nickel
  • Titanium
  • Magnesium

Solutions

Expert Solution

SQLite Script:

CREATE TABLE Product (
        PRODUCT_ID integer PRIMARY KEY AUTOINCREMENT,
        NAME varchar,
        DESCRIPTION varchar,
        PRICE float
);

CREATE TABLE Customers (
        CUSTOMER_ID integer PRIMARY KEY AUTOINCREMENT,
        NAME varchar,
        LOCATION varchar,
        CONTACT varchar,
        BUYER_TYPE varchar
);

CREATE TABLE Orders (
        ORDER_ID integer PRIMARY KEY AUTOINCREMENT,
        ORDER_DATE date,
        ORDER_STATUS varchar,
        PRODUCT_ID integer,
        PRODUCT_NAME varchar,
        QUANTITY integer,
        CUSTOMER_ID integer,
        CUSTOMER_NAME varchar
);

INSERT INTO Product(NAME,DESCRIPTION,PRICE) VALUES("Copper","Copper_Descrition",3500);
INSERT INTO Product(NAME,DESCRIPTION,PRICE) VALUES("Aluminium","Aluminium_Description",3500);
INSERT INTO Product(NAME,DESCRIPTION,PRICE) VALUES("Silver","Silver_Description",3500);
INSERT INTO Product(NAME,DESCRIPTION,PRICE) VALUES("Steel","Steel_Description",3500);
INSERT INTO Product(NAME,DESCRIPTION,PRICE) VALUES("Bronze","Bronze_Description",3500);
INSERT INTO Product(NAME,DESCRIPTION,PRICE) VALUES("Brass","Brass_Description",3500);
INSERT INTO Product(NAME,DESCRIPTION,PRICE) VALUES("Lead","Lead_Description",3500);
INSERT INTO Product(NAME,DESCRIPTION,PRICE) VALUES("Nickel","Nickel_Description",3500);
INSERT INTO Product(NAME,DESCRIPTION,PRICE) VALUES("Titanium","Titanium_Description",3500);
INSERT INTO Product(NAME,DESCRIPTION,PRICE) VALUES("Magnesium","Magnesium_Description",3500);

OUTPUT:

I hope it helps.


Related Solutions

You are a senior adviser to the EPA. You have been assigned the task of creating...
You are a senior adviser to the EPA. You have been assigned the task of creating an oversight board which will be in charge of the creation and enforcement of regulations relating to mining. Your plan calls for the appointment of ten (10) members. To attract the best possible board members you are considering adding a provision that no member may be terminated except "only for good cause." What are the arguments both for and against the "only for good...
Borchers, Inc. build several models of widgets. You’ve been assigned the task of creating an aggregate...
Borchers, Inc. build several models of widgets. You’ve been assigned the task of creating an aggregate production plan based on the data below. Monthly demand is shown for January, February and March. Your firm follows a level production plan with 25 workers and has an outsource vendor that can produce up to 1,000 units a month. The table shows this level production plan (25 workers, 8 hours per day, 20 days per month = 4,000 hours = 4,000 units). Widgets...
You have been assigned the task of using the corporate, or free cash flow model to...
You have been assigned the task of using the corporate, or free cash flow model to estimate KCB Corporation's intrinsic value. The firm's WACC is 10.00%, its end-of-year free cash flow (FCF1) is expected to be $75.0 million, the FCFs are expected to grow at a constant rate of 5.00% a year in the future, the company has $200 million of long-term debt and preferred stock, and it has 30 million shares of common stock outstanding. Why should the WACC...
You are asked to design a relational database for a simple course registration software application for...
You are asked to design a relational database for a simple course registration software application for your school. The relational database must have the following information about the student, the course, and the registration, respectively StudentID, FirstName, LastName, DataOfJoining, and Major CourseNumber, CourseName,InstructorName, StartDate, EndDate, NumberOfCredits ReferenceID, StudentID,CourseID, DateOfRegistration Apply the following constrains while designing the database Each student in the database must be uniquely identifiable Each course listed in the database must be have unique CourseNumber Each course registration...
You work for a pharmaceutical company where you are assigned the task of creating new drug...
You work for a pharmaceutical company where you are assigned the task of creating new drug therapies to treat thyroid disorders such as hyperthyroidism (high levels of T3 and T4) and hypothyroidism (low levels of T3 and T4). Your team has designed a few drugs, and your job is to identify which drug(s) would be successful in treating thyroid disorders based on your knowledge of thyroid hormone synthesis. Below is the list of drugs your team designed (all of these...
SQL DATABASE Task 2 [10.5 marks] using the AdditionCollege database For task 2, we have provided...
SQL DATABASE Task 2 [10.5 marks] using the AdditionCollege database For task 2, we have provided you with the creation script for the AdditionCollege database. Run this script in MySQL Workbench to create the database. You should execute your query solutions to extract the necessary information. The script is based on the following schematic: Unit (Unit_code, Staff_id, [UnitName]) Staff (Staff_id, StaffName, Position, Gender) Taught_by (Unit_code, Staff_id, weekday) Student (Student_id, Student_name, Address, Gender) TuteGroup (TuteGroup_code, Unit_code, DayHrCode, Room_Nr) TuteGroup_List (TuteGroup_code, Student_id)...
You have been assigned a task to make the pricing policy of an insurance company Beta....
You have been assigned a task to make the pricing policy of an insurance company Beta. How would you design the pricing strategy of its products to solve the problem of asymmetric information?
You have been assigned the task of putting together a statement for the ACME Com- pany...
You have been assigned the task of putting together a statement for the ACME Com- pany that shows its expected inflows and outflows of cash over the months of July 2016 through December 2016. You have been given the following data for ACME Company: (1)Expected gross sales for May through December, respectively, are $300,000, $290,000, $425,000, $500,000, $600,000, $625,000, $650,000, and $700,000. (2) 12% of the sales in any given month are collected during that month. However, the firm has...
Normalizing the Relational Model for the Student Project and Creating a Normalized SQL Database Patient (patientNo,...
Normalizing the Relational Model for the Student Project and Creating a Normalized SQL Database Patient (patientNo, name, address, phone, dateOfBirth, sex, insuranceCo, policyNo, relationshipToInsured) Appointment(patientNo, apptdate, appttime, reason, staffNo, visitNo) Visit(visitNo, patientNo, visitdate, visittime, duration, reason, visitType, visitCost, staffNo, roomNo) Staff(staffNo, name, title, specialty, address, phone) Availability(staffNo, availDate, startTime, endTime) InsurancePolicy (company, policyNo, insuredName, policytype, medicalCoPay, labCoPay, pharmacyCoPay, startDate, endingDate) DiagnosisMenu(diagCode, diagName) ProcedureMenu(procCode, procName, cost) Room(roomNo, roomType, condition) PrescriptionScript(scriptNo, visitNo, dateWritten, itemPrescribed, quantityPrescribed, directions, numberRefills) LabTest(testNo, prescriptionNo, testype, testDate, testTime,...
Subject: Database Design System and Management We have been introduced to the concept of Relational databases,...
Subject: Database Design System and Management We have been introduced to the concept of Relational databases, SQL, Business rules, Centralized and Distributed database systems. Write 2/3 paragraph and discuss: Q: How important are Relational Debase Management System in business operations and productivity? What is your level of comfort with this technology? How important are Logical database design and what was your favorite topic.?   
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT