|
|
|
@ -1,4 +1,26 @@ |
|
|
|
|
CREATE DATABASE pmv; |
|
|
|
|
USE pmv; |
|
|
|
|
|
|
|
|
|
CREATE TABLE mitglied ( |
|
|
|
|
nr int(11) unsigned NOT NULL, |
|
|
|
|
vorname varchar(40) NOT NULL, |
|
|
|
|
nachname varchar(40) NOT NULL, |
|
|
|
|
geburtsdatum date NOT NULL, |
|
|
|
|
email varchar(80) DEFAULT NULL, |
|
|
|
|
telefon varchar(20) DEFAULT NULL, |
|
|
|
|
nickname varchar(32) DEFAULT NULL, |
|
|
|
|
strasse varchar(40) DEFAULT NULL, |
|
|
|
|
plz mediumint(5) DEFAULT NULL, |
|
|
|
|
ort varchar(40) DEFAULT NULL, |
|
|
|
|
staatsang varchar(2) NOT NULL COMMENT 'ISO2-Kürzel', |
|
|
|
|
eintrittsdatum date NOT NULL, |
|
|
|
|
austrittsdatum date DEFAULT NULL, |
|
|
|
|
schwebend tinyint(1) NOT NULL DEFAULT 1, |
|
|
|
|
stimmberechtigt tinyint(1) DEFAULT 0, |
|
|
|
|
PRIMARY KEY (nr), |
|
|
|
|
KEY ix_nachname (nachname), |
|
|
|
|
KEY ix_nickname (nickname) |
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; |
|
|
|
|
|
|
|
|
|
CREATE TABLE beitrag ( |
|
|
|
|
mitgliednr int(11) unsigned NOT NULL, |
|
|
|
@ -74,26 +96,6 @@ CREATE TABLE konto ( |
|
|
|
|
CONSTRAINT fk_konto_mitglied FOREIGN KEY (mitgliednr) REFERENCES mitglied (nr) |
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; |
|
|
|
|
|
|
|
|
|
CREATE TABLE mitglied ( |
|
|
|
|
nr int(11) unsigned NOT NULL, |
|
|
|
|
vorname varchar(40) NOT NULL, |
|
|
|
|
nachname varchar(40) NOT NULL, |
|
|
|
|
geburtsdatum date NOT NULL, |
|
|
|
|
email varchar(80) DEFAULT NULL, |
|
|
|
|
telefon varchar(20) DEFAULT NULL, |
|
|
|
|
nickname varchar(32) DEFAULT NULL, |
|
|
|
|
strasse varchar(40) DEFAULT NULL, |
|
|
|
|
plz mediumint(5) DEFAULT NULL, |
|
|
|
|
ort varchar(40) DEFAULT NULL, |
|
|
|
|
staatsang varchar(2) NOT NULL COMMENT 'ISO2-Kürzel', |
|
|
|
|
eintrittsdatum date NOT NULL, |
|
|
|
|
austrittsdatum date DEFAULT NULL, |
|
|
|
|
schwebend tinyint(1) NOT NULL DEFAULT 1, |
|
|
|
|
stimmberechtigt tinyint(1) DEFAULT 0, |
|
|
|
|
PRIMARY KEY (nr), |
|
|
|
|
KEY ix_nachname (nachname), |
|
|
|
|
KEY ix_nickname (nickname) |
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; |
|
|
|
|
|
|
|
|
|
CREATE TABLE wahl ( |
|
|
|
|
id smallint(5) unsigned NOT NULL, |
|
|
|
|