DBAsupport.com Forums - Powered by vBulletin
Results 1 to 10 of 10

Thread: Business Logic - PL/SQL or Java?

Hybrid View

  1. #1
    Join Date
    Dec 2001
    Location
    Keene, NH
    Posts
    510
    We are using 9i database and 9iAs. Where is the recommended place for Business Logic?

    PL/SQL stored procedures?

    or

    Java (or any other place in the J2EE environment)?

    I am leaning towards PL/SQL.
    Don't blame me, I'm from Red Sox Nation.

  2. #2
    Join Date
    Apr 2002
    Location
    Germany.Laudenbach
    Posts
    448
    Hi
    If possible and the SotwareModel allows it i would choose to have a very thin java-layer and the businesslogic defined in PL/SQL-Packages/Procedures.

    -So NetTraffic will not kill your performance.
    -PL/SQL is easier to handle as Java.
    -Deploying PL/SQL-Objects is very easy and OS-independent.
    -PL/SQL will be faster
    -the easiest way to handle Oracle-data

    But you can stay in your objectmodel thru your java-Objects which call in the background non-oo-plsql-procs.

    SuperGood PL/SQL-Dev-Tool :

    http://www.allroundautomations.nl

    Orca; it seems im a PL/SQL-Fan?


  3. #3
    Join Date
    Dec 2001
    Location
    Keene, NH
    Posts
    510
    Thank you ORCA!

    Can you please briefly define the usage scope for Java. I have experienced it's usage for making web pages more dynamic, coding OO model and connecting multiple systems in a distributed environment.

    Thanks again

  4. #4
    Join Date
    Apr 2002
    Location
    Germany.Laudenbach
    Posts
    448
    Hi,
    I am not a java-programmer ( but C++ 10 years );
    The reason for java you said is ok.
    There is a great area implementing business-logic with java-enterprise-beans which are objects with common services and features.
    the problem is performance!
    These BEan-Communication is very slow! You need eve bigger Appservers then database-servers.
    In Addition ther is RMI something like Remote-Calls for java-objects.

    So please ask a java-expert.

    So modelling is the ones side, but having a robust strong fast system is the other!


    Orca

  5. #5
    Join Date
    Dec 2001
    Location
    Keene, NH
    Posts
    510

    Thumbs up

    Thank you again Orca!

    I am starting to understand with your help.

    Now, how about the best of both worlds - Java inside of Oracle objects such as stored procedures, packages, etc...?
    The Java would now be inside the database! Do we still have the same performance issues you mentioned?

    If my questions are too vast for a forum thread, then maybe you can recommend a good link.
    Don't blame me, I'm from Red Sox Nation.

  6. #6
    Join Date
    Apr 2002
    Location
    Germany.Laudenbach
    Posts
    448
    No, i would not use java inside!
    If somebody is here who can give me Point to do this please answer me.

    For some special java-functions E-Mailing, XML ... you could use it, but i would let it outside of DB.

    Another point is if you have a team of Java-programmer ist would be perfectly to use ONLY one language.

    Java is not so fast as PL/SQL and not faster even native compiled PL/SQL.

    Orca


  7. #7
    Join Date
    Dec 2001
    Location
    Brazil
    Posts
    282

    But ...

    The purpose for application server is separate logic from database. If you use pl/sql for heavy business logic you will be losing performance depending on the system behavior because you'll have database overhead + logic overhead in the server. If you separate them you will increase performance to your system. Besides, java is the fastest language in the server side. It's not fast in the client.


    F.

  8. #8
    Join Date
    Apr 2002
    Location
    Germany.Laudenbach
    Posts
    448
    But ...

    when the logic contains a lot of database-access Performace will go down in the net.

    ... or PL/SQL then will allways be faster!

    Orca

  9. #9
    Join Date
    Dec 2001
    Location
    Brazil
    Posts
    282


    You dont need to access database everytime if you have an application server. There are the database caches in the middle tier (9iAS), there are the connection poolings, etc.

    I'm not saying pl/sql is bad, I use pl/sql when there are a lot of statements at once, then they are run at once since they belong to a single pl/sql block ... less network traffic.

    Whatever, you have a lot of options ... the bigger the system is, the more you will have to separate the logic overhead from the database overhead.

    F.

  10. #10
    Join Date
    Dec 2001
    Location
    Keene, NH
    Posts
    510
    Originally posted by Mnemonical

    I use pl/sql when there are a lot of statements at once, then they are run at once since they belong to a single pl/sql block ... less network traffic.
    This clears up a lot !


    Originally posted by Mnemonical

    Whatever, you have a lot of options ... the bigger the system is, the more you will have to separate the logic overhead from the database overhead.
    Okay, point well taken!
    ---


    Thanks to both you and Orca!! Please, please post any ideas that continue to clear the myst.

    Today, I have ordered Thomas Kytes Oracle: Expert-one-on-one. I hope this helps me too.
    Don't blame me, I'm from Red Sox Nation.

Posting Permissions

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


Click Here to Expand Forum to Full Width