Screen Shot Fired Up Database
Tables :
Customer Table Structure
Data:
CustomerPhone Table Structure
Data:
CustomerEmail Table Structure
Data:
Orderline Table Structure
Data:
Orders Table Structure
Data:
Parts Table Structure
Data:
Repairs Table Structure
Data:
Stoves Table Structure
Data:
Queries Create Database: create database firedup; use Database: use firedup; create Table: CREATE TABLE Table_Name (column_specifications) Customer Table: CREATE TABLE customer (CustID INT NOT NULL, PrimaryKey, VARCHAR(20) NOT NULL, VARCHAR(20) NOT NULL, VARCHAR(20) NOT NULL, VARCHAR(20) NOT NULL, VARCHAR(20) NOT NULL, VARCHAR(10) NOT NULL, VARCHAR(10) NOT NULL, bigint(10), VARCHAR(10), NOT NULL, NOT NULL);
CustFname CustMiddle CustLname Address1 Address2 City State PostalCode Country
Customer Phone Table: CREATE TABLE CustomerPhone (CustID INT NOT NULL, CustPhone bigint(10) NOT NULL);
Customer Email Table: CREATE TABLE Customer Email (CustID INT NOT NULL, CustEmail VarChar(20) NOT NULL);
Orderline Table: CREATE TABLE Orderline (OrderNum ModelID PartID SerialNum Quantity QuotedPrice SellingPrice OrdersTable: CREATE TABLE Orders (OrderNum CustID OrderID INT (10) NOT NULL, PrimaryKey, INT (20) NOT NULL, date NOT NULL); INT (10) NOT NULL, PrimaryKey, INT (20) NOT NULL, INT (20) NOT NULL, INT (20) NOT NULL, INT (20) NOT NULL, float (20) NOT NULL, float (10) NOT NULL);
Parts Table: CREATE TABLE Parts (PartID SerialNum PartCost INT (10) NOT NULL, PrimaryKey, INT (20) NOT NULL, float NOT NULL, NOT NULL,
PartSellingPrice float PartOnHand Repairs Table: CREATE TABLE Repairs (RepairID CustID RepairDate ModelID PartID SerialNum RepairCost RepairType
INT (20) NOT NULL);
INT (10) NOT NULL, PrimaryKey, INT (20) NOT NULL, date NOT NULL,
INT (20) NOT NULL, INT (20) NOT NULL, INT (20) NOT NULL, float NOT NULL,
Varchar (20) NOT NULL);
Stoves Table: CREATE TABLE Stoves ( ModelID SerialNum MfgDate InspectorIns ModelPrice StovesOnHand INT (10) NOT NULL, PrimaryKey, INT (20) NOT NULL, date NOT NULL,
VarChar (20) NOT NULL, float NOT NULL,
INT (20) NOT NULL,
WarrentyPeriod INT (20) NOT NULL);
View Tables: Show Tables;
Inserting Data to Tables: General: Insert into tablename (values); Example: Customer Table: Insert into customer values(1,David,Roy,Witold,1.BStreet,12/1,F Street,ArrowTown,Auckland,1151,NewZealand); Using above query u can insert value into any tables. If data type is varchar means then mention with in single quotation.
View the Data: General: Select * from tablename; Example: Customer Table: Select * from customer;