wood burning stoves 2.0*
The moose likes JDBC and the fly likes Head First SQL : SQL Syntax Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Head First SQL : SQL Syntax" Watch "Head First SQL : SQL Syntax" New topic
Author

Head First SQL : SQL Syntax

Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1321

Hi author,

I have a question regarding the syntax of SQL. why user have to use the different SQL statement to doing the same opertion in different databases, for example.

MySQL database used "auto_increament" keyword to create auto increatment field and Oracle is used "sequences" do the same.

so it difficult to say that, which database is using standard SQL

Thanks in Advance,


Saifuddin..
[Blog][Linkedin] How To Ask Questions On JavaRanch My OpenSource
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

This is because different database vendors have implemented different extension to standard SQL as it suits their needs. So, technically, using auto_increment is not SQL (as it is defined in the ANSI standard).

You can avoid these issues by using an abstraction layer such as Hibernate.
[ October 18, 2007: Message edited by: Paul Sturrock ]

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Lynn Beighley
author
Ranch Hand

Joined: Sep 12, 2007
Posts: 82
Or more simply, learn the concepts and then get a good reference book for your particular flavor. I think it's safe to say that most people will only be working with one RDBMS at any particular time, and learning your system's syntax is not going to be that difficult.


Lynn Beighley<br />Author, Head First SQL
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1321

Thanks for your reply paul,

So, technically, using auto_increment is not SQL (as it is defined in the ANSI standard).


is Oracle follow the standard SQL syntax?

You can avoid these issues by using an abstraction layer such as Hibernate.


and thanks for the suggestion paul, I would consider it in future when i will use Hibernate.
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1321

Thanks author for your reply,

I think it's safe to say that most people will only be working with one RDBMS at any particular time, and learning your system's syntax is not going to be that difficult.


agreed,

Originally posted by Lynn Beighley:
Or more simply, learn the concepts and then get a good reference book for your particular flavor.


so in which flavor HFSQL is guide their readers? mean is this book follow the standard SQL?

one more thing, is this covers the different database standard for example, Standand SQL syntax is using abc syntax for doing this task, while mysql is doing this in XYZ way.


Thanks for your reply,
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336


is Oracle follow the standard SQL syntax?

I can't think of any RDBMS that 100% follows the standard. Usually, all implement it to some degree or other, then extend the functionality depending on what extra stuff their product can do.
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1321

Originally posted by Paul Sturrock:

I can't think of any RDBMS that 100% follows the standard. Usually, all implement it to some degree or other, then extend the functionality depending on what extra stuff their product can do.


Thanks for your reply paul,

now it almost clear, but if they have extends SQL then they shouldn't be use single word SQL (as SQL have its Standards). MySQL name make sense to me after this discussion.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Head First SQL : SQL Syntax