COMP 340: Databases, Fall 2016
Project Milestone 3
Your task for this milestone is get data that you can use to populate
your database.
Your database will probably need some initial "seed" data to get started, as usually
an application running with an empty database is not particularly useful, because lots of features
can't be demonstrated on an empty database. For instance, if you are building an online store, having no products and/or no
registered customers does not make for a useful application.
- Determine how you will find some data that you can use to populate your database. This data does not necessarily have to
be "real world" data, but it's nice if it is. On the other hand, there are many ways to generate fake data that appears to be
real. As an example, for the flights database used in HW2, I used a real-world listing of airlines, sources, and destinations, but
I wrote a Python program to generate fake flight numbers and picked source-destination pairs randomly. Then I generated a bunch of
fake name/address data by using Mockaroo. If you google for "fake data generator" you'll find
other websites that can generate plenty of data.
- Create a script that will populate your database tables (from schema.sql) with your initial seed data. This script can be
similar to the populate.sql file that we wrote for our Flask applications, or it can be a populate.py file that inserts data using Python
into your tables. It's easy to interface with a SQLite database from Python.
What to turn in
On Moodle, turn in your populate script (this will probably be either a file called populate.sql, or
populate.py). I should be able to directly run this file on my computer, either by running the SQL commands in SQLite, or by
running the populate.py program. If you have altered your database schema, upload a new version of schema.sql as well.