Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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 'set TotalSales that returns the sales (as DECIMAL). The TotalSales type may not have subtypes. b) Write an SQL statement to create table BookSales that has TWO (2) attributes: salespersonName of type varchar and Saledmount of type Zatalsales, 0 Write an INSERT statement to enter data into table BookSales, d) Write a SELECT statement to display SalesPersonName and totalSales columns in BookSales table

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases And Information Systems 1 International Baltic Conference Dbandis 2020 Tallinn Estonia June 19 2020 Proceedings

Authors: Tarmo Robal ,Hele-Mai Haav ,Jaan Penjam ,Raimundas Matulevicius

1st Edition

303057671X, 978-3030576714

More Books

Students also viewed these Databases questions

Question

2. How much time should be allocated to the focus group?

Answered: 1 week ago

Question

1. Where will you recommend that she hold the focus group?

Answered: 1 week ago