Results 1 to 6 of 6
  1. #1
    tams115 is offline Member
    Join Date
    Oct 2010
    Posts
    2
    Rep Power
    0

    Default How to Save DB Hits

    Dear All,
    As i am working on a scoring engine, the logic is as follows
    User configure the rules and define a Query against that rule like
    Rule
    Age > 20 and Age <30 then score 10
    SQL
    select age from application where id = 'xyz'
    if there 500 rules then system needs to make 500 DB calls and every time execute defined query. So I want to reduce these DB calls and want to handle it in XML. Can you please suggest how i can proceed and reduce these DB calls.

    Application contain multiple applicants data (personal detail, address, employment etc.) and assets and financial purchased data.

    I look forward to your cooperation and a prompt response in this regard.

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    It depends on how many calls you've make with time. And also don't execute plain queries, use stored procedures as much as possible. And also if you could index your page then too many calls not make more performance drops as well.

  3. #3
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Looking at your question, I wonder that do you want to store those details in an XML and process. Actually there are lots of advanced XML parsers are available nowadays, or else you can write your own. If your database in a remote location then it may be a good choice to move with XML. Only overhead with remote databases is data passing, processing will anyhow utilize the same.

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,825
    Rep Power
    19

    Default

    Where are the rules stored?
    How are they defined?
    Presumably there's a syntax to them.

    Are all these rules run against a single application id? That is, is that SQL the same for each rule? I'm guessing not, but then I don't see quite how this works...or what it is trying to achieve.

  5. #5
    tams115 is offline Member
    Join Date
    Oct 2010
    Posts
    2
    Rep Power
    0

    Default

    Rules stored in Database, Rules are configurable and we build dynamic SQL against each rule.
    Rules are executed against each application, each rule has its on SQL. Its a scoring engine to check the credit worthiness of an applicant but i do not want to limiting for this application. In future i can use for some other applications too.

  6. #6
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,825
    Rep Power
    19

    Default

    I'll need to think for a bit, as I'm deep in test cases and I really ought to be doing the stuff my client pays me for..:)

Similar Threads

  1. Hwlp with "Open", "Save", "Save as..."
    By trill in forum New To Java
    Replies: 3
    Last Post: 11-02-2010, 09:26 AM
  2. How can i save the data Internally(auto save)
    By Rama Koti Reddy in forum AWT / Swing
    Replies: 2
    Last Post: 11-01-2010, 08:31 PM
  3. o hits while using pharsequery
    By vallaru in forum Lucene
    Replies: 0
    Last Post: 04-13-2010, 09:46 PM
  4. Measuring hits for words in a document.
    By bodrulalam in forum Lucene
    Replies: 0
    Last Post: 02-20-2010, 05:22 PM
  5. How can I save my XML
    By FrankyDee in forum XML
    Replies: 1
    Last Post: 03-27-2008, 03:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •