Logistics Behind getting Data and Database Preparation | Learn SQL from Scratch 1 | Kovolff

Опубликовано: 26 Март 2026
на канале: kovolff
128
0

If you’re planning to pursue the course with the same dataset used in the course, then the easiest path would be to use one the links below.

Links for course data:
Postgres Dump: http://downloads.kovolff.com/openfood...
Plain Dump: http://downloads.kovolff.com/openfood...
SQLite Database (DB Browser): http://downloads.kovolff.com/baseline...
CSV 400.000 Rows: http://downloads.kovolff.com/openfood...
CSV 100.000 Rows: http://downloads.kovolff.com/openfood...

If you’re planning to use an SQL database of your choice, then the easiest way would be to download http://downloads.zaitt.works/baseline... and then export the data as a CSV file or the database as an SQL file. This can then be easily imported into your target database.

If you want to do the whole process I did on your own, then you have to download the data from Open Food Facts.
Website: https://world.openfoodfacts.org/
Terms of use: https://world.openfoodfacts.org/terms...
CSV file: https://static.openfoodfacts.org/data...

Then either you split the CSV with the help of CSV Splitter (https://www.erdconcepts.com/dbtoolbox...) or import it completely into your database.

Should your database require knowledge of the fields in the CSV prior to importing the CSV file, then you have to find a way to extract these fields. I did this with DB Browser for SQLite.

Once all data is imported you can test your database by sending the following SQL statement:
SELECT * FROM [your_table_name]

You should receive all the data you imported.

Create table in Postgres:
http://downloads.zaitt.works/postgres...

Import CSV into Postgres, after creating the table above:
COPY public.openfoodfacts_data
FROM 'E:\zaitt.works\Reel\baseline.sql\en.openfoodfacts.org.products.csv'
--DELIMITER E'\t' CSV;
DELIMITER ';' CSV;

#sql #postgres #databases