- Notifications
You must be signed in to change notification settings - Fork 770
Expand file tree
/
Copy pathschema.sql
More file actions
Latest commit
17 lines (15 loc) · 358 Bytes
/
Copy pathschema.sql
File metadata and controls
17 lines (15 loc) · 358 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
CREATEDATABASErecord_company;
USE record_company;
CREATETABLEbands (
id INTNOT NULL AUTO_INCREMENT,
name VARCHAR(255) NOT NULL,
PRIMARY KEY (id)
);
CREATETABLEalbums (
id INTNOT NULL AUTO_INCREMENT,
name VARCHAR(255) NOT NULL,
release_year INT,
band_id INTNOT NULL,
PRIMARY KEY (id),
FOREIGN KEY (band_id) REFERENCES bands(id)
);