注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

阿弥陀佛

街树飘影未见尘 潭月潜水了无声 般若观照心空静...

 
 
 

日志

 
 
关于我

一直从事气象预报、服务建模实践应用。 注重气象物理场、实况场、地理信息、本体知识库、分布式气象内容管理系统建立。 对Barnes客观分析, 小波,计算神经网络、信任传播、贝叶斯推理、专家系统、网络本体语言有一定体会。 一直使用Java、Delphi、Prolog、SQL编程。

网易考拉推荐

RAMADDA在Oracle环境下运行存在的问题  

2012-09-04 18:45:12|  分类: Ramadda |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
create tablespace ramadda
 logging
 datafile 'c:\db\ramadda.dbf'
size 100m
autoextend on
next 32m maxsize 2048m
 extent management local;

drop user china cascade;
create user china identified by china
 default tablespace ramadda
 temporary tablespace  temp;
 grant dba to china ;
 

#oracle settings
ramadda.db.oracle.driver=oracle.jdbc.driver.OracleDriver
ramadda.db.oracle.url=jdbc:oracle:thin:@//localhost:1521/orcl
ramadda.db.oracle.user=china
ramadda.db.oracle.password=china

spool   d:\AAA.TXT

SELECT   .....

SPOOL   OFF

ant 编译后,需要将ojdbc6.jar 放在D:\tomcat\webapps\china\WEB-INF\lib\

编译前需要对makedb.sql大量修改。
修改后,仍然存在很多问题(table ftp, localfiles 都没有建立,要命的是table entries 加载失败 ):
-----------------------------------------------------------------------
---Note: the date and ramadda.double are replaced by ramadda
---with the appropriate datatype for the database being used.
---mysql has a datetime type, postgres and derby have timestamp
---we can't use timestamp for mysql because it only goes back to 1970
---derby and mysql have double. postgres has float8
-----------------------------------------------------------------------
-----------------------------------------------------------------------
--- the main entries table
-----------------------------------------------------------------------
CREATE TABLE entries (
  id varchar(200) ,
  type varchar(200),
  name varchar(200),
  description varchar(4000),
  parent_group_id varchar(200),
  user_id varchar(200),
 "resource" varchar(500),
 resource_type varchar(200),
 md5           varchar(32),
 filesize long,
 datatype varchar(200),
 createdate date,
 changedate date,
 fromdate date,
 todate date,
 south number(12,4),
 north number(12,4),
 east number(12,4),
 west number(12,4),
 altitudetop number(12,4),
 altitudebottom number(12,4));

---- things to add????
---- file size
---- properties -  maybe a blob to hold a serialized hashtable
---- Then the DataOutputHandler could add a flag to the entry which is the data type, e.g., netcdf, grid, etc
----

---- ALTER TABLE entries DROP COLUMN top_group_id;


--- for mysql
--- alter table entries modify column resource varchar(500);
--- for derby
---alter table entries alter column resource set data type varchar(500);

CREATE INDEX ENTRIES_INDEX_ID ON entries (ID);
CREATE INDEX ENTRIES_INDEX_RESOURCE ON entries ("resource");
CREATE INDEX ENTRIES_INDEX_DATATYPE ON entries (DATATYPE);
CREATE INDEX ENTRIES_INDEX_PARENT_GROUP_ID ON entries (PARENT_GROUP_ID);
--- CREATE INDEX ENTRIES_INDEX_TOP_GROUP_ID ON entries (TOP_GROUP_ID);
CREATE INDEX ENTRIES_INDEX_TYPE ON entries (TYPE);
CREATE INDEX ENTRIES_INDEX_USER_ID ON entries (USER_ID);
CREATE INDEX ENTRIES_INDEX_FROMDATE ON entries (FROMDATE);
CREATE INDEX ENTRIES_INDEX_TODATE ON entries (TODATE);

CREATE TABLE ancestors (id varchar(200),
                    ancestor_id varchar(200));

CREATE INDEX ancestors_index_id ON ancestors (id);
CREATE INDEX ancestors_index_ancestor_id ON ancestors (ancestor_id);




-----------------------------------------------------------------------
---Holds metadata
---Entries can have any number of metadata items
---The MetadataHandler classes handle the semantics.
-----------------------------------------------------------------------
CREATE TABLE  metadata (id varchar(200),
            entry_id varchar(200),
                        type varchar(200),
                    inherited int,
                        attr1 varchar(4000),
                        attr2 varchar(4000),
                        attr3 varchar(4000),
                        attr4 varchar(4000),
                extra clob);



