The Oracle Lite Blog

The Rekounas Blog about Oracle Lite and Mobile Server Technologies and Solutions

The Oracle Lite Blog header image 2

Determining table weights

November 10th, 2006 · 2 Comments

One of the first things that you need to identify when developing a mobile application is to identify all the tables that will be synched and their relationships. In Oracle Lite, this is called Table Weights. Most applications that are developed have about 20-30 tables, so doing this manually shouldn’t take that long. I am working on an application that has 450+ tables, so I really don’t want to do this manually. Here is a small java application that can help you identify your table weights. I received this application straight from Oracle development staff last year. I am not sure why they don’t include it in their SDK but it’s definitely a nice to have even for things like table loads. The way that table weights work is tables with the weight of 1 get loaded first, then 2s, then 3s, etc. Changes that I made to the code are:

  • Changed the JDBC to use PreparedStatement.
  • In the original code, table names were passed in as a parameter. I have replace this with a query.
  • Modified the sql to identify constrainst table names.
  • Download the file weight.txt.
  • Save the file locally, compile, and run!

Tags: Oracle Lite

2 responses so far ↓

Leave a Comment