• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DB on Local Files System

 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I am just starting with JDBC (trying to learn) and am not in a situation where my DB cannot be on a server, so I have it stored on my local files system.
Will it be accessed the same way? Or where do I need to start? Any information would be greatly appreciated.
Restatement - How do I make the URL point to a local file and connect to it??
Thanks

------------------
Happy Coding,
Gregg Bolinger
[This message has been edited by Gregg Bolinger (edited October 26, 2001).]
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want to get started with JDBC, you'll have to have some sort of database. I'll assume that there's no budget for the likes of Oracle or even SQL Server. While you could use an embedded database (e.g. HypersonicSQL, I would still recommend you start with a "real" database server. The good news is that nothing stops you from running the server on your very own machine! Well, nothing except a possible lack of memory, that is. Try MySQL for starters, or PostgreSQL.
- Peter
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Peter.
------------------
Happy Coding,
Gregg Bolinger
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, I installed MySQL and started running the service. Do I still connect with the url in the fashon jdbc dbc:mysql or does odbc need to be something different.
Sorry if these questions seem elementary and if I need to read something that will help, please point me in the right direction.
Thanks

------------------
Happy Coding,
Gregg Bolinger
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. You'll only find a jdbc dbc: URL if you're using the JDBC-ODBC bridge. With MySQL, you don't need a bridge - rather, fast and efficient JDBC straight to the database. Grab one of the JDBC drivers from the contributed software page.
For instance, if you use this one, then you can connect to your database usingWhere "databasename" is the name you chose for your database.
- Peter

[This message has been edited by Peter den Haan (edited October 26, 2001).]
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Peter, Thanks a million. I have one more question if you don't mind. How is it that using the Driver you suggestion faster than using the ODBC? Isn't it just replacing one driver with another? Is it truly a straight shot to the Database? And, what size will a database need to reach before I really tell a difference in speed?
Thanks again.

------------------
Happy Coding,
Gregg Bolinger
 
zou xiao fei
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
the codes upstair use a type 4 jdbc driver which mean it's fully made of pure java.The way of using jdbc-odbc bridge means access dbs via type 1.
You can know more from sun jdbc page or just search in ranch
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic