-
Notifications
You must be signed in to change notification settings - Fork 0
/
library.sql
86 lines (71 loc) · 2.06 KB
/
library.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#
# Table structure for table `Bookmarks`
#
CREATE TABLE Bookmarks (
id int(11) NOT NULL auto_increment,
readerid int(11) NOT NULL,
bookid int(11) NOT NULL,
PRIMARY KEY (id)
) ENGINE=MyISAM AUTO_INCREMENT=58 DEFAULT CHARSET=utf8;
# --------------------------------------------------------
#
# Table structure for table `Books`
#
CREATE TABLE Books (
id int(11) NOT NULL auto_increment,
title varchar(45) NOT NULL,
author varchar(50) NOT NULL,
categoryid text NOT NULL,
count int(11) NOT NULL,
publication varchar(45) default NULL,
placepublication varchar(45) default NULL,
yearpublication varchar(20) default NULL,
countpages int(11) default NULL,
price float NOT NULL,
isbn char(17) default NULL,
datecome varchar(20) default NULL,
img text NOT NULL,
shortstory text NOT NULL,
fullstory text NOT NULL,
PRIMARY KEY (id)
) ENGINE=MyISAM AUTO_INCREMENT=89 DEFAULT CHARSET=utf8;
#
# Table structure for table `Categories`
#
CREATE TABLE Categories (
id int(11) NOT NULL auto_increment,
`name` varchar(50) NOT NULL,
PRIMARY KEY (id)
) ENGINE=MyISAM AUTO_INCREMENT=110 DEFAULT CHARSET=utf8;
#
# Table structure for table `Readers`
#
CREATE TABLE Readers (
id int(11) NOT NULL auto_increment,
sername varchar(30) default NULL,
`name` varchar(30) NOT NULL,
datebirth varchar(10) default NULL,
address varchar(60) default NULL,
contphone varchar(20) default NULL,
sex enum('m','f') default NULL,
email varchar(45) NOT NULL,
`password` varchar(32) NOT NULL,
`status` smallint(2) default NULL,
PRIMARY KEY (id)
) ENGINE=MyISAM AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;
#
# Dumping data for table `Readers`
#
INSERT INTO Readers VALUES (1, 'GOL', 'r0n9', '621115200', '', '', 'm', 'ron9.gol@gmail.com', md5('1'), 0);
#
# Table structure for table `TRBooks`
#
CREATE TABLE TRBooks (
id int(11) NOT NULL auto_increment,
readerid int(11) NOT NULL,
bookid int(11) NOT NULL,
count int(11) NOT NULL,
datet varchar(20) NOT NULL,
dater varchar(20) NOT NULL,
PRIMARY KEY (id)
) ENGINE=MyISAM AUTO_INCREMENT=20 DEFAULT CHARSET=utf8;