Question: 1) Write SQL commands to create the type and type body for an object type called TotalSales that represents the sales of a bookstore. The
1) Write SQL commands to create the type and type body for an object type called TotalSales that represents the sales of a bookstore. The TotalSales type should have: three attributes called book, unitPrice and quantity with respective datatype; and one method called getTotalSales that returns the sales (as DECIMAL). The TotalSales type may not have subtypes.
2) Write an SQL statement to create table BookSales that has TWO (2) attributes: salespersonName of type varchar and SaleAmount of type TotalSales.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
