Data beyond a CSV
Nelisa needs a more efficient way of storing weekly sales data and profits.
- Create a database for Nelisa to store Products, Categories, Sales and Purchases.
- Add Categories to the database using a SQL script.
- Import weekly sales & purchases files into MySQL using NodeJS, using bulk insert.
- Add support for showing the Products, Categories, Sales and Purchases from the database in a web browser.
Learn more about databases at database.projectcodex.co.
For this database section we’re going to take a short break from writing tests. We’ll come back and write tests for this section later, and talk about why we waited to write the tests.
Learning areas
- setting up MySQL;
- modelling your first Database;
- creating tables and relationships using a SQL script file;
- adding data to a table using a SQL script;
- bulk inserting data into MySQL tables;
- using foreign keys;
- displaying data from a Database in a web browser using Express.
Modules to install
- Node module for MySQL (to access MySQL from Node.JS).