wood burning stoves*
The moose likes JDBC and the fly likes Java and Microsoft access Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Bookmark "Java and Microsoft access " Watch "Java and Microsoft access " New topic
Author

Java and Microsoft access

Nicholas Lefebvre
Greenhorn

Joined: Feb 05, 2013
Posts: 23
I have to make an application which stores:
Names
Surnames
Status
Age
Division
IP address
Games that the person plays

All of that need to be stored in a Microsoft database. I can set up a access database no problem. But i have no clue how to link it to the java program. Which needs to be able to search the data base for any of listed information above and display which person/person have it in common. Please can someone help me with this.


Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61310
    
  66

You'd use JDBC. As such, I have moved this post to the JDBC forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Nicholas Lefebvre
Greenhorn

Joined: Feb 05, 2013
Posts: 23
The program needs to be able to run on a web page would that require me to do anything different
Saif Asif
Ranch Hand

Joined: Aug 11, 2011
Posts: 440

No it wont matter provided you keep the file on the server side and manage the number of open connections to the file.


Muhammad Saif Asif Mirza
OCJA(5/6) OCJP(6) OCJWCD(6)
Nicholas Lefebvre
Greenhorn

Joined: Feb 05, 2013
Posts: 23
Would XML be a better option. I have never used data bases or XML
Saif Asif
Ranch Hand

Joined: Aug 11, 2011
Posts: 440

Would XML be a better option. I have never used data bases or XML

Well the decision mostly depends on your requirements. If its a small purpose application , JDBC and data source as access file should be enough for you ( keep in mind the limit of open connections to the file , I remember windows has a limit far less than Linux systems ). I can't say much about XML since I have not used XML for storing records.

Why aren't you using the common DB applications ? Be it MySQL or even memory based databases ( Memory Mysql ) or HSQLDB .
I have never used data bases

It will also be a great learning opportunity for you ! Databases are everywhere and you cant avoid them . We will be more than glad to help you along your learning path.
Nicholas Lefebvre
Greenhorn

Joined: Feb 05, 2013
Posts: 23
I have never worked with databases before. I have only used text files. Could someone give me an example of the code that is needed for a database to connect to the program. I have never used SQL before.
Saif Asif
Ranch Hand

Joined: Aug 11, 2011
Posts: 440

The JDBC-FAQ forum will be the best place to start . Have a look around it. Do post back for further queries.
Nicholas Lefebvre
Greenhorn

Joined: Feb 05, 2013
Posts: 23
Can someone explain what this means. https://www.coderanch.com/how-to/java/JDBCDriverTypeComparison
Saif Asif
Ranch Hand

Joined: Aug 11, 2011
Posts: 440

Nicholas Lefebvre wrote:Can someone explain what this means. https://www.coderanch.com/how-to/java/JDBCDriverTypeComparison

This is just an overview of the different types of configurations when setting up your database with your application.
Take a look at the type 1. This is your configuration where you mentioned that everything was stored in a Microsoft Access database. The rest of the rows shows what are the configurations of this setup like does it require to be installed on the client ( yes in your case ), is it platform independent ( Not in your case since you are dependent on the ODBC driver and it needs to be configured before it can be used ) and so on. The table has just categorized the possible configurations that can be made to interact your java application with the database.
Also I would like you to thoroughly go through this wiki article in detail JDBC driver types . This article is explaining the types in detail . Do post back for any further queries.
Nicholas Lefebvre
Greenhorn

Joined: Feb 05, 2013
Posts: 23
Okay thanks.
Nicholas Lefebvre
Greenhorn

Joined: Feb 05, 2013
Posts: 23
I don't understand the differences between the database types.
Saif Asif
Ranch Hand

Joined: Aug 11, 2011
Posts: 440

don't understand the differences between the database types.

What have you not understood ?
Nicholas Lefebvre
Greenhorn

Joined: Feb 05, 2013
Posts: 23
i mean the types of database drivers.
Saif Asif
Ranch Hand

Joined: Aug 11, 2011
Posts: 440

Nicholas Lefebvre wrote:i mean the types of database drivers.

Try to link the wiki article with the table in this forum. The table is just a gist of the whole article.

Let me try to explain you with an example.
Take the scenario of a JDBC-ODBC system where you are maintaining the database in a single MS Access file. Now , does the ODBC data source and driver needs to be declared on the client machine ? Yes ! Is it cross plateform ( can it run on linux , solaris or mac servers ) ? No . Does it require a separate machine to be accessed ? The ideal answer is No since theres no point in having a separate server to serve all requests for an ODBC data source that has to be defined on the clients machine anyhow.

Another scenario ( MySQL , and this is what I would suggest you start with since it is the most easy to use open source DB application available on the planet ! ) . Does the driver need to be installed on your CLIENTs machine ? No . Is it cross plateform ? Yes . Does it require a separate server machine ? Yes .

So this is how the different database drivers are categorized.
The main question is that which driver to be given preference to and which one is better. The answer to first question is that it is completely dependent on your requirements , and secondly all of them are good provided you know how to use them properly and benefit from their capabilities.

I hope I was able to clear it out to you. Do post back if any further queries
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java and Microsoft access