which DBMS to learn ??

abhishek kunal

Ranch Hand

Posts: 42

posted 7 years ago

i am often confused about which dbms to use for jdbc. learning it specifically for any dbms is certainly a limitation to that particular dbms. or in layman words i don't know how to study jdbc, please suggest me some way...i believe there are dbms specific issues and methods.so how to do an independent but still comprehensive study of jdbc....

Hello there, JDBC is indeed a bit enormous. The API is huge. However, using JDBC for each DBMS is a bit different. I'm sure say connecting to MySQL and Oracle is a bit different. Once connected, getting the data (querying) can be different too.

So the easiest to do is to say choose a DBMS like Oracle or MySQL or even SQL Server or whatever you like. Then download that database's particular JDBC and have a look at that JDBC's API (provided by the database provider). I use MySQL most of the time and the JDBC driver is ConnecterJ.

Once you get aquainted, try some code connecting to the db and query some data. Then you will be on a roll.

abhishek kunal wrote:i am often confused about which dbms to use for jdbc. learning it specifically for any dbms is certainly a limitation to that particular dbms. or in layman words i don't know how to study jdbc, please suggest me some way...i believe there are dbms specific issues and methods.so how to do an independent but still comprehensive study of jdbc....

The good thing about JDBC is, it doesn't really matter which DBMS you use.

Maybe try mySQL. The advantage of mySQL is that you can download it for free, and it is widely used by many organizations. I have mySQL installed on my personal computer, and have no problems with doing basic JDBC programming in that setup.

OK Mr Tsang and I give conflicting advice. My undersatnding is that JDBC itself, once you get the right driver for your particular DBMS, is pretty much the same for various systems, but I am certainly not an expert, so maybe Mr Tsang is right.

edit again: ok SQL syntax itself is not really part of JDBC, JDBC provides a means to deliver SQL queries from java, in that sense I agree with Mr Tsang.

Omar Al Kababji

Ranch Hand

Posts: 357

posted 7 years ago

ok in the market the most popular to use is Oracle so learning oracle would be the best, but if you are a starter and never used SQL before I would suggest to download postgres DB it is lightweight compared to Oracle and easy to install in the same time its robust and very powerful.

hii, thanks to all of you for your valuable advices... by the way,i am not newbie in database applications! now i can figure out, what really i have to do... and yes there are differences(a little, i had witnessed while i was using MySql).will tell ya later....

Raghu Devatha

Ranch Hand

Posts: 40

posted 7 years ago

I think it is good enough if you know any one of the DBMS, mySQL can be a good start, if not Oracle. But you can stop worrying about what DBMS you use( almost) when you start using frameworks such as Hibernate. JDBC is a good start.

Fred Hamilton wrote:The good thing about JDBC is, it doesn't really matter which DBMS you use.

I wish that were true, I really do. The fact of the matter is 99% of all JDBC-based applications *CANNOT* be easily ported to a different database without at least 1 (or 10,000) query 'tweaks'. The only advice I can give you is never rely on built-in functions or syntax that seems db-dependent, you'll dig your own grave every time. On the other hand... generally object-relational mapping solutions like Hiberate/JDO are more easily ported because the developer almost never writes any queries.

Fred Hamilton wrote:The good thing about JDBC is, it doesn't really matter which DBMS you use.

I wish that were true, I really do. The fact of the matter is 99% of all JDBC-based applications *CANNOT* be easily ported to a different database without at least 1 (or 10,000) query 'tweaks'. The only advice I can give you is never rely on built-in functions or syntax that seems db-dependent, you'll dig your own grave every time. On the other hand... generally object-relational mapping solutions like Hiberate/JDO are more easily ported because the developer almost never writes any queries.

OK perhaps I spoke a little loosely. I hadn't considered porting applications between databases. IN addition to what Jeanne said, Yes, there are choices to be made when choosing a dbms, but surely the tweaks you speak of aren't java tweaks, but tweaks to SQL embedded in java. In other words, if all DBMS systems conformed to to SQL standards, there really would be no issue. agreed?

Fred Hamilton wrote:surely the tweaks you speak of aren't java tweaks, but tweaks to SQL embedded in java. In other words, if all DBMS systems conformed to to SQL standards, there really would be no issue. agreed?

I wish the tweaks to be in java, that's often more manageable then trying to rewrite a 5-6 (or 30) line query. As for conforming to SQL standards, that's a dream I gave up on a long time ago. I think it was around the time I learned how to make a sequence for performing an auto-increment value in Oracle, or perhaps it was when I read tens of thousands of lines of code that used functions like nvl(), getdate(), now(), etc. In short, I have yet to come across a JDBC application with more than 10 queries that can be easily ported to a different database. It really takes an object-relational mapping tool to have a portable database-based application, since most developers are just not that disciplined.

Back to the original subject, I do think the database matters to some degree when learning. What you need to keep in mind is how you do things in one system may not match how you do things in others. Syntax can change among DBMS, and some are far better then others at certain things. My general rule of thumb, though, is this:

For simple applications and learning, use MySQL; for gigantic applications with millions of transactions a day, use Oracle; if you're stuck with Microsoft, use MS SQL Server.

I have tried many others, but unless you have a specific need (like an embedded DB), those are the top 3.

Fred Hamilton wrote:surely the tweaks you speak of aren't java tweaks, but tweaks to SQL embedded in java. In other words, if all DBMS systems conformed to to SQL standards, there really would be no issue. agreed?

I wish the tweaks to be in java, that's often more manageable then trying to rewrite a 5-6 (or 30) line query. As for conforming to SQL standards, that's a dream I gave up on a long time ago. I think it was around the time I learned how to make a sequence for performing an auto-increment value in Oracle, or perhaps it was when I read tens of thousands of lines of code that used functions like nvl(), getdate(), now(), etc. In short, I have yet to come across a JDBC application with more than 10 queries that can be easily ported to a different database. It really takes an object-relational mapping tool to have a portable database-based application, since most developers are just not that disciplined.

Back to the original subject, I do think the database matters to some degree when learning. What you need to keep in mind is how you do things in one system may not match how you do things in others. Syntax can change among DBMS, and some are far better then others at certain things. My general rule of thumb, though, is this:

For simple applications and learning, use MySQL; for gigantic applications with millions of transactions a day, use Oracle; if you're stuck with Microsoft, use MS SQL Server.

I have tried many others, but unless you have a specific need (like an embedded DB), those are the top 3.

ok bud, food for thought, it sounds like you've been at this a lot longer than I have. Yeah I guess I have to agree choice of DBMS matters a lot. Just for clarity sake, I guess I meant that JDBC works pretty the same way when you factor out syntactical differences in the SQL itself. but I can see there is a lot more to the decision.

I hope we can all agree that MS Access is a bad choice? It's my understanding that it is notorious for non-standard SQL, at least it used to be.