Create a MongoDB Database Schema (at least 3 tables x at least 4 columns + fill tables with a few records)
Closed this issue · 4 comments
martin-nikolov commented
- A factory of your choice holds information about its products in MongoDB database consisting of at least 3 tables.
For example you may have the following schema for beer factory:
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 |
… | … |
Do not use the provided example but think of another case.
- Create your tables with at least 4 columns and try to be creative (it will be part of your final score).
- For testing purposes please fill between 10 and 50 records in each table.
- Try to use real-world data.
- You may use sequential IDs for the primary key or any other primary key notation.
martin-nikolov commented
Is MongoDB the correct place to holds Countries, Cities and Addresses tables?
- Our opinion is that there is no matter where should be these tables and we decided to hold them in MongoDB Cloud Database (Mongolab).
martin-nikolov commented
Added tables in MongoDB Cloud Database (Mongolab):
- Countries (2 columns) + 7 records
- Cities (3 columns) + 10 records
- Addresses (3 columns) + 11 records
- ProductTypes (2 columns) + 12 records
- Manufacturers (3 columns) + 11 records
- Products (9 columns) + 18 records
martin-nikolov commented
TODO: Add a new collection -> ManufacturerExpenses (data parsed from XML) -> Done!
martin-nikolov commented
Not implemented:
- You may use sequential IDs for the primary key or any other primary key notation.
- Not all tables are with least 4 columns.