-
Notifications
You must be signed in to change notification settings - Fork 1
/
database_create_schema_and_tables.txt
45 lines (45 loc) · 1.32 KB
/
database_create_schema_and_tables.txt
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
CREATE SCHEMA `SpeakerModels` ;
CREATE TABLE `SpeakerModels`.`users` (
`id` INT NOT NULL AUTO_INCREMENT,
`name` VARCHAR(45) NULL,
`last_name` VARCHAR(45) NULL,
PRIMARY KEY (`id`),
UNIQUE INDEX `id_UNIQUE` (`id` ASC));
CREATE TABLE `SpeakerModels`.`weight` (
`id` INT NOT NULL AUTO_INCREMENT,
`vec_index` INT NULL,
`value` DOUBLE NULL,
`user` INT NULL,
PRIMARY KEY (`id`),
INDEX `userIdW_idx` (`user` ASC),
CONSTRAINT `userIdW`
FOREIGN KEY (`user`)
REFERENCES `SpeakerModels`.`users` (`id`)
ON DELETE RESTRICT
ON UPDATE RESTRICT);
CREATE TABLE `SpeakerModels`.`mean` (
`id` INT NOT NULL AUTO_INCREMENT,
`row_index` INT NULL,
`column_index` INT NULL,
`value` DOUBLE NULL,
`user` INT NULL,
PRIMARY KEY (`id`),
INDEX `userIdM_idx` (`user` ASC),
CONSTRAINT `userIdM`
FOREIGN KEY (`user`)
REFERENCES `SpeakerModels`.`users` (`id`)
ON DELETE RESTRICT
ON UPDATE RESTRICT);
CREATE TABLE `SpeakerModels`.`covar` (
`id` INT NOT NULL AUTO_INCREMENT,
`row_index` INT NULL,
`column_index` INT NULL,
`value` DOUBLE NULL,
`user` INT NULL,
PRIMARY KEY (`id`),
INDEX `userIdC_idx` (`user` ASC),
CONSTRAINT `userIdC`
FOREIGN KEY (`user`)
REFERENCES `SpeakerModels`.`users` (`id`)
ON DELETE RESTRICT
ON UPDATE RESTRICT);