CREATE INDEX METADATA_INDEX_ID ON metadata (ID);
CREATE INDEX METADATA_INDEX_ENTRYID ON metadata (ENTRY_ID);
CREATE INDEX METADATA_INDEX_TYPE ON metadata (TYPE);
CREATE INDEX METADATA_INDEX_ATTR1 ON metadata (ATTR1);

-----------------------------------------------------------------------
--- comments
-----------------------------------------------------------------------
CREATE TABLE  comments (id varchar(200),
                entry_id varchar(200),
            user_id  varchar(200),
                        "date" date,
            subject  varchar(200),
                        "comment" varchar(1000));

CREATE INDEX COMMENTS_INDEX_ID ON comments (ID);
CREATE INDEX COMMENTS_INDEX_ENTRY_ID ON comments (ENTRY_ID);


-----------------------------------------------------------------------
--- associations
-----------------------------------------------------------------------
CREATE TABLE associations (id varchar(200),
                           name varchar(200),
                   type varchar(200),
               from_entry_id varchar(200),
                   to_entry_id varchar(200));


-----------------------------------------------------------------------
--- users
-----------------------------------------------------------------------
CREATE TABLE  users (id varchar(200),
                     name  varchar(200),
                     email varchar(200),
                     question  varchar(200),
                     answer  varchar(200), 
                     password  varchar(200),
             admin int,
             language varchar(50),
             template varchar(200),
                     isguest int,
                     properties varchar(4000));




-----------------------------------------------------------------------
--- roles users have
-----------------------------------------------------------------------
CREATE TABLE  userroles (
        user_id varchar(200),
        role varchar(200));


-----------------------------------------------------------------------
--- user's favorites
-----------------------------------------------------------------------
CREATE TABLE  favorites (
        id varchar(200),
        user_id varchar(200),
        entry_id varchar(200),
        name varchar(1000),
    category varchar(1000));

CREATE INDEX FAVORITES_INDEX_USER_ID ON favorites (USER_ID);

-----------------------------------------------------------------------
--- tracks logins
-----------------------------------------------------------------------
CREATE TABLE  user_activity (
    user_id  varchar(200),
    "date" date,
        what  varchar(100), 
        extra  varchar(1000), 
        ipaddress  varchar(400));

CREATE INDEX USER_ACTIVITY_INDEX_USER_ID ON user_activity (USER_ID);


-----------------------------------------------------------------------
--- tracks session
-----------------------------------------------------------------------
CREATE TABLE  sessions (
    session_id varchar(200),
    user_id  varchar(200),
    create_date date,
        last_active_date  date,
        extra  varchar(4000)); 


CREATE INDEX SESSIONS_INDEX_USER_ID ON sessions (USER_ID);


-----------------------------------------------------------------------
--- entry monitors
-----------------------------------------------------------------------
CREATE TABLE  monitors (
    monitor_id varchar(200),
        name       varchar(500),
    user_id  varchar(200),
    from_date date,
        to_date  date,
        encoded_object  clob); 


-----------------------------------------------------------------------
---  permissions on entries
-----------------------------------------------------------------------
CREATE TABLE  permissions (
    entry_id varchar(200),
    action varchar(200),
        role varchar(200));




-----------------------------------------------------------------------
--- the harvesters. content is the xml they encode/decode to store state
-----------------------------------------------------------------------
CREATE TABLE  harvesters (
                 id varchar(200),
              class varchar(500),
              content varchar(4000));




-----------------------------------------------------------------------
--- global properties
-----------------------------------------------------------------------

CREATE TABLE  globals (name varchar(500),
                       value varchar(4000));








-----------------------------------------------------------------------
--- for storing the list of servers when acting as a registry
-----------------------------------------------------------------------
CREATE TABLE  serverregistry (
        url varchar(1000),
        title varchar(1000),
        description varchar(4000),
        email varchar(200),
    isregistry int);


CREATE TABLE  remoteservers (
        url varchar(1000),
        title varchar(1000),
        description varchar(4000),
        email varchar(200),
    isregistry int,
        selected int);



-----------------------------------------------------------------------
--- just here so ramadda knows if the db has been created
-----------------------------------------------------------------------
CREATE TABLE  dummy (name varchar(500));


-----------------------------------------------------------------------
--- holds information about the point databases
-----------------------------------------------------------------------
CREATE TABLE  pointdatametadata (
       tablename varchar(1000),
       columnname varchar(1000),
       columnnumber int,
       shortname varchar(1000),
       longname varchar(1000),
       unit varchar(100),
       vartype varchar(100));


--CREATE INDEX POINTDATAMETADATA_INDEX_TABLENAME ON pointdatametadata (TABLENAME);
CREATE INDEX POINTDATAMETADATA_INDEX ON pointdatametadata (TABLENAME);
  评论这张
 
阅读(837)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017