-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatabase.sql
More file actions
86 lines (75 loc) · 4.77 KB
/
database.sql
File metadata and controls
86 lines (75 loc) · 4.77 KB
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
SET @OLD_UNIQUE_CHECKS = @@UNIQUE_CHECKS, UNIQUE_CHECKS = 0;
SET @OLD_FOREIGN_KEY_CHECKS = @@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS = 0;
SET @OLD_SQL_MODE = @@SQL_MODE, SQL_MODE = 'TRADITIONAL,ALLOW_INVALID_DATES';
DROP SCHEMA IF EXISTS `test_lab2`;
CREATE SCHEMA IF NOT EXISTS `test_lab2`
DEFAULT CHARACTER SET utf8;
CREATE USER 'testUser'@'localhost' IDENTIFIED BY 'test_password';
GRANT ALL PRIVILEGES ON `test_lab2` . * TO 'testUser'@'localhost';
USE `test_lab2`;
CREATE TABLE IF NOT EXISTS `test_lab2`.`user` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`name` VARCHAR(20) NOT NULL,
`surname` VARCHAR(20) NOT NULL,
`email` VARCHAR(255) NOT NULL,
`phone` VARCHAR(20) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE = InnoDB;
INSERT INTO `test_lab2`.`user` (`name`, `surname`, `email`, `phone`)
VALUES ("Gisela", "Bond", "[email protected]", "(168) 623-0023"),
("Fay", "Ellis", "[email protected]", "(497) 253-8625"),
("Paloma", "Guzman", "[email protected]", "(528) 149-2954"),
("Hall", "Boyd", "[email protected]", "(238) 576-9526"),
("Jonas", "Norman", "[email protected]", "(261) 269-4422"),
("Bruce", "Moreno", "[email protected]", "(132) 671-7413"),
("Laura", "Holmes", "[email protected]", "(816) 804-9057"),
("Kelly", "Payne", "[email protected]", "(664) 203-3834"),
("Hermione", "Newton", "[email protected]", "(112) 136-4178"),
("Chase", "Bowers", "[email protected]", "(492) 982-1374");
INSERT INTO `user` (`name`, `surname`, `email`, `phone`)
VALUES ("Shoshana", "Carrillo", "[email protected]", "(452) 281-4655"),
("Vance", "Miranda", "[email protected]", "(262) 335-8623"),
("Kendall", "Douglas", "[email protected]", "(115) 634-5536"),
("Justina", "Hampton", "[email protected]", "(454) 503-7931"),
("Amal", "Mcdaniel", "[email protected]", "(803) 307-2346"),
("Joy", "Cook", "[email protected]", "(355) 166-5823"),
("Madonna", "Hardy", "[email protected]", "(599) 764-7812"),
("Carolyn", "Drake", "[email protected]", "(987) 221-0093"),
("Price", "Summers", "[email protected]", "(860) 270-8031"),
("Iola", "Porter", "[email protected]", "(462) 250-1235");
INSERT INTO `user` (`name`, `surname`, `email`, `phone`)
VALUES ("Winifred", "Mayer", "[email protected]", "(304) 702-5337"),
("Karen", "Mccarthy", "[email protected]", "(521) 732-2167"),
("Karyn", "Good", "[email protected]", "(671) 499-3354"),
("Paula", "Whitehead", "[email protected]", "(229) 249-5730"),
("Kirk", "Ramos", "[email protected]", "(310) 263-2781"),
("Marcia", "Jacobs", "[email protected]", "(586) 818-5842"),
("Cain", "Gilmore", "[email protected]", "(690) 555-4582"),
("Chancellor", "Webb", "[email protected]", "(128) 107-4765"),
("Harlan", "Kim", "[email protected]", "(565) 447-6871"),
("Amaya", "Charles", "[email protected]", "(841) 524-7901");
INSERT INTO `user` (`name`, `surname`, `email`, `phone`)
VALUES ("Isabelle", "Anthony", "[email protected]", "(957) 843-6243"),
("Tyrone", "Cooley", "[email protected]", "(491) 612-7524"),
("Summer", "Underwood", "[email protected]", "(163) 766-5996"),
("Declan", "Weeks", "[email protected]", "(466) 708-5694"),
("Alfreda", "Butler", "[email protected]", "(265) 367-5712"),
("Amy", "Swanson", "[email protected]", "(846) 572-7285"),
("Victoria", "Holland", "[email protected]", "(556) 131-6423"),
("Katell", "Brooks", "[email protected]", "(538) 317-7791"),
("Sydnee", "Powell", "[email protected]", "(983) 590-5283"),
("Penelope", "Humphrey", "[email protected]", "(823) 429-6091");
INSERT INTO `user` (`name`, `surname`, `email`, `phone`)
VALUES ("Drew", "Forbes", "[email protected]", "(350) 740-5268"),
("Uriah", "Crane", "[email protected]", "(169) 497-1596"),
("Desirae", "Francis", "[email protected]", "(424) 672-0458"),
("Palmer", "Fitzpatrick", "[email protected]", "(518) 865-5644"),
("Christopher", "Bryant", "[email protected]", "(189) 806-5063"),
("Hayley", "Vaughan", "[email protected]", "(532) 262-4463"),
("Alisa", "Nguyen", "[email protected]", "(493) 297-5791"),
("Dorothy", "Kim", "[email protected]", "(416) 906-9170"),
("Hermione", "Conrad", "[email protected]", "(135) 552-0691"),
("Griffith", "George", "[email protected]", "(843) 412-2787");
SET SQL_MODE = @OLD_SQL_MODE;
SET FOREIGN_KEY_CHECKS = @OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS = @OLD_UNIQUE_CHECKS;