-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathschema.sql
More file actions
35 lines (32 loc) · 752 Bytes
/
schema.sql
File metadata and controls
35 lines (32 loc) · 752 Bytes
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
drop table if exists users;
create table users (
id integer primary key autoincrement,
netid text not null,
password text not null
);
drop table if exists books;
create table books (
id integer primary key autoincrement,
name text not null,
authors text not null,
copies integer not null,
available integer not null,
cover text not null,
year integer,
category text
);
drop table if exists requests;
create table requests (
bookname text primary key,
category text,
author text
);
drop table if exists reservations;
create table reservations (
id integer primary key autoincrement,
netid text not null,
bookid integer not null,
bookname text not null,
startdate DATETIME not null,
returned integer not null
);