Europium-TA / DB-Project

0 stars 0 forks source link

Assignment Databases 2015

Practical Teamwork Project

Products

ID VendorID Product Name MeasureID Base Price
1 20 Beer �Zagorka� 100 0.86
2 30 Vodka �Targovishte� 100 7.56
3 20 Beer �Beck�s� 100 1.03
4 10 Chocolate �Milka� 200 2.80

Vendors

ID Vendor Name
10 Nestle Sofia Corp.
20 Zagorka Corp.
30 Targovishte Bottling Company Ltd.

Measures

ID Measure Name
100 liters
200 pieces

Assignment

project

Problem 1 - Load Excel Reports from ZIP File

Problem 2 - Generate PDF Reports

Aggregated Sales Report
Date: 20-Jul-2013
Product Quantity Unit Price Location Sum
Beer "Beck�s" 40 liters 1.20 Supermarket "Kaspichan � Center" 48.00
Beer "Zagorka" 37 liters 1.00 Supermarket "Bourgas � Plaza" 37.00
Chocolate "Milka" 7 pieces 2.85 Supermarket "Bay Ivan" � Zmeyovo 19.95
Vodka "Targovishte" 14 liters 8.50 Supermarket "Bourgas � Plaza" 119.00
Chocolate "Milka" 12 pieces 2.90 Supermarket "Kaspichan � Center" 34.80
Beer "Zagorka" 65 liters 0.92 Supermarket "Kaspichan � Center" 59.80
Vodka "Targovishte" 4 liters 7.80 Supermarket "Bay Ivan" � Zmeyovo 31.20
Total sum for 20-Jul-2012: 349.75
Date: 21-Jul-2013
Product Quantity Unit Price Location Sum
Beer "Zagorka" 11 liters 1.00 Supermarket "Bourgas � Plaza" 11.00
Beer "Zagorka" 78 liters 0.92 Supermarket "Kaspichan � Center" 71.76
Beer "Zagorka" 146 liters 0.88 Supermarket "Plovdiv � Stolipinovo" 128.48
Vodka "Targovishte" 20 liters 8.50 Supermarket "Bourgas � Plaza" 170.00
Vodka "Targovishte" 67 liters 7.70 Supermarket "Plovdiv � Stolipinovo" 515.90
Vodka "Targovishte" 3 liters 7.80 Supermarket "Bay Ivan" � Zmeyovo 23.40
Beer "Beck�s" 43 liters 1.20 Supermarket "Kaspichan � Center" 51.60
Beer "Beck�s" 75 liters 1.05 Supermarket "Plovdiv � Stolipinovo" 78.75
Chocolate "Milka" 9 pieces 2.90 Supermarket "Kaspichan � Center" 26.10
Chocolate "Milka" 5 pieces 2.85 Supermarket "Bay Ivan" � Zmeyovo 14.25
Total sum for 21-Jul-2012: 1091.24
Date: 22-Jul-2013
Product Quantity Unit Price Location Sum
Beer "Zagorka" 16.00 1.00 Supermarket "Bourgas � Plaza" 16.00
Beer "Zagorka" 90.00 0.92 Supermarket "Kaspichan � Center" 82.80
Beer "Zagorka" 230.00 0.88 Supermarket "Plovdiv � Stolipinovo" 202.40
Vodka "Targovishte" 24.00 8.50 Supermarket "Bourgas � Plaza" 204.00
Vodka "Targovishte" 12.00 7.70 Supermarket "Plovdiv � Stolipinovo" 92.40
Beer "Beck�s" 18.00 1.20 Supermarket "Kaspichan � Center" 21.60
Beer "Beck�s" 60.00 1.05 Supermarket "Plovdiv � Stolipinovo" 63.00
Chocolate "Milka" 14.00 2.90 Supermarket "Kaspichan � Center" 40.60
Total sum for 21-Jul-2012: 722.80
Grand total: 2163.79

Problem 3 - Generate XML Report

Sales-by-Vendors-report.xml

<?xml version="1.0" encoding="utf-8">
<sales>
  <sale vendor="Nestle Sofia Corp.">
    <summary date="20-Jul-2013" total-sum="54.75" />
    <summary date="21-Jul-2013" total-sum="40.35" />
    <summary date="22-Jul-2013" total-sum="40.60" />
  </sale>
  <sale vendor="Targovishte Bottling Company Ltd.">
    <summary date="20-Jul-2013" total-sum="150.20" />
    <summary date="21-Jul-2013" total-sum="709.30" />
    <summary date="22-Jul-2013" total-sum="249.40" />
  </sale>
  <sale vendor="Zagorka Corp.">
    <summary date="20-Jul-2013" total-sum="144.80" />
    <summary date="21-Jul-2013" total-sum="341.59" />
    <summary date="22-Jul-2013" total-sum="385.80" />
  </sale>
<sales>

Problem 4 - JSON Reports

3.json

{
  "product-id" : 3,
  "product-name" : "Beer �Beck�s�",
  "vendor-name" : "Zagorka Corp.",
  "total-quantity-sold" : 236,
  "total-incomes" : 262.95,
}

1.json

{
  "product-id" : 1,
  "product-name" : "Beer �Zagorka�",
  "vendor-name" : "Zagorka Corp.",
  "total-quantity-sold" : 673,
  "total-incomes" : 609.24,
}

4.json

{
  "product-id" : 4,
  "product-name" : "Chocolate �Milka�",
  "vendor-name" : "Nestle Sofia Corp.",
  "total-quantity-sold" : 47,
  "total-incomes" : 135.70,
}

2.json

{
  "product-id" : 2,
  "product-name" : "Vodka �Targovishte�",
  "vendor-name" : "Targovishte Bottling Company Ltd.",
  "total-quantity-sold" : 144,
  "total-incomes" : 1155.90,
}

Problem 5 - Load data from XML

Vendors-Expenses.xml

<?xml version="1.0" encoding="utf-8">
<expenses-by-month>
  <vendor name="Nestle Sofia Corp.">
    <expenses month="Jul-2013">30.00</expenses>
    <expenses month="Aug-2013">40.00</expenses>
  </vendor>
  <vendor name="Targovishte Bottling Company Ltd.">
    <expenses month="Jul-2013">200.00</expenses>
    <expenses month="Aug-2013">180.00</expenses>
  </vendor>
  <vendor name="Zagorka Corp.">
    <expenses month="Jul-2013">120.00</expenses>
    <expenses month="Aug-2013">180.00</expenses>
  </vendor>
<expenses-by-month>

Problem 6 - Excel data

Product Name Tax
Beer �Beck�s� 20%
Beer �Zagorka� 20%
Chocolate �Milka� 18%
Vodka �Targovishte� 25%
Vendor Incomes Expenses Taxes Financial Result
Nestle Sofia Corp. 135.70 30 24.43 81.27
Targovishte Bottling Company Ltd. 1155.90 200 288.98 666.92
Zagorka Corp. 872.19 120 174.44 577.75

Additional Requirements