diff options
Diffstat (limited to 'graphs/sql/a_new_dawn/req01.sql')
| -rw-r--r-- | graphs/sql/a_new_dawn/req01.sql | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/graphs/sql/a_new_dawn/req01.sql b/graphs/sql/a_new_dawn/req01.sql new file mode 100644 index 0000000..78015ec --- /dev/null +++ b/graphs/sql/a_new_dawn/req01.sql @@ -0,0 +1,66 @@ +CREATE SCHEMA nexus; +CREATE SCHEMA nexus_it; +CREATE SCHEMA techwave; +CREATE SCHEMA nexus_food; +CREATE SCHEMA guardforce; +CREATE TYPE nexus.position AS ENUM ( + 'JUNIOR', + 'SENIOR', + 'MANAGER', + 'DIRECTOR' +); +CREATE TYPE nexus.relationship_type AS ENUM ( + 'PARENT', + 'SUBSIDIARY', + 'AFFILIATE' +); +CREATE TYPE nexus_food.nutriscore AS ENUM ( + 'A', + 'B', + 'C', + 'D', + 'E' +); +CREATE TABLE nexus.employees +( + id SERIAL PRIMARY KEY, + first_name VARCHAR(25), + last_name VARCHAR(25), + employee_position nexus.position, + salary NUMERIC(10, 2) +); +CREATE TABLE nexus.nexus_relations +( + id SERIAL PRIMARY KEY, + parent_company VARCHAR(25), + child_company VARCHAR(25), + relationship_type nexus.relationship_type +); +CREATE TABLE nexus_it.software_assets +( + id SERIAL PRIMARY KEY, + software_name VARCHAR(50), + license_key UUID, + expiration_date DATE +); +CREATE TABLE techwave.project_milestones +( + id SERIAL PRIMARY KEY, + milestone_name VARCHAR(50), + due_date DATE, + completion_status BOOLEAN +); +CREATE TABLE nexus_food.products +( + id SERIAL PRIMARY KEY, + product_name VARCHAR(25), + product_nutriscore nexus_food.nutriscore +); +CREATE TABLE guardforce.incident_reports +( + id SERIAL PRIMARY KEY, + incident_description TEXT, + incident_date TIMESTAMP, + incident_location VARCHAR(50), + reported_by VARCHAR(50) +); |
