Question: Create a new database in your instance of Postgres. The database should contain information about a festival that has several zones. Each zone is dedicated

Create a new database in your instance of Postgres.
The database should contain information about a festival that has several zones. Each zone is dedicated to a specific topic (e.g. music, food court, ecological zone, etc.). Every zone also has employees (one employee can work at different zones).
Write SQL-DDL statements to create a database, that should contain the following four tables:
zone: id, name, designation (food, concert/music, info), opening date, closing date. Primary key - id, auto generated;
employee: id, name, surname, date of birth, gender, status (working, vacation, quit), salary, experience description (can be empty). Primary key - id, auto generated;
participant: id, name, surname, date of birth, gender, preferred zone (should be chosen from the zone table). Primary key - id, auto generated;
employeezones: emp_id, zone_id, two dates - when employee started and ended (can be empty) working in this zone. This table stores workplaces of employees. One employee can work in multiple zones at the same time. Primary key - a group of two attributes {emp_id, zone_id}.
You can write create or replace commands for convenience.
Use foreign key constraints to maintain referential integrity. Add 2 useful check constraints as well.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!