*Index
*News
*Status
*Changelog
*Contributors
Downloads
*Releases
*Nightly
Resources
*Build Status
*Source
*Mailing Lists
*CVS
*Library
User's Guide
*Installation
*Configuration
*FAQ
*Examples
*Tomcat Howto
*Avalon Howto
*JDBC Stores Howto
Programmer's Corner
*Architecture
*Domain
*Namespace
Slide API
*Structure
*Security
*Lock
*Content
*Macro
*Index
*Process
WebDAV
*General Info
*Clients
API Reference
*JavaDoc
*WebDAV Client
     JDBC Store Howto
 Initialization
Tables
    Objects
    Children
    Links
    Permissions
    Locks
    Revisions
    Workingrevision
    Latestrevisions
    Branches
    Revision
    Label
    Property
    Revisioncontent
Hypersonic SQL

Initialization

On the first startup of the Store, it will attempt to automatically create the appropriate tables in the database. The creation will fail if any of the types used is not supported by the user's database, in which case the tables have to be created before starting the store.

This document includes a number of SQL scripts which can be used with various databases to create the tables. Contributions are welcome :)

Note: The JDBC store's goal is to be as compatible as possible. Specific, high performance stores will eventually be developed, based around some vendor XA driver.

Tables

This section presents the database schema which is used by the JDBC stores. The types mentioned are the Java types which are expected for each field.

Objects

*uri: String
*classname: String

Children

*uri: String
*childuri: String

Links

*uri: String
*linkto: String

Permissions

*object: String
*subject: String
*action: String
*inheritable: int
*negative: int

Locks

*id: String
*object: String
*subject: String
*type: String
*expirationdate: String
*inheritable: int
*xeclusive: int

Revisions

*uri: String
*isversioned: int
*initialrevision: String

Workingrevision

*uri: String
*baserevision: String
*xnumber: String

Latestrevisions

*uri: String
*branchname: String
*xnumber: String

Branches

*uri: String
*xnumebr: String
*childnumber: String

Revision

*uri: String
*xnumber: String
*branchname: String

Label

*uri: String
*xnumber: String
*label: String

Property

*uri: String
*xnumber: String
*name: String
*value: String
*namespace: String
*type: String
*protected: int

Revisioncontent

*uri: String
*xnumber: String
*content: byte[]

Hypersonic SQL

The initialization script for hSQL is the one which is run at the startup of the store.

create table objects(uri varchar(65536) primary key, classname varchar(4096);
create table children(uri varchar(65536), childuri varchar(65536));
create table links(link varchar(65536), linkto varchar(65536));
create table permissions(object varchar(65536), subject varchar(65536), \
  action varchar(65536), inheritable int, negative int);
create table locks(id varchar(65536), object varchar(4096), \
  subject varchar(4096), type varchar(4096), \
  expirationdate varchar(15), inheritable int, xexclusive int);
create table revisions(uri varchar(65536) primary key, \
  isversioned int, initialrevision varchar(10));
create table workingrevision(uri varchar(65536), \
  baserevision varchar(20), xnumber varchar(20));
create table latestrevisions(uri varchar(65536), \
  branchname varchar(4096), xnumber varchar(20));
create table branches(uri varchar(65536), xnumber varchar(20), \
  childnumber varchar(20));
create table revision(uri varchar(65536), xnumber varchar(20), \
  branchname varchar(4096));
create table label(uri varchar(65536), xnumber varchar(20), \
  label varchar(4096));
create table property(uri varchar(65536), xnumber varchar(20), \
  name varchar(4096), value varchar(65536), namespace varchar(4096), \
  type varchar(100), protected int);
create table revisioncontent(uri varchar(65536), xnumber varchar(20), \
  content longvarbinary);


 
$Revision: 1.14 $ $Author: remm $ $Date: 2001/02/09 07:52:07 $
 

Java, JDBC, JNDI, JTA, JMS, Sun, Sun Microsystems are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and in other countries. All other product names mentioned herein are trademarks of their respective owners.
 

The Apache Software Foundation. (C) 2000-2001. All rights reserved