Col362 Assignment 1
Col362 Assignment 1
General Instructions
1. Use Postgres 9.3 for loading the datasets and performing experiments.
2. You have to submit four files – a report (report.pdf ), two .sql files (de-
sign.sql and test queries.sql ) and one .csv file (time.csv ). You will lose
full points if the file names deviate from what is mentioned here.
3. . The assignment is due on 29th January,11:59 PM. For each late day, you
will lose 25% of points. We will also not accept partial submissions. For
example, you cannot submit Q1 before deadline and Q2 after deadline.
Database Design
1. Consider the ER diagram shown in figure 1 for a student information
system: The entities are:
(a) student
(b) teacher
(c) course
(d) section
and relationships are:
(a) registers
(b) teaches
Construct the relations (six tables listed above) according to the ER dia-
gram using sql queries in Postgres. Please make sure that the table and
column (attribute) names are exactly the same as those shown in the ER
diagram. Specify proper constraints in your design as shown in the fig-
ure. All the attributes (columns) should be set as strings unless otherwise
stated. You should submit the following files:
1
student_ id name teacher_id name
>=1
student teaches teacher
registers [A, B, C, D]
section_number
course_id
course section
name
>=1
has
2
(c) programmatically, using JDBC.
For example, if bulk load takes 10 seconds, insert statements takes 7 sec-
onds and JDBC takes 5 seconds, time.csv file will contain a single line like
this:
10,7,5
Describe your observations in the pdf submission. [20 points]