First iteration of the database creation code.