I'm fairly new to programming especially ones that use database. I can make software that use database but only with .NET and using MySql with XAMPP. However I'm still trying to figure out how to do that in Java because I'm currently learning the language.
However I saw this application which is an application for saving solve times for rubik's cube speedsolves. The software is called Prisma Puzzle Timer. [Download]
The software generates a file with the .db extension on first run in the same directory of the .jar file. I assume this is the database.
My question is how can this be done? And what type of database is it? (the .db file extension)
Although the said software is open source, I don't have enough knowledge to understand the source to even find where the database creation is implemented (though I'm still trying to read through the source and I'm still in my learning phase in Java programming).
The .db extension on the file tells us nothing, because it depends on the program that is generating it as to what format it takes. If you are interested in using databases from Java, and Java itself, then your time would be better spent studying the Java Tutorials[^].
Ah, yes. I just got familiar with that file extension meaning nothing. I actually tried The Java Tutorials but I had a hard time understanding everything there. Perhaps I didn't had enough programming experience yet because I think they assume you've had C++ knowledge already. So I'm currently learning Java with other tutorials.
Anyway I'm familiar with MySql.
I think what you mean is to have an embedded database in your application. Well in that case, you have a number of choices. I would suggest you look at [Hypersonic SQL^]. It is lightweight and quite mature.
Another option is to look at [Sqlite^]. I have not used it in a Java project before, but it is quite a nice and fast little database.
The first thing you need to do is to learn how to use Google to help you in your research. A quick search for "Java tutorials" would have found you The Java Tutorials[^]; clear, concise and useful for anyone new to programming.
You can split Control and View by doing that.
It has several advantages: one of the biggest to me is, that I can change the view without touching the behavior of the UI.
I can also use one Controller for several Views, which gives me more control about what's happening.
But I also use just MV, addressing anonymous event listeners in the view's code. Mostly on dialogs or when "quick&dirty" is required.