0% found this document useful (0 votes)
42 views

Tutorial 2nd (D)

The document provides a database schema and tables for a store including customers, goods, and cash transactions. It also lists 10 problems to solve using SQL statements with the given tables which include inserting data, updating quantities, sorting and filtering records, deleting data, and creating views. The tasks involve common SQL commands like SELECT, INSERT, UPDATE, DELETE, and CREATE VIEW.

Uploaded by

phoopa97
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views

Tutorial 2nd (D)

The document provides a database schema and tables for a store including customers, goods, and cash transactions. It also lists 10 problems to solve using SQL statements with the given tables which include inserting data, updating quantities, sorting and filtering records, deleting data, and creating views. The tasks involve common SQL commands like SELECT, INSERT, UPDATE, DELETE, and CREATE VIEW.

Uploaded by

phoopa97
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

University of Information Technology

(2018-2019)Academic Year, Second Year B.C.Sc/ B.C.Tech


CST-2206 (Database Fundamentals)
Tutorial(II)
Time Allowed: 1 hour

1. Create database for AASTORE and tables are following.


CUSTOMER ( CNO, CNAME , STREET, CITY)
GOODS (GNO, GNAME, PRICE, BRAND)
CASHER (CNO, GNO, QTY)

CUSTOMER CASHER

CNO CNAME STREET CITY GNO CNO QTY


001 Mg Mg Yadanar Street Mandalay 2 003 5
002 KoKo Kanar Street Yangon 1 001 1
003 HlaHla Main Road Laiso 4 004 10
5 005 15
004 U Mya Pyi Road Yangon
005 Mg Kyaw Main Road Laiso

GOODS
GN GNAME PRICE BRAND
O
1 AA Phone 250000 Malaysia
2 BB Phone 300000 Thailand
3 VV Phone 250000 Myanmar
4 YY Phone 150000 Myanmar
5 WW Phone 270000 Myanmar

Write SQL statement for the


following problems using above tables:

1. Create tables for CUSTOMER, GOODS and CASHER.


2. Insert a new customer no ‘006’. The name and street are ‘Ma Ma’ and ‘Thazin Street’
respectively and lives in ‘Yangon’.
3. Set the casher quantity to zero for all customers in Yangon.
4. List all goods data in ascending order by price.
5. Delete all customers in ‘Laiso’.
6. Retrieve all brands which names are 5 characters long and start with ‘M’.
7. Find the names and address of customers who are located in the same city.
8. Get good name for goods with price values less than the current maximum price value
in good table.
9. Find the detail information of good which is cash by customer ‘Mg Mg’.
10. List the customer number and customers with Unknown address.(using view table)

You might also like