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!
2 responses so far ↓
1 ChristianausD wrote on Jan 17, 2007 at 6:33 am
I always wondered, what effect that weight has?
Could you give a good example when you have time?
View this Comment in: English Chinese(S) Chinese(T) French Arabic Dutch German Greek Italian Japanese Korean Portuguese Russian Spanish
2 Oracle Lite versus MobiLink wrote on Jun 5, 2008 at 4:25 am
[...] item, use the API method assignWeights(), and finally, you can run the code that I have in this post to determine your [...]
View this Comment in: English Chinese(S) Chinese(T) French Arabic Dutch German Greek Italian Japanese Korean Portuguese Russian Spanish
Leave a Comment