Menu

[b29b51]: / initdb-oracle.sql  Maximize  Restore  History

Download this file

136 lines (106 with data), 3.3 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
-- This assumes you have a user 'lxr' set up already.
drop sequence lxr_filenum;
drop sequence lxr_symnum;
drop sequence lxr_declnum;
drop table lxr_indexes;
drop table lxr_declarations;
drop table lxr_usage;
drop table lxr_symbols;
drop table lxr_releases;
drop table lxr_status;
drop table lxr_files;
commit;
create sequence lxr_filenum
INCREMENT BY 1
START WITH 1
NOMAXVALUE
NOMINVALUE
CACHE 5
NOORDER;
create sequence lxr_symnum
INCREMENT BY 1
START WITH 1
NOMAXVALUE
NOMINVALUE
CACHE 5
NOORDER;
create sequence lxr_declnum
INCREMENT BY 1
START WITH 1
NOMAXVALUE
NOMINVALUE
CACHE 5
NOORDER;
commit;
create table lxr_files (
filename varchar2(250),
revision varchar2(250),
fileid number,
constraint lxr_pk_files primary key (fileid)
);
alter table lxr_files add unique (filename, revision);
create index lxr_i_files on lxr_files(filename);
commit;
create table lxr_symbols (
symname varchar2(250),
symid number,
constraint pk_lxr_symbols primary key (symid)
);
alter table lxr_symbols add unique(symname);
commit;
create table lxr_declarations (
declid number NULL,
langid number NULL,
declaration varchar2(255),
constraint pk_lxr_declarations primary key (declid)
);
commit;
create table lxr_indexes (
symid number,
fileid number,
line number,
langid number,
type number,
relsym number,
constraint fk_lxr_indexes_symid foreign key (symid) references lxr_symbols(symid),
constraint fk_lxr_indexes_fileid foreign key (fileid) references lxr_files(fileid),
/*constraint fk_lxr_indexes_langid foreign key (langid, type) references lxr_declarations(langid, declid),
*/
constraint fk_lxr_indexes_relsym foreign key (relsym) references lxr_symbols(symid)
);
create index lxr_i_indexes on lxr_indexes(symid);
commit;
create table lxr_releases (
fileid number,
release varchar2(250),
constraint pk_lxr_releases primary key (fileid,release),
constraint fk_lxr_releases_fileid foreign key (fileid) references lxr_files(fileid)
);
commit;
create table lxr_status (
fileid number,
status number,
constraint pk_lxr_status primary key (fileid),
constraint fk_lxr_status_fileid foreign key (fileid) references lxr_files(fileid)
);
commit;
create table lxr_usage (
fileid number,
line number,
symid number,
constraint fk_lxr_usage_fileid foreign key (fileid) references lxr_files(fileid),
constraint fk_lxr_usage_symid foreign key (symid) references lxr_symbols(symid)
);
create index lxr_i_usage on lxr_usage(symid);
--grants
grant select on lxr_filenum to lxr;
grant select on lxr_symnum to lxr;
grant select on lxr_declnum to lxr;
grant select, insert, update, delete on lxr_indexes to lxr;
grant select, insert, update, delete on lxr_usage to lxr;
grant select, insert, update, delete on lxr_symbols to lxr;
grant select, insert, update, delete on lxr_releases to lxr;
grant select, insert, update, delete on lxr_status to lxr;
grant select, insert, update, delete on lxr_files to lxr;
grant select, insert, update, delete on lxr_declarations to lxr;
commit;
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.