• 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Java and Microsoft access

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.


 
Sheriff
Posts: 67756
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You'd use JDBC. As such, I have moved this post to the JDBC forum.
 
Nicholas Lefebvre
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The program needs to be able to run on a web page would that require me to do anything different
 
Ranch Hand
Posts: 439
Hibernate Eclipse IDE Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No it wont matter provided you keep the file on the server side and manage the number of open connections to the file.
 
Nicholas Lefebvre
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Would XML be a better option. I have never used data bases or XML
 
Saif Asif
Ranch Hand
Posts: 439
Hibernate Eclipse IDE Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 439
Hibernate Eclipse IDE Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can someone explain what this means. https://coderanch.com/how-to/java/JDBCDriverTypeComparison
 
Saif Asif
Ranch Hand
Posts: 439
Hibernate Eclipse IDE Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Nicholas Lefebvre wrote:Can someone explain what this means. https://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
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Okay thanks.
 
Nicholas Lefebvre
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't understand the differences between the database types.
 
Saif Asif
Ranch Hand
Posts: 439
Hibernate Eclipse IDE Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

don't understand the differences between the database types.


What have you not understood ?
 
Nicholas Lefebvre
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i mean the types of database drivers.
 
Saif Asif
Ranch Hand
Posts: 439
Hibernate Eclipse IDE Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
reply
    Bookmark Topic Watch Topic
  • New Topic