Skip to content

posting_detail (Detail zu Einzelbuchung)

Diese Tabelle repräsentiert ein Detail zu einer Einzelbuchung.

Attribute

Die Attribute haben folgende Bedeutung:

AttributTypBeschreibung
posting_idintegerFremdschlüssel auf posting
school_year_idintegerFremdschlüssel auf school_year
teacher_idintegerFremdschlüssel auf teacher
type_idintegerFremdschlüssel auf posting_type
valuedoubleWert (Lektionen oder Prozent)

Erzeugung

Die Tabelle wird mit folgendem SQL-Skript erstellt:

sql
create table pensen.posting_detail (
  posting_id integer not null,
  type_id integer not null,
  school_year_id integer not null,
  teacher_id integer not null,
  value double precision not null,
  primary key (posting_id, type_id),
  foreign key (posting_id) references pensen.posting (id) on update cascade on delete cascade,
  foreign key (school_year_id) references pensen.school_year (id),
  foreign key (teacher_id) references pensen.teacher (id),
  foreign key (type_id) references pensen.posting_type (id)
);
grant delete, insert, select on table pensen.posting_detail to "pensenmanager";