• 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

Need help learning about databases

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, i have done lot's of research about this but i can't seem to find what im looking for, i am curious about learning MySQL with JDBC but i cant seem to find a book for beginners that teaches MySQL or JDBC so if someone please recommend some books for either MySQL or JDBC it would be much appreciated, i don't learn well from reading stuff online about MySQL so could you please not just leave a link to a SQL or jdbc tutorial,
Thanks.
 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Joe,

Check this out. Head First SQL from O' Reilly publications. It gives you what you want.

Thanks,
Akshay
 
Joe Daly
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
does it tech about JDBC ??
 
Bartender
Posts: 2407
36
Scala Python Oracle Postgres Database Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Joe Daly wrote:does it tech about JDBC ??


JDBC is really a separate topic from MySQL, so learn about your database - SQL, data modelling etc - from a book if that's easier for you, then use online JDBC tutorials and the appropriate API documents to learn about the JDBC drivers for MySQL.
 
Joe Daly
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK but after i read the head first SQL book how will i learn MySQL and also will the online JDBC/MySQL documentation tell me how to set up a IDE for using JDBC?
whats the difference between SQL and MySQL, and is online the only way to learn about them ?
 
Sheriff
Posts: 3837
66
Netbeans IDE Oracle Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is an excellent JDBC tutorial online: oracle jdbc tutorial. If you already know something about databases and SQL, the JDBC tutorial is your next stop. I presume there could be an introductory book into JDBC as well, but I learned online, so I don't know.

Edit: the tutorial does mention setting up the development environment.

Joe Daly wrote:whats the difference between SQL and MySQL, and is online the only way to learn about them ?


SQL is a language (SQL means Structured Query Language actually); there are several standards of SQL, but unfortunately, every database vendor implements the language in his own way. Only the most basic commands (SELECT, INSERT, UPDATE, DELETE) work the same in (more or less) all databases, anything beyond that is usually at least a bit different in at least some databases. ("The same" is relative here, databases might different in details of their locking and concurrency mechanisms, so even if you build your multi-user application to contain only the most basic commands - and therefore be syntactically correct on a wide flavors of databases - it might still not work the same on all of the databases due to the locking/concurrency differences).

MySQL is a database which contains an implementation of the SQL language. There is a MySQL reference manual (if you know the SQL already, you can look up the concrete MySQL implementation features here).
 
chris webster
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

Joe Daly wrote:OK but after i read the head first SQL book how will i learn MySQL...


The book tells you how to install MySQL so I'm guessing it uses MySQL as the teaching platform. If not, most other "teach yourself databases" books use MySQL so just pick another book.

Joe Daly wrote:... and also will the online JDBC/MySQL documentation tell me how to set up a IDE for using JDBC?


No, that will probably be your IDE's instructions, but you'll also need to check the documentation for your JDBC driver to find out how to use it. JDBC connections work via a kind of URL, but the format of the URL is a bit different for each database/JDBC driver. So for example:

  • The JDBC URL "jdbc:mysql://127.0.0.1:3306/mydb" tells your MySQL JDBC driver to connect to the MySQL database named "mydb" which is listening for connections on port 3306 on the server with address 127.0.0.1 (i.e. your localhost).
  • The JDBC URL "jdbc:oracle:thin:@//127.0.0.1:1521/orcl" tells your Oracle JDBC driver to connect to the Oracle database named "orcl" which is listening for connections on port 1521 on the server with address 127.0.0.1.

  • Most JDBC drivers also accept additional parameters either via the URL or via connection properties supplied through your application e.g. DB username/password etc.
     
    Bartender
    Posts: 10780
    71
    Hibernate Eclipse IDE Ubuntu
    • Likes 1
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Joe Daly wrote:OK but after i read the head first SQL book how will i learn MySQL and also will the online JDBC/MySQL documentation tell me how to set up a IDE for using JDBC?


    That's an awful lot of stuff you're mixing together there. Just to recap what's probably already been said:
    1. MySQL is a database.
    2. SQL is a language you use to extract information from the database.
    3. JDBC is the "glue" needed to connect your database to a Java program.
    4. Most major Java IDEs support JDBC, and they don't really care what type of database you're connecting to.

    whats the difference between SQL and MySQL, and is online the only way to learn about them ?


    1. See above.
    2. No.

    Winston
     
    Joe Daly
    Ranch Hand
    Posts: 45
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    OK thank you all for the helpful answers i am appreciative, and can MySQL be used in web applications? , and i think i have setup a java application in netbeans that supports JDBC, so that's one problem solved.
     
    Winston Gutkowski
    Bartender
    Posts: 10780
    71
    Hibernate Eclipse IDE Ubuntu
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Joe Daly wrote:and can MySQL be used in web applications?


    Sure it can, but the question is kind of meaningless. It's a bit like asking whether you can use a saw to make a table.

    Answer: sure, with the right skills and equipment; but that doesn't mean that they have anything to do with each other.

    Winston
     
    chris webster
    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

    Joe Daly wrote:OK thank you all for the helpful answers i am appreciative, and can MySQL be used in web applications? , and i think i have setup a java application in netbeans that supports JDBC, so that's one problem solved.


    A web application typically consists of three layers (or tiers):

  • A front-end user interface which will run in your browser and is based on HTML/CSS/JavaScript (but also may be partly generated from server-side code like JSP or PHP etc).
  • A middle business tier on your application server, which contains your business logic and may be written in Java e.g. using servlets, or in any other language (PHP, Python, .NET etc).
  • A persistence tier which is typically a relational database like MySQL or Oracle, where your application's persistent data is maintained and can be manipulated via SQL.

  • Different application languages have their own drivers for talking to the database, but as you're interested in writing a Java application, you will be using JDBC drivers. But you can use the same 3-tier architecture for any web application, so there's nothing to stop you writing your business logic in Python instead and still using a MySQL database, because the three tiers are intended to be relatively independent from each other. Which is why it's a good idea to understand the difference between your MySQL database (and SQL) on the one hand, and your JDBC drivers and Java application code on the other, because they're separate technologies.

    The good news is that there are lots of books, online tutorials, tools and so on to help you build your first web application, in whichever language you want to use.
     
    Joe Daly
    Ranch Hand
    Posts: 45
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    chris webster wrote:
    A web application typically consists of three layers (or tiers):


    are you referring to MVC and if so, when i was reading the headfirst servlet and jsp book it said nothing about persistence or databases
     
    Don't get me started about those stupid light bulbs.
    reply
      Bookmark Topic Watch Topic
    • New Topic