create sequence SEQ_SYS_HEYJDEMO_FOLDER_ID MINVALUE 1 MAXVALUE 999999999999999999999999999 increment by 1 nocache;
create sequence SEQ_SYS_HEYJDEMO_FILE_ID MINVALUE 1 MAXVALUE 999999999999999999999999999 increment by 1 nocache;
drop sequence SEQ_SYS_HEYJDEMO_FOLDER_ID ;
drop sequence SEQ_SYS_HEYJDEMO_FILE_ID ;
-- heyjdemo 文件夹表
create table heyjdemo_folders(
ID number(19,0) not null primary key, -- 文件夹标识
parentID number(19,0) not null,
foldername varchar2(255) not null, -- 文件夹名称
folderinfo varchar2(2000), -- 文件夹描述
fileiconurl varchar2(500) -- 文件夹图标路径
);
-- heyjdemo 文件表
create table heyjdemo_files(
ID number(19,0) not null primary key, -- 文件标识
folderID number(19,0) not null constraint heyjdemo_files_ID_FK references heyjdemo_folders(ID) on delete cascade, -- 文件夹标识
filename varchar2(500) not null, -- 文件名
filetype char(10), -- 文件类型
filesize number(19,2), -- 文件大小
fileinfo varchar2(2000), -- 文件描述
fileurl varchar2(500) not null, -- 文件路径
fileiconurl varchar2(500) -- 文件图标
);
-- 向heyjdemo_folders插入记录
insert into heyjdemo_folders (ID, parentID, foldername, folderinfo) values(SEQ_SYS_HEYJDEMO_FOLDER_ID.Nextval,'0','计算机科学','计算机科学');
insert into heyjdemo_folders (ID, parentID, foldername, folderinfo) values(SEQ_SYS_HEYJDEMO_FOLDER_ID.Nextval,'0','文学','文学');
insert into heyjdemo_folders (ID, parentID, foldername, folderinfo) values(SEQ_SYS_HEYJDEMO_FOLDER_ID.Nextval,'1','数据结构','数据结构');
insert into heyjdemo_folders (ID, parentID, foldername, folderinfo) values(SEQ_SYS_HEYJDEMO_FOLDER_ID.Nextval,'1','C语言','C语言');
insert into heyjdemo_folders (ID, parentID, foldername, folderinfo) values(SEQ_SYS_HEYJDEMO_FOLDER_ID.Nextval,'0','c#','c#');
insert into heyjdemo_folders (ID, parentID, foldername, folderinfo) values(SEQ_SYS_HEYJDEMO_FOLDER_ID.Nextval,'0','oracle','oracle');
insert into heyjdemo_folders (ID, parentID, foldername, folderinfo) values(SEQ_SYS_HEYJDEMO_FOLDER_ID.Nextval,'5','数据库','数据库');
insert into heyjdemo_folders (ID, parentID, foldername, folderinfo) values(SEQ_SYS_HEYJDEMO_FOLDER_ID.Nextval,'5','mysql','mysql');
insert into heyjdemo_folders (ID, parentID, foldername, folderinfo) values(SEQ_SYS_HEYJDEMO_FOLDER_ID.Nextval,'5','java','java');
insert into heyjdemo_folders (ID, parentID, foldername, folderinfo) values(SEQ_SYS_HEYJDEMO_FOLDER_ID.Nextval,'0','jsp','jsp');
insert into heyjdemo_folders (ID, parentID, foldername, folderinfo) values(SEQ_SYS_HEYJDEMO_FOLDER_ID.Nextval,'0','我的文档','我的文档');
-- 向heyjdemo_files中插入记录
insert into heyjdemo_files (ID, folderID, filename, fileurl) values(SEQ_SYS_HEYJDEMO_FILE_ID.Nextval, 1, '计算机教程' ,'/' );
insert into heyjdemo_files (ID, folderID, filename, fileurl) values(SEQ_SYS_HEYJDEMO_FILE_ID.Nextval, 4, 'c语言教程' ,'/');
insert into heyjdemo_files (ID, folderID, filename, fileurl) values(SEQ_SYS_HEYJDEMO_FILE_ID.Nextval, 3, '数据结构教程' ,'/');
insert into heyjdemo_files (ID, folderID, filename, fileurl) values(SEQ_SYS_HEYJDEMO_FILE_ID.Nextval, 1, 'tt' ,'/');
insert into heyjdemo_files (ID, folderID, filename, fileurl) values(SEQ_SYS_HEYJDEMO_FILE_ID.Nextval, 5, 'ttt' ,'/');
insert into heyjdemo_files (ID, folderID, filename, fileurl) values(SEQ_SYS_HEYJDEMO_FILE_ID.Nextval, 8, 'tttt' ,'/');