aspose file tools*
The moose likes JDBC and the fly likes Head First SQL - Standard SQL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Head First SQL - Standard SQL" Watch "Head First SQL - Standard SQL" New topic
Author

Head First SQL - Standard SQL

Galen Benson
Greenhorn

Joined: Dec 06, 2004
Posts: 8
I'm a fairly new SQL user since I spent most of my time working on embedded systems up to now. I have, in the last 6 months, worked on both SQL server and Oracle DB's. I am finding that the "flavors" of SQL can be quite different, especially when it comes to performance. Does the book address the performance information associated with things like sub-queries, full table scans etc.

Does anyone have an opinion on ANSI Standard SQL?

Is it just always better to use ANSI Standard SQL?

If I create ANSI Standard SQL can I really port it from SQL-Server to Oracle and even DB2 with out changes?

The other day I was in an interview and someone asked me "What is JDBC?"
Other than the obvious "Java Database Connectivity" and that it's a standard API... I didn't know what else to say. Is there more?

Sorry for all the questions... but I'm a newbie.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336


Does anyone have an opinion on ANSI Standard SQL?

Is it just always better to use ANSI Standard SQL?

It depends where you use it. If you mean writing SQL Queries in a JDBC application then yes, I'd always stick to ANSI SQL, otherwise the application looses its portablility. In reality, I'd most likely go for an ORM, rather than use SQL directly then I don't even have to think about this.


If I create ANSI Standard SQL can I really port it from SQL-Server to Oracle and even DB2 with out changes?

According to the documentation, yes.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Corey McGlone
Ranch Hand

Joined: Dec 20, 2001
Posts: 3271
Originally posted by Galen Benson:
The other day I was in an interview and someone asked me "What is JDBC?"


You know, when you asked this, I had to check your name because I often do interviews and this is a question I routinely ask. ;)

Sure, JDBC allows you to connect to a database. However, the real beauty of JDBC is the way in which it does that. Essentially, JDBC provides an added layer of abstraction between your application and your database. If you ever decide to swap out your database (Oracle for SQL Server, for example), you shouldn't have to change your Java code, at all, except perhaps to load a different driver. That's the real benefit of using JDBC - it doesn't tie you to a specific database vendor.

If you think about it, it's really rather close to the whole notion of Java - a language that allows applications to be moved easily from one OS to another. JDBC allows you to swap out databases in a similar manner.


SCJP Tipline, etc.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Head First SQL - Standard SQL
 
Similar Threads
Java jobs with oracle requirements
Simple queries or Stored Procedures??
HF-SQL - Is DB Centric?
sql-statement in tuple
can anyone tell me how many joins are in SQL.AND how many are in Oracle.?