You are given the task of writing a simple program which reads from a given CSV file and saves the data in a database. This challenge can be completed in about 2 hours, however there is no time limit as such.
sales.csv
: The csv file which your program needs to parse. It is a small list of sales made in a store.schema.sql
: The DDL for the database your program needs to use. This DDL is written for a MySQL DB, however you may use any DB of your choosing as long as the constraints are the same.
The tables are not of correct structure, and that is intentionally done. We expect you to think and correct the tables structure as necessary.
- The program needs to be written in Java
- Create your solution as if you were in a real-life project and it would have to be shipped into production after you are done (read that again, and REALLY consider it in your approach).
- For the purpose of this exercise you can assume that we already have a database containing the necessary tables; you don't need to include the database itself in your solution.
- Please include a short readme when returning your solution describing decisions and assumptions you made during development.
- Please submit as a ZIP file over either email or DropBox/Google Drive/etc - do NOT push to a public repository.
- Readability
- Adherence to best practices
- Extensibility (what if we wanted to add an other source later, or a different database?)
- Exception handling