0% found this document useful (0 votes)
2 views3 pages

RDBMS Order Entry System Sample Database

The document outlines a sample database for an Order Entry System, detailing three tables: SalesPeople, Customers, and Orders, along with their respective primary and foreign key constraints. It also includes a set of assignment tasks that involve querying the database to extract specific information such as counts of salespeople, order amounts, and customer details. The assignments focus on various SQL operations, including counting, displaying, and finding maximum values based on specified criteria.

Uploaded by

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

RDBMS Order Entry System Sample Database

The document outlines a sample database for an Order Entry System, detailing three tables: SalesPeople, Customers, and Orders, along with their respective primary and foreign key constraints. It also includes a set of assignment tasks that involve querying the database to extract specific information such as counts of salespeople, order amounts, and customer details. The assignments focus on various SQL operations, including counting, displaying, and finding maximum values based on specified criteria.

Uploaded by

prudhvitaduvai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

A Sample Database for assignment 6 & 7

(RDBMS APP: Order Entry System)


Table 1: SalesPeople
Snum is Primary key
Sname is Unique constraint
Snum Sname City Comm

1001 Peel London .12

1002 Serres Sanjose .13

1004 Motika Landon .11

1007 Rifkin Barcelona .15


1003 Axelrod Newyork .10

Table 2: Customers
Cnum is Primary Key
City has not null constraint .
Snum is foreign key constraint refers Snum column of SalesPeople table.
Cnum Cname City Snum

2001 Hoffman London 1001

2002 Giovanni Rome 1003

2003 Liu Sanjose 1002

2004 Grass Berlin 1002

2006 Clemens London 1001

2008 Cisneros Sanjose 1007


2007 Pereira Rome 1004
Table 3: Orders
Onum is Primary key
Cnum is foreign key refers to Cnum column of Customers table.
Snum is foreign key refers Snum column of SalesPeople table.
Onum Amt Odate Cnum Snum

3001 18.69 3-10-1990 2008 1007

3003 767.19 3-10-1990 2001 1001

3002 1900.10 3-10-1990 2007 1004

3005 5160.45 3-10-1990 2003 1002

3006 1098.16 3-10-1990 2008 1007

3009 1713.23 4-10-1990 2002 1003

3007 75.75 4-10-1990 2004 1002

3008 4273.00 5-10-1990 2006 1001

3010 1309.95 6-10-1990 2004 1002


3011 9891.88 6-10-1990 2006 1001
Assignment 6

1) Count the number of Salesperson whose name begin with ‘a’/’A’.

2) Display all the Salesperson whose all orders worth is more than Rs.
2000.

3) Count the number of Salesperson belonging to Newyork.

4) Display the number of Salespeople belonging to Landon and


belonging to Paris.

5) Display the number of orders taken by each Salesperson and their


date of orders.

6) Write a query that counts the number of Salespeople registering


orders for each day.

7) Write a query that selects the first customer in alphabetical order,


whose name begins with ‘G’.

8) Find out the largest orders for Snum 1002 & 1007.

9) Find out the maximum single order amount of a Salesperson over


Rs. 3000 in a day.

10) Find out the no. of Salesperson who belongs to same city and have
same commission percentage.

You might also like