Reputation: 69
I need some guidance on how to retrieving data from a database. The database is called Drug Combination DataBase and so far I'm just using a small text file that contains a small portion of the data, but the complete database is available as a 14mb sql-file. Can I load this in an efficient way during run-time in my java application so I can look up a few entries? I've never used an sql-file to retrieve data in java before so I don't know what is the best strategy. By the way, I'm creating an application that reads large graphs and another xml database so memory usage is fairly high.
Upvotes: 0
Views: 798
Reputation: 2461
the way to connect a Java program to a database is through JDBC. the file needs to be read int and saved to a database like MySQL or PostgresQL in order to be accessed. check out this link for a good tutorial: jdbc tutorial
Upvotes: 1