-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconstructor.sql
73 lines (64 loc) · 1.92 KB
/
constructor.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
use KERI_ADRI;
create table `KERI_ADRI`.`stay` (
`id` int not null auto_increment,
`theme` varchar(100) not null,
`borough` varchar(2) not null,
primary key (`id`) );
create table `KERI_ADRI`.`car` (
`id` varchar(10) not null,
`brand` varchar(50) not null,
`type` enum('berline', 'cabriolet') not null,
`model` varchar(50) not null,
`available` bit not null,
`id_supervisor` int not null,
`parkingSpace` enum('A0', 'A1', 'A2', 'A3', 'A4', 'A5', 'A6', 'A7', 'A8', 'A9'),
`id_parking` int,
primary key (`id`) );
create table `KERI_ADRI`.`client` (
`id` int not null auto_increment,
`firstname` varchar(20) not null,
`lastname` varchar(20) not null,
`phone` varchar(12) not null,
`adress` varchar(100) not null,
`email` varchar(50) not null,
primary key (`id`) );
create table `KERI_ADRI`.`housing` (
`id` int not null auto_increment,
`bedroomNumber` int not null,
`theme` varchar(3) not null,
`rating` int not null,
`available` bit not null,
`host_id` int not null,
`room_id` int not null,
`price` int not null,
primary key (`id`) );
create table `KERI_ADRI`.`deal` (
`id` int not null auto_increment,
`id_stay` int not null,
`id_car` varchar(10) not null,
`id_client` int not null,
`id_housing` int not null,
`week` int not null,
`year` int not null,
`state` varchar(20) not null,
primary key (`id`) );
create table `KERI_ADRI`.`supervisor` (
`id` int not null auto_increment,
`firstname` varchar(20) not null,
`lastname` varchar(20) not null,
primary key (`id`) );
create table `KERI_ADRI`.`parking` (
`id` int not null auto_increment,
`name` varchar(50) not null,
`adress` varchar(100) not null,
`theme` varchar(3) not null,
primary key (`id`) );
create table `KERI_ADRI`.`maintenance` (
`id` int not null auto_increment,
`id_car` varchar(10) not null,
`cause` varchar(100) not null,
`intervention` varchar(100),
`week` int not null,
`year` int not null,
`done` bit not null,
primary key (`id`) );