forked from panakuma/book-lib-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMemo
47 lines (39 loc) · 1.29 KB
/
Memo
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
書籍テーブル
ISBN
書籍名
著者
出版社
ジャンル
貸出状況
借用者 所在
create table books(
ISBN bigint(13) unsigned not null primary key,
title varchar(240) collate utf8mb4_general_ci not null,
author varchar(240) collate utf8mb4_general_ci not null,
publisher varchar(240) collate utf8mb4_general_ci not null,
genre varchar(50) collate utf8mb4_general_ci not null,
status varchar(10) collate utf8mb4_general_ci not null,
borrower varchar(8)
) engine=InnoDB collate utf8mb4_general_ci;
履歴テーブル
ID
日時
ISBN
処理者
処理内容(新規・貸出・返却・編集・削除)
create table history(
ID int(5) unsigned zerofill not null auto_increment primary key,
date_time timestamp not null default current_timestamp,
ISBN bigint(13) unsigned not null,
processer varchar(8) collate utf8mb4_general_ci not null,
process varchar(2) collate utf8mb4_general_ci
) engine=InnoDB collate utf8mb4_general_ci;
ユーザーテーブル
ID
StudentID
氏名
create table lc_user(
ID int(5) unsigned zerofill not null auto_increment primary key,
studentID varchar(8) not null,
name varchar(15) collate utf8mb4_general_ci
) engine=InnoDB collate utf8mb4_general_ci;