Changes between Version 1 and Version 2 of LogicAndPhysicalDesign


Ignore:
Timestamp:
06/24/25 20:14:19 (4 days ago)
Author:
221007
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • LogicAndPhysicalDesign

    v1 v2  
    4747* institution 
    4848  <pre>
    49   -- enumeration - type of institution
    50   CREATE TYPE institution_type AS ENUM ('Primary School', 'High School', 'University', 'Academy');
    5149
    52   -- institution entity table
    53   CREATE TABLE Institution (
    54     institution_id SERIAL PRIMARY KEY,
    55     name VARCHAR(100) NOT NULL,
    56     address VARCHAR(100),
    57     city VARCHAR(50),
    58     type institution_type NOT NULL,
    59     year_established INT CHECK (year_established >= 1800 AND year_established <= EXTRACT(YEAR FROM CURRENT_DATE)),
    60     CONSTRAINT unique_institution_name_city UNIQUE (name, city)
    61   );
    6250  </pre>
    6351