Question: 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

1 Expert Approved Answer
Step: 1 Unlock

To select all clients from the table we have to use SELECT statement Syntax Select ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Document Format (2 attachments)

PDF file Icon

63609aca7ff5a_233601.pdf

180 KBs PDF File

Word file Icon

63609aca7ff5a_233601.docx

120 KBs Word File

Students Have Also Explored These Related Databases Questions!