Topic 3: Introduction to Database Task
GDSC ITB
- Create an ER diagram consisting of a minimum five entities with three different types of relationships (one-to-one, one-to-many, many-to-many). Provide an explanation for each entity and relationship in the ER diagram.
- Setup a local PostgreSQL database and create a new database. Fill the newly created database with tables from the ER diagram (no need to add any constraint to the tables).
- Perform each CRUD operation to the database. Give a minimum of five different queries for each operation.
- Add attribute, relational, and database constraints to the database. For each type of constraint, provide two implementations and give an explanation why the constraint is needed. Explore what happens when a query breaks an integrity constraint (e.g. performing an insertion or deletion on the database).