Skip to content

posting (Einzelbuchung)

Diese Tabelle repräsentiert eine Einzelbuchung.

Attribute

Die Attribute haben folgende Bedeutung:

AttributTypBeschreibung
idintegerID des Objekts
descriptiontextBeschreibung
end_datedateEnddatum
school_year_idintegerFremdschlüssel auf school_year
start_datedateAnfangsdatum
teacher_idintegerFremdschlüssel auf teacher

Erzeugung

Die Tabelle wird mit folgendem SQL-Skript erstellt:

sql
create sequence pensen.posting_id;
grant usage on sequence pensen.posting_id to "pensenmanager";

create table pensen.posting (
  id integer not null primary key,
  teacher_id integer not null,
  school_year_id integer not null,
  description text,
  start_date date,
  end_date date,
  foreign key (teacher_id) references pensen.teacher (id) on update cascade,
  foreign key (school_year_id) references pensen.school_year (id) on update cascade
);
grant delete, insert, select, update on table pensen.posting to "pensenmanager";