Answered step by step
Verified Expert Solution
Question
1 Approved Answer
- - Create the Stock table CREATE TABLE Stock ( Stock _ ID NUMBER PRIMARY KEY, Stock _ Type VARCHAR 2 ( 5 0 )
Create the Stock table
CREATE TABLE Stock
StockID NUMBER PRIMARY KEY,
StockType VARCHAR NOT NULL,
StockModel VARCHAR NOT NULL,
Manufacturer VARCHAR NOT NULL
;
Create the Customer table
CREATE TABLE Customer
CustID VARCHAR PRIMARY KEY,
CustFName VARCHAR NOT NULL,
CustSName VARCHAR NOT NULL,
CustAddress VARCHAR NOT NULL,
CustContact VARCHAR NOT NULL
;
Create the Repairs table
CREATE TABLE Repairs
RepairID NUMBER PRIMARY KEY,
RepairWork VARCHAR NOT NULL,
RepairDate DATE NOT NULL,
RepairHours NUMBER NOT NULL
;
Create the Sales table
CREATE TABLE Sales
SalesNum NUMBER PRIMARY KEY,
SalesDate DATE NOT NULL,
SalesAmt NUMBER NOT NULL,
StockID NUMBER,
CustID VARCHAR
RepairID NUMBER,
FOREIGN KEY StockID REFERENCES StockStockID
FOREIGN KEY CustID REFERENCES CustomerCustID
FOREIGN KEY RepairID REFERENCES RepairsRepairID
;
Question
Marks
TASK: Create Function
Create a function called fnITGear that would be meaningful and relevant for this
database. Your function should accept at least input parameter and display at least
relevant pieces of information.
In your solution,
display the data and provide the code to execute the function.
use relevant exception handling and
provide relevant code comments
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started