forked from AC-FuSa-Tools/kern_bin_db-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdb_sqlite.sql
18 lines (16 loc) · 1.33 KB
/
db_sqlite.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
drop table configs; drop table files;
drop table instances; drop table symbols;
drop table tags; drop table xrefs;
create table instances (instance_id INTEGER PRIMARY KEY, version_string varchar(40), note varchar(50));
create table xrefs (caller int, callee int, ref_addr varchar(20), source_line varchar(1024), xref_instance_id_ref int);
create table tags (tag_id INTEGER PRIMARY KEY, subsys_name varchar(100), tag_file_ref_id int not null, tag_instance_id_ref int not null);
create table configs (config_id INTEGER PRIMARY KEY, config_symbol varchar(50), config_value varchar(150), config_instance_id_ref int not null);
create table symbols (symbol_id INTEGER PRIMARY KEY, symbol_name varchar(100), symbol_address varchar(20), symbol_type varchar(15), symbol_file_ref_id int, symbol_instance_id_ref int not null);
create table files (file_id INTEGER PRIMARY KEY, file_name varchar (100), file_instance_id_ref int not null);
create index symbol_name_idx on symbols (symbol_name);
create index caller_idx on xrefs (caller);
create index callee_idx on xrefs (callee);
create index file_name_idx on files (file_name);
create index tag_file_ref_id_idx on tags (tag_file_ref_id);
create index symbol_file_ref_id_idx on symbols (symbol_file_ref_id);
create index symbol_address_idx on symbols (symbol_address ASC, symbol_instance_id_ref ASC);