-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtanglab.sql
More file actions
executable file
·144 lines (123 loc) · 3.88 KB
/
tanglab.sql
File metadata and controls
executable file
·144 lines (123 loc) · 3.88 KB
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
mysql -u root -p
show databases;
create database tanglab;
use tanglab
create table plasmid (
id int unsigned not null auto_increment primary key,
name varchar(200) not null,
source varchar(200),
host varchar(50),
size int unsigned,
viral_nonviral varchar(9),
stable_transient varchar(10),
constitutive_inducible varchar(13),
promoter varchar(20),
protein_tags varchar(100),
resistance varchar(200),
rec_site varchar(200),
primer varchar(20),
primer_seq text,
gene varchar(50),
gene_seq text,
vector varchar(50),
vector_seq text,
plasmid_seq text,
notes text,
map varchar(200)
);
describe plasmid;
insert into plasmid values('pET-11','','',4000,'','','','','','','','','','','','','','','','');
insert into plasmid(name,seq) values('pET-30','aaaatttcgaatcgggggggaaaaaatttttt');
grant all privileges on *.* to weibo@localhost identified by '***' with grant option;
grant all privileges on *.* to weibo@"%" identified by '***' with grant option;
grant select,insert,update on tanglab.* to browser@192.168.37.13 identified by '123';
grant select,insert,update on tanglab.userlist to guest@locolhost identified by '123';
create table protocol (
id int unsigned not null auto_increment primary key,
title varchar(500) not null,
subject varchar(200),
created_by varchar(200),
created_date datetime not null,
modified_date datetime,
modified_by varchar(200),
abstract text,
content varchar(300)
);
create table p_history (
id int unsigned not null auto_increment primary key,
p_id int unsigned not null,
author varchar(200),
date datetime not null,
title varchar(500),
subject varchar(200),
address varchar(300)
);
create table p_discussion (
id int unsigned not null auto_increment primary key,
p_id int unsigned not null,
author varchar(200),
date datetime not null,
talk text
);
create table userlist (
id int unsigned not null auto_increment primary key,
username varchar(20) not null,
password varchar(35) not null,
email varchar(50),
level int not null
);
create table reagent (
id int unsigned not null auto_increment primary key,
name varchar(300) not null,
cas_num varchar(20),
storage varchar(300),
class varchar(300),
notes text
);
create table reagent_buy_log (
id int unsigned not null auto_increment primary key,
r_id int unsigned not null,
time date not null,
quantity int,
unit varchar(5),
price int,
specification varchar(50),
total int,
buyer varchar(50),
vendor varchar(200)
);
create table notice (
id int unsigned not null auto_increment primary key,
title varchar(500) not null,
time datetime not null,
content text not null
);
create table attachment (
id int unsigned not null auto_increment primary key,
n_id int unsigned not null,
filename varchar(300) not null,
filesize int not null,
path varchar(300) not null
);
update protocol set title='hello,this is title', subject='this is subject', modified_date='this is the last modified time', modified_by='this is the last author', content='this is content' where id=2;
+-------------------+
| Tables_in_tanglab |
+-------------------+
| attachment |
| notice |
| p_discussion |
| p_history |
| plasmid |
| protocol |
| reagent |
| reagent_buy_log |
| userlist |
+-------------------+
drop user guest@localhost;
grant select,insert,update,delete on tanglab.* to admin@localhost identified by 'a4m1n';
grant select on tanglab.* to guest@localhost identified by '9ue57';
grant select on tanglab.* to labmember@localhost identified by 'u5e7s';
grant select,insert,update on tanglab.protocol to labmember@localhost identified by 'u5e7s';
grant select,insert,update on tanglab.p_discussion to labmember@localhost identified by 'u5e7s';
grant select,insert,update on tanglab.p_history to labmember@localhost identified by 'u5e7s';
grant select,update(password,email) on tanglab.userlist to labmember@localhost identified by 'u5e7s';