CSC 436 - Assignment #2
PostgreSQL
Data Files




The following data files can be used to insert the data into your tables using the copy command.
film_data.txt
actor_data.txt
roles_data.txt
studio_data.txt
item_data.txt
cart_data.txt

To insert the data into your tables, you must first create the tables using the CREATE TABLE command. You should create them in a careful order based on which tables have references to which other tables.

To see the structure of your table, use the command: \d [NAME] where NAME is the table name.  

To see a list of the tables that you have created, use the command: \d

Use the copy command to insert the data from the data files. It should look something like this:

\copy film from 'film_data.txt' with delimiter as ','

You should make sure that the data files are in the linux directory from which you launch psql.

To check that the data was successfully inserted into the FILM table for instance, enter the command SELECT * FROM FILM .