Skip to content

Commit

Permalink
some sample files
Browse files Browse the repository at this point in the history
  • Loading branch information
erilong committed Oct 29, 2007
1 parent 44c896c commit 55a7ec8
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 0 deletions.
14 changes: 14 additions & 0 deletions symmetric/src/main/deploy/samples/client.properties
@@ -0,0 +1,14 @@
# The class name for the JDBC Driver
db.driver=com.mysql.jdbc.Driver

# The JDBC URL used to connect to the database
db.url=jdbc:mysql://localhost/symmetric

# The user to login as who can create and update tables
db.user=symmetric

# The password for the user to login as
db.password=

# The HTTP URL of the root node to contact for registration (http://hostname:8080/sync)
symmetric.runtime.registration.url=
42 changes: 42 additions & 0 deletions symmetric/src/main/deploy/samples/create_sample.xml
@@ -0,0 +1,42 @@
<?xml version="1.0"?>
<!DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/database.dtd">

<database name="sample">

<table name="item_selling_price">
<column name="price_id" type="INTEGER" required="true" primaryKey="true" />
<column name="price" type="DECIMAL" required="true" />
<column name="cost" type="DECIMAL" required="false" />
</table>

<table name="item">
<column name="item_id" type="INTEGER" required="true" primaryKey="true" />
<column name="price_id" type="INTEGER" required="true" />
<column name="name" type="VARCHAR" size="100" />
<foreign-key name="fk_item_price_id" foreignTable="item_selling_price">
<reference local="price_id" foreign="price_id" />
</foreign-key>
</table>

<table name="transaction">
<column name="tran_id" type="INTEGER" required="true" primaryKey="true" />
<column name="store" type="VARCHAR" size="5" required="true" />
<column name="workstation" type="VARCHAR" size="3" required="true" />
<column name="day" type="VARCHAR" size="10" required="true" />
<column name="seq" type="INTEGER" required="true" />
</table>

<table name="sale_return_line_item">
<column name="tran_id" type="INTEGER" required="true" primaryKey="true" />
<column name="item_id" type="INTEGER" required="true" />
<column name="price" type="DECIMAL" required="true" />
<column name="quantity" type="INTEGER" required="true" />
<foreign-key name="fk_srli_tran_id" foreignTable="transaction">
<reference local="tran_id" foreign="tran_id" />
</foreign-key>
<foreign-key name="fk_srli_item_id" foreignTable="item">
<reference local="item_id" foreign="item_id" />
</foreign-key>
</table>

</database>
15 changes: 15 additions & 0 deletions symmetric/src/main/deploy/samples/insert_sample.sql
@@ -0,0 +1,15 @@
--
-- Sample Data
--
insert into item_selling_price (price_id, price, cost) values (1, 0.10, 0.09);
insert into item (item_id, price_id, name) values (11000001, 1, 'Yummy Gum');

insert into transaction (tran_id, store, workstation, day, seq)
values (900, '1', '3', '2007-11-01', 90);
insert into sale_return_line_item (tran_id, item_id, price, quantity)
values (900, 11000001, 0.10, 1);

--
-- Sample SymmetricDS Configuration
--

11 changes: 11 additions & 0 deletions symmetric/src/main/deploy/samples/root.properties
@@ -0,0 +1,11 @@
# The class name for the JDBC Driver
db.driver=com.mysql.jdbc.Driver

# The JDBC URL used to connect to the database
db.url=jdbc:mysql://localhost/symmetric

# The user to login as who can create and update tables
db.user=symmetric

# The password for the user to login as
db.password=

0 comments on commit 55a7ec8

Please sign in to comment.