Commit 97e0ad42 authored by Thomas Klauer's avatar Thomas Klauer

Merge branch 'undefined' into 'master'

Bei Teilaufgabe 2.3 hatte ich Verständnisprobleme.

See merge request thomasklauer/datenbanken-ss20!2
parents 60ec0be6 1e07f70f
create table employees
(employee_id serial not null primary key,
last_name varchar(20) not null,
first_name varchar(30) not null,
title varchar(30),
title_of_courtesy varchar(25),
birth_date date,
hire_date date,
address varchar(60),
city varchar(15),
region varchar(15),
postal_code varchar(10),
country varchar(15),
home_phone varchar(24),
extension varchar(4),
photo bytea,
notes text,
reports_to smallint,
photo_path varchar(255)
create table regions
region_id integer primary key,
region_headquarter_city varchar(40) not null
create table employee_regions
employee_id int references employees(employee_id),
region_id int references regions(region_id)
insert into regions(region_id, region_headquarter_city)
values(1, 'Mainz'),(2, 'Madrid'),(3, 'Miami'), (4, 'Rio de Janeiro');
alter table orders
add foreign key (employee_id) references employees(employee_id);
alter table employees
add column phone_number varchar(24);
create index idx_last_name on employees(last_name);
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment