• Post Reply Bookmark Topic Watch Topic
  • New Topic

What is your view on my design ? - very urgent  RSS feed

 
Prasanna KumarBP
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All,
I need to write a back-end module(import feature)which receives XML data containing entire data dump(around 10,000 records)and same shall be updated into database. Updating database involves insert/update/delete records in 10 tables. Import need to be done every night(off peak hour). My design is as follows,

1. Write 10 CMPs for 10 tables
2. Relate CMPs using CMR
3. Use Local Interfaces to improve performance

Since lot of things are changed in CMP2.0, I feel performance will NOT be an issue with CMP.

What do you feel? This is very urgent, please provide your comments at the earliest.

~Prasanna
----------
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are you currently using for accessing those 10 tables? Whatever it is, I would probably go with the same technique because A) you'll probably be able to reuse a lot of code and B) you won't confuse the other code's caching etc.
 
Rufus BugleWeed
Ranch Hand
Posts: 1551
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I suspect I don't understand the problem. If you are just inserting records why not use prepared statements and JDBC?
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
10,000 rows , if CMP is used I feel it is not a good approach. For updating a row, I need to call the finder methods and then update it the retrieved enity reference.
I feel that simple JDBC will do.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
10,000 records with CMP isn't that bad when talking about a once-a-night type of batch with no real-time requirements. Anyway, if the main application is reading those tables through a CMP layer, it won't see changes made directly into the database using JDBC.
 
Prasanna KumarBP
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanx for your response.
For my module performance is a very big criteria. I do not want to take any risk. Can I go ahead with CMPs or shall I start writing BMPs?.
My thought is that using CMP2.0 local interfaces is as good as using just a JDBC, with the advantage of having wrapper over JDBC.
Once again thanx for your response.
-------------------
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My thought is that using CMP2.0 local interfaces is as good as using just a JDBC, with the advantage of having wrapper over JDBC.

CMP with local interfaces is still not exactly JDBC -- CMP has it's pros and cons over it. JDBC is by far the most efficient way to do things, performance-wise, but CMP would protect you from clashes between data inserted through a "back door" and a CMP caching layer not being aware of these insertions.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!