Sei sulla pagina 1di 1

SQL Assignment 1, CS345 Fall 2011, IITG

Instructions: 1. This is an individual assignment. You are NOT supposed to work in groups. 2. Assignment is due on Monday, November 7. 3. Submit your assignment as a single file containing all SQL statements and other data files. The teaching assistants will run your file on a MySQL server. Make sure that your file properly runs on a MySQL server. 4. Your SQL assignment 2 will be based on your assignment 1 submission. Therefore, indulging in copying is a dangerous business. Assignment: Create a relation schema which is in 2NF but not in 3NF. Write SQL statements to create tables corresponding to this schema. Modify this schema to be in 3NF. Write SQL statements to modify tables according to new schema. Write SQL statements to insert records into tables by reading data from files Write SQL statements that demonstrate following features of SQL o Various join operations o Correlation name / Tuple variable o Ordering tuples in the output o Various set operations o Using NULL values o Using aggregate functions and HAVING clause o Nested sub-queries o Testing for duplicate tuples o Creating and using views o Creating various indices o Emptying all tables o Deleting all tables and the database

Potrebbero piacerti anche