forked from acenelio/demo-dao-jdbc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
database.sql
30 lines (27 loc) · 981 Bytes
/
database.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
CREATE TABLE department (
Id int(11) NOT NULL AUTO_INCREMENT,
Name varchar(60) DEFAULT NULL,
PRIMARY KEY (Id)
);
CREATE TABLE seller (
Id int(11) NOT NULL AUTO_INCREMENT,
Name varchar(60) NOT NULL,
Email varchar(100) NOT NULL,
BirthDate datetime NOT NULL,
BaseSalary double NOT NULL,
DepartmentId int(11) NOT NULL,
PRIMARY KEY (Id),
FOREIGN KEY (DepartmentId) REFERENCES department (id)
);
INSERT INTO department (Name) VALUES
('Computers'),
('Electronics'),
('Fashion'),
('Books');
INSERT INTO seller (Name, Email, BirthDate, BaseSalary, DepartmentId) VALUES