0% found this document useful (0 votes)
4 views6 pages

Assignment 4 DBMS

The document outlines a Farmer's Market Management System with various queries to connect customers, farmers, products, sales, and payments. It includes expected results for each query, such as lists of customer purchases, farmer-product associations, and comprehensive overviews of sales and payment information. Additionally, it details methods for creating combinations of farmers, customers, products, and payment methods, as well as joining relevant tables for data retrieval.

Uploaded by

nameman901
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)
4 views6 pages

Assignment 4 DBMS

The document outlines a Farmer's Market Management System with various queries to connect customers, farmers, products, sales, and payments. It includes expected results for each query, such as lists of customer purchases, farmer-product associations, and comprehensive overviews of sales and payment information. Additionally, it details methods for creating combinations of farmers, customers, products, and payment methods, as well as joining relevant tables for data retrieval.

Uploaded by

nameman901
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

Farmer’s Market

Management System
1.

1.1
This query connects customers to the products they bought. First, customers
are linked via the Sale table, then each sale is linked to a Product.
Expected Result:
List of customer names and the products they purchased.

1.2
Shows farmers and the products they have for sale.
Expected Result:
Farmer’s name and product name, only where the farmer has products.

2.

2.1
Retrieves all farmers (even those without products) and all products (even
those without assigned farmers).
Expected Result:
Complete overview of farmers and products.

2.2

Shows all sales and any corresponding payments, even if a sale has no
payment recorded.

2.3
Shows all products, whether or not they have been sold, including the sale
date if available

3.

3.1

Shows all farmers, including those without any products (with NULL in
Product fields).
Expected Result:
List of farmers and their products, if any.

3.2

Displays all sales, with payment information if available.

3.3
Shows every product and, if it exists, the date it was sold.

4.

4.1 Shows all sales and any connected payment information.


Expected Result:
Sales data prioritized.

4.2 Displays all products, with any corresponding sales data.

4.3 Compares paid amounts versus sale amounts.

5.
5.1 Creates all possible farmer-customer pairs.
Expected Result:
Farmer matched with every customer.

5.2 Every combination of products with every payment method.

5.3 All possible combinations of farmers and payment methods.

6.

6.1 Automatically joins Sale and Payment tables based on columns with the
same name.

6.2 Shows products and their associated sales dates.

6.3 Lists sales together with the product ID and sale amount.
7.

7.1 Finds farmers living in the same city (excluding themselves).

7.2 List products that belong to the same category but are different products

7.3 finds customers living in the same location

You might also like