• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Java and PL/SQL

 
Ranch Hand
Posts: 287
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why is it important for a java programmer to learn and master PL/SQL?
 
Rancher
Posts: 1776
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't think so
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I wouldn't say its true for all programmers to master PL/SQL. If you are working on DBs, then it would be very important. For other programmers, a moderate knowledge (as compared to mastery) would be sufficient. Of course knowledge is never wasted, so investing some free time in upgrading PL/SQL skills would be definitely recommended.
On a side note, is anything ever mastered? It's been my experience that there is always something new to learn.
 
Harsha Smith
Ranch Hand
Posts: 287
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And expert SQL knowledge? isn't it a must have skill?
 
John Jai
Rancher
Posts: 1776
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Harsha,

In my current project we have an RDF engine as our database. Our data are stored in the format of triples. We use SPARQL and Prolog languages to query and save data in database.

But in my opinion a sound knowledge of SQL is important - it gives you a base to understand other query languages...and even Hibernate better...
 
Harsha Smith
Ranch Hand
Posts: 287
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Alright. I am ready to invest 3 months of time? What do you advice me to do? Learn Oracle SQL and PL/SQL thoroughly or hibernate??? I am a java programmer.
 
Marshal
Posts: 79180
377
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you think you can become expert at anything in 3 months?
 
Harsha Smith
Ranch Hand
Posts: 287
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
atleast very good if not expert.......My question hasn't been answered yet?
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is hard to answer this question in a general way. As a Java programmer, sooner or later you're going to have to work with relational databases, because the whole world stores their data in relational databases. So it is essential to understand at least the basics of relational databases and some SQL.

Object-relational mapping (ORM) frameworks such as Hibernate are widely used by Java developers. In most serious projects people don't write only low-level JDBC code to access the database.

It's certainly valuable to learn Hibernate, and you'll need to understand the concepts of relational databases and SQL to understand how Hibernate works.
 
Harsha Smith
Ranch Hand
Posts: 287
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
so learning essential SQL and PL/SQL skills is mandatory for any java programmer...right? and going beyond the basics won't hurt ... am I correct? Thank you so much for the replies
 
Bartender
Posts: 2407
36
Scala Python Oracle Postgres Database Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just to expand on Jesper's good advice:

Commercial applications almost always end up using a relational database somewhere to store data, and it is often the data that is the most valuable asset in the system. Application code changes all the time, technologies change every few years, but the data will often still be valuable years from now as people find new ways to use it. So it is worth understanding how databases work, and that goes beyond just learning SQL and doing an introductory SQL certificate of some kind. SQL is an excellent tool for accessing data in a relational database, but it is just as easy to write bad SQL as it is to write bad Java, and when you are working with large volumes of data your SQL mistakes can have a truly catastrophic impact on how the system performs. In my experience, Java developers are especially prone to this problem, because often they have the misguided idea that as Java EE development is complex (oh boy, is it complex...!), it is the only important aspect of a system they need to worry about, so they fail to recognise the need to use the right tool for the job when it comes to database applications. That tool might be Hibernate rather than pure SQL, but it still helps to understand what Hibernate is doing underneath.

So you need to understand something about relational databases and relational data modelling in order to use SQL properly, just as you need to understand object oriented programming in order to use Java properly. And you may also need to understand a bit about how your particular relational database works, because different RDBMS vendors may implement particular features (indexing, partitioning, query optimisation etc) in different ways, and even if somebody is responsible for managing these things, you may well need to know how to make good use of them with your SQL. It's just like the JEE platform: you can pretend it's all vanilla and you don't need to know how it works underneath, but you will usually find you produce better code if you understand what your platform (JEE or RDBMS) is really doing.

Finally, as you know, PL/SQL is Oracle's proprietary extension to SQL which is used almost everywhere in the Oracle world (PL/SQL has also been ported to PostgreSQL, although there may be some inconsistencies in the implementation and of course you will not have access to the Oracle-specific libraries etc). It's been around for about 20 years and these days is a very powerful tool for implementing complex logic simply, robustly and efficiently on the Oracle RDBMS server. As with any other language, it is worth understanding how it works so you can write good idiomatic PL/SQL code, rather than simply pretending it's Java without the brackets.

So if you're working on an Oracle-based application, learning PL/SQL would be very useful, but if you're not on Oracle, or if you are not permitted to use vendor-specific DB tools, then it will be less helpful to you.

My advice FWIW: Learn SQL and how to use it properly, then learn PL/SQL if you're on Oracle.
 
Harsha Smith
Ranch Hand
Posts: 287
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank You Chris! I'll follow your advice
 
reply
    Bookmark Topic Watch Topic
  • New Topic