Database Subsetting Tool
SourceForge.net Logo
java.net Member Button: 90px wide

 
A Jailer model is stored in an extended CSV file format ('Comma Separated Values')
  • the separating character is ';'
  • empty lines are ignored
  • Lines starting with '#' are comments and will be ignored
  • Lines starting with '#include' will be replaced with the content of the file specified thereafter.


Data Model

Table-File (datamodel/table.csv) 

For each table the following information is required:
  • Name
  • upsert
                 N: generate INSERT-statements for entities of this table
                 Y: generate 'INSERT IF NOT EXISTS' + UPDATE-statements
  • Primary-Key ';'-separeted primary key columns in SQL syntax
  • Author

Example:

Name upsert primary keys author
DEPARTMENT Y
DEPTNO INTEGER IBM DB2 JDBC Driver
EMPLOYEE N EMPNO INTEGER IBM DB2 JDBC Driver
SALARYGRADE Y
GRADE INTEGER;LOSAL INTEGER;HISAL INTEGER IBM DB2 JDBC Driver

Associations-File (datamodel/association.csv) 

For each table the following information is required:
  • Table A source or association name
  • Table B destination
  • insert-first specifies dependency:
                      - A if B depends on A
                      - B if A depends on B
                      - nothing if the association is not a dependency
  • Cardinality of the association. 1:1, 1:n, n:1, n:m
  • Join-Condition of the association. Use the table-aliases A und B.
  • Name. Optional name of the association. Names are neccessary to refer to reflexive associations or if more than one association between the same two tables exists.
  • Author

Example:

Table A Table B first-insert cardinality
join-condition Name author
DEPARTMENT EMPLOYEE A
1:n
A.DEPTNO=B.DEPTNO
JDBC Driver
EMPLOYEE EMPLOYEE A 1:n
A.EMPNO=B.BOSS SUBORDINATE JDBC Driver
EMPLOYEE SALARYGRADE
n:1
A.SALARY BETWEEN B.LOSAL AND B.HISAL
Wisser