Advertisement
mmouhib

Untitled

Jan 26th, 2022
1,116
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. create database ticketsManager;
  2.  
  3. create table employees(
  4.     id_employee int generated always as identity (increment by 1),
  5.     name text,
  6.     surname text,
  7.     grade int,
  8.     constraint pk_employee primary key (id_employee)
  9. );
  10.  
  11. CREATE TABLE tickets (
  12.     id_ticket int,
  13.     title text,
  14.     buying_date date,
  15.     id_employee int,
  16.     constraint pk_ticket primary key (id_ticket),
  17.     constraint fk_ticket foreign key (id_employee) references employees
  18. );
  19.  
  20.  
  21. create table admins(
  22.     username text,
  23.     password text,
  24.     constraint pk_admin primary key (username)
  25. );
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement