Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    Join Date
    May 2009
    Posts
    14

    Unanswered: Top 3 reasosn for pl\sql and top 3 reasons for JDBC

    Hi guys,

    I am looking through past papers, and I am trying to answer this question well.

    Four reasons why pl/sql would be preferred in a project, and Four reasons why jdbc might be preferred.

    I understand plsql statements are stored inside the oracle database and jdbc queries are sent across the network each time. I also understand that JDBC can be easier to grasp because their are no extension on syntax to java. Other than speed and simplicity, what are good reasons for choice?

    JDBC

    1. simple java syntax
    2.
    3.
    4.


    PLSQL

    1. Speed and performance
    2.
    3.
    4.


    Thank you!
    Last edited by Toshikazu; 01-13-10 at 09:04.

  2. #2
    Join Date
    Oct 2002
    Location
    Baghdad, Iraq
    Posts
    697
    This is a homework assignment that has no pedagogic value. By "no pedagogic value" I mean you're not learning anything useful doing this. You should quit the class and demand a refund.

  3. #3
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,799
    Provided Answers: 11
    2) Politics
    3) Capriciousness
    4) Inept architects

    OK, 2 and 3 are more or less the same thing, but hey, I tried ;-).

  4. #4
    Join Date
    May 2009
    Posts
    14
    Quote Originally Posted by sco08y View Post
    This is a homework assignment that has no pedagogic value. By "no pedagogic value" I mean you're not learning anything useful doing this. You should quit the class and demand a refund.
    Not a very useful post. Plus it isn't a homework assignment, It is for my own interest and understanding because I saw It on an exam paper. The class is quiet useful, it is more orientated around database theory and some new dbms optimisation techniques.

  5. #5
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    JDBC will be used by folks who believe in JAVA & Object Oriented Programming.
    PL/SQL will be used by Oracle disciples who desire to optimize applications using Oracle RDBMS.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  6. #6
    Join Date
    May 2009
    Posts
    14
    Quote Originally Posted by anacedent View Post
    JDBC will be used by folks who believe in JAVA & Object Oriented Programming.
    PL/SQL will be used by Oracle disciples who desire to optimize applications using Oracle RDBMS.
    JDBC
    1. simple java syntax
    2. object orientated
    3.
    4.


    PLSQL
    1. Speed and performance
    2. catch query error at compile time
    3.
    4.

  7. #7
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >object orientated
    There are multiple OOP languages, but only Java can use JDBC
    It just so happens that Java uses the OOP paradigm.
    JDBC is to Java as ODBC is to the rest of the world; simply a interface between some programming language & some RDBMS.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  8. #8
    Join Date
    May 2009
    Posts
    14
    Quote Originally Posted by anacedent View Post
    >object orientated
    There are multiple OOP languages, but only Java can use JDBC
    It just so happens that Java uses the OOP paradigm.
    JDBC is to Java as ODBC is to the rest of the world; simply a interface between some programming language & some RDBMS.
    I believe that is how I understand it, but given that we can still say using JDBC over pl sql gives us the advantages of interfacing with the DBMS in an object orientated fashion?

  9. #9
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    You either need to compare JDBC to ODBC or compare Java to PL/SQL.
    Otherwise you should compare Java to ODBC.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  10. #10
    Join Date
    May 2009
    Posts
    14
    Do you know more good points for either of them?

  11. #11
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >Do you know more good points for either of them?
    JAVA - Write once, run everywhere ( POORLY!)
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  12. #12
    Join Date
    May 2009
    Posts
    14
    Quote Originally Posted by anacedent View Post
    >Do you know more good points for either of them?
    JAVA - Write once, run everywhere ( POORLY!)
    oo I nice, I never thought about that!

    JDBC
    1. JAVA - conventional programming syntax
    2. JAVA - object orientated
    3. JAVA - Write once, run everywhere
    4.

    Please let me know if you can think of any more
    PLSQL
    1. Speed and performance
    2. catch query error at compile time
    3.
    4.

  13. #13
    Join Date
    Oct 2002
    Location
    Baghdad, Iraq
    Posts
    697
    Quote Originally Posted by Toshikazu View Post
    Not a very useful post.
    No, it was a useful post: I pointed out that you're asking a question and wasting your time.

    Plus it isn't a homework assignment, It is for my own interest and understanding because I saw It on an exam paper.
    Glad to hear you haven't wasted any money on it. Sad to hear that any number of students have been ripped off.

    Let me spell out why I objected so strongly to this question initially:

    In a mathematical field, you find answers by framing a question in such a way that the answer becomes obvious.

    If you frame a question in an ass-backwards manner, you can actually find obvious answers that are fundamentally flawed. Let's look at your answers so far:

    JDBC
    1. JAVA - conventional programming syntax

    Nonsense. PL/SQL's syntax is derivative of COBOL, a far older lineage than Java. It can be completely parsed by a context-free grammar, just like virtually every other language out there.

    Even if this was true, so what? Why is one syntax better than the other? There are specific reasons why language designers pick one over the other, you ought to be asking why that is.

    2. JAVA - object orientated

    So what? Why is this a benefit? After all, you can't actually store those objects directly without mapping them to relational structures or native Oracle objects. Given that PL/SQL has direct access to those objects, it is *more* object oriented than Java when you're working directly with Oracle.

    But, again, why does this matter? What does OOP actually get you? If you're working on a relational DBMS, is it even a good thing?

    3. JAVA - Write once, run everywhere

    And PL/SQL isn't? It will compile to native bytecode or can be interpreted, so it will run on any platform Oracle runs on.

    And "write once, run anywhere" slogan, what's the reality? Is it really, as some critics claim, write once, debug everywhere? Why do you even need WORA if you're targeting a narrow range of server architectures?

    PLSQL
    1. Speed and performance

    Specific claims about space complexity, time complexity, and storage hierarchy bottlenecks are useful for specific tasks. Saying "PL/SQL is faster than Java!" is the kind of nonsense you see hyped in trade magazines that aren't even useful for lining a bird cage.

    2. catch query error at compile time

    Both PL/SQL and Java are strongly typed, so they're both good at static analysis. If you're using stored procedures, you gain static analysis of your queries for all client languages.

    But why are you limiting yourself to the notion of static analysis, which is the general class of analysis that includes compile time checks? Regression analysis, which includes unit testing, is another class of analysis you shouldn't ignore.

  14. #14
    Join Date
    May 2009
    Posts
    14
    Quote Originally Posted by sco08y View Post
    No, it was a useful post: I pointed out that you're asking a question and wasting your time.

    Glad to hear you haven't wasted any money on it. Sad to hear that any number of students have been ripped off.
    Regardless of how irrelevant the question may sound, I have not wasted a penny. At the end of the my degree I will have a degree from one of the best universities in England.

    Quote Originally Posted by sco08y View Post
    Let me spell out why I objected so strongly to this question initially:

    In a mathematical field, you find answers by framing a question in such a way that the answer becomes obvious.
    I am not looking necessarily looking for factual answers nor objective, subjective points are more appropriate for this question. So that doesn't apply...

    Quote Originally Posted by sco08y View Post
    If you frame a question in an ass-backwards manner, you can actually find obvious answers that are fundamentally flawed. Let's look at your answers so far:
    Before I respond with my opinions to your replies I will admit I have never used JDBC or pl sql, or ever done any practical database related programming and never intend too either. However, I do have a strong theoretic background for how most of the algorithms, compilations and modelling is done behind the scenes in a DBMS.

    Quote Originally Posted by sco08y View Post
    JDBC
    1. JAVA - conventional programming syntax

    Nonsense. PL/SQL's syntax is derivative of COBOL, a far older lineage than Java. It can be completely parsed by a context-free grammar, just like virtually every other language out there.

    Even if this was true, so what? Why is one syntax better than the other? There are specific reasons why language designers pick one over the other, you ought to be asking why that is.
    Yes, every language can be formally defined so we have to look at it on a different level. In the United Kingdom, 85%+ universities teach Java as their first programming language to computer science students. If they don't teach Java, they are likely to teach another language with a similar grammar. Only a minority of universities teach COBAL any more. Given this, I could easily say many new students would use JDBC over PL/SQL just because their would be no learning barriers preventing them from getting on with the job immediately.

    Quote Originally Posted by sco08y View Post
    2. JAVA - object orientated

    So what? Why is this a benefit? After all, you can't actually store those objects directly without mapping them to relational structures or native Oracle objects. Given that PL/SQL has direct access to those objects, it is *more* object oriented than Java when you're working directly with Oracle.

    But, again, why does this matter? What does OOP actually get you? If you're working on a relational DBMS, is it even a good thing?
    If you client is object orientated, and you needed to get relational results on a object by object basis it would be more convenient?
    What if you wanted to manage different connections using objects? And wanted to talk to multiple databases at once within an OO client.

    Quote Originally Posted by sco08y View Post
    3. JAVA - Write once, run everywhere

    And PL/SQL isn't? It will compile to native bytecode or can be interpreted, so it will run on any platform Oracle runs on.

    And "write once, run anywhere" slogan, what's the reality? Is it really, as some critics claim, write once, debug everywhere? Why do you even need WORA if you're targeting a narrow range of server architectures?
    Because you could write generic templates that could interface with DBMS at dynamic locations.

    Quote Originally Posted by sco08y View Post
    PLSQL
    1. Speed and performance

    Specific claims about space complexity, time complexity, and storage hierarchy bottlenecks are useful for specific tasks. Saying "PL/SQL is faster than Java!" is the kind of nonsense you see hyped in trade magazines that aren't even useful for lining a bird cage.
    Benchmarks prove that their can be significant differences in performance for particular tasks depending on which you choose. So really this point is just referring to the fact PL/SQL is stored closer to the DBMS and can be faster for a large selection of tasks.

    Quote Originally Posted by sco08y View Post
    2. catch query error at compile time

    Both PL/SQL and Java are strongly typed, so they're both good at static analysis. If you're using stored procedures, you gain static analysis of your queries for all client languages.

    But why are you limiting yourself to the notion of static analysis, which is the general class of analysis that includes compile time checks? Regression analysis, which includes unit testing, is another class of analysis you shouldn't ignore.
    Yes, but native Java doesn't understand SQL like PL/SQL does. Possibility of run-time errors.

  15. #15
    Join Date
    Aug 2009
    Location
    Olympia, WA
    Posts
    337
    Before I respond with my opinions to your replies I will admit I have never used JDBC or pl sql, or ever done any practical database related programming and never intend too either.
    Then why are you wasting our time?

Posting Permissions

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