Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Define the schema for the following database with specific data type and constraints, the table name and its fields name are to be taken from

Define the schema for the following database with specific data type and constraints, the table name and its fields name are to be taken from database description which are given below :

A database is being constructed for storing sales information system. A product can be described with a unique product number, product name, selling price, manufacturer name. The product can sale to a particular client and each client have it own unique client number, client name, client addresses, city, pin code, state and total balance to be required to paid. Each client order to buy product from the salesman. In the order, it has unique sales order number, sales order date, client number, salesman number (unique), billed whole payment by the party or not and its delivery date. The salesman have the name, addresses, city, pin code, state, salary of the sales man, delivery date, total quantity ordered, product rate.


Write the SQL queries for the following –


Retrieve the list of names and the cities of all the clients.


1. List all the clients who are located in Dhaka.

2.Find the products whose selling price is greater than 2000 and less than or equal to 5000

3.Write a trigger that automatically deletes product names if they are sold less than five times.

Step by Step Solution

3.32 Rating (152 Votes )

There are 3 Steps involved in it

Step: 1

To select all clients from the table we have to use SELECT statement Syntax Select ... 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

Document Format ( 2 attachments)

PDF file Icon
63609aca7ff5a_233601.pdf

180 KBs PDF File

Word file Icon
63609aca7ff5a_233601.docx

120 KBs Word File

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

Probability And Statistics

Authors: Morris H. DeGroot, Mark J. Schervish

4th Edition

9579701075, 321500466, 978-0176861117, 176861114, 978-0134995472, 978-0321500465

More Books

Students also viewed these Databases questions

Question

Explain how the sense of smell works.

Answered: 1 week ago