Ever get tired of setting up a database server everytime you transfer from machine to machine.Maybe when you deploy your code from development to production. Well, i just found out this amazing thing called SQLite.
I’m not sure wether this is built-in or an add-on to php but it can be used together with it. What i’ve tested on the other hand is its relationship with Java. It can be easily appended to your java application through the use of a jar file that can be found here. It’s simple to use since you don’t need to learn some new syntax to get started. If you know JDBC, then you’re set to go.
Class.forName("org.sqlite.JDBC");
Connection conn = DriverManager.getConnection("jdbc:sqlite:test.db");
Just specify that you’ll be using the SQLite driver and point out the database that you want to use (in this case, test.db). If the database doesn’t exist, it’ll create a file named “test.db”. That file serves as the database itself, so take care that you don’t delete it. For every new database, it’ll create a file just like that, depending on the database name that you’ve supplied. To run the program, make sure that the jar file is in the classpath.
Now you’ve got a serverless database!
update (5/13/09):
I was searching for a database manager for SQLite and good news! I found one and it’s just a plug-in for Firefox. How cool is that? Download it here.
Tags: java sample code
.Net asp .net tutorial asp .net tutorial c# sample code CSS sample script database guide java sample code javascript sample code mssql sample script string reverse in C# t-sql telerik sample code user-defined function vb .net sample code visual studio tutorial
WP Cumulus Flash tag cloud by Roy Tanck requires Flash Player 9 or better.