- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate.sql
More file actions
Latest commit
22 lines (19 loc) · 566 Bytes
/
Copy pathcreate.sql
File metadata and controls
22 lines (19 loc) · 566 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
pragma foreign_keys =ON;
createtablemagazine (
magazine_key integerprimary key autoincrement,
title varchar(255) not null,
short varchar(255),
image varchar(255),
published datetime
);
createtableauthor (
author_key integerprimary key autoincrement,
first_name varchar(255) not null,
second_name varchar(255) not null,
third_name varchar(255)
);
createtablemagazine_authors (
magazine_key integernot nullreferences magazine(magazine_key),
author_key integernot nullreferences author(author_key),
primary key (magazine_key, author_key)
);