Creating Tables and Entering Data Using SQL
The purpose of this assignment is to give you practice with creating database structure using SQL and using the INSERT command to add data.
Read the University Archaeology Museum case. Then use the appropriate command-line client software with Postgres or mySQL to create the database structures necessary for the tables in this document. (They represent only a portion of the tables necessary for the complete museum database.)
Name your database museum. Please also adhere to column names and data types as specified in this document.
Once you have created the tables, load them with the data provided.
Hand in output that lists your tables, their columns, and the test data. How you get the first two depends on the DBMS you are using:
• PostgreSQL: Issue the following two commands. Paste the output into a Word or plain text document to submit.
i) SELECT table_name FROM information_schema.tables WHERE table_schema = ‘public’;
ii) SELECT column_name FROM information_schema.columns WHERE table_name = ‘table_name’;
• MySQL: Issue the following two commands. Paste the output into a Word or plain text document to submit.
i) SHOW TABLES
ii) DESCRIBE table_name
Then issue SELECT * FROM table_name for each table in the database. Paste the output into the Word or plain text document.