![]() ![]() Now, one of the problems with Sqlite wrappers is that many of them either include or modify the Sqlite code itself. It's a good project, and works exactly as expected on Linux: When it comes to Java, there is only one that I know of, and it is here. Fortunately many of the wrappers are themselves very small, so there is not too much to go wrong and you should be able to fix problems that arise. These range from finished code to various states of pre-alpha, alpha and beta. the main author), the same does not apply to all the wrappers out there. Note that while there's no doubting the qualiity of the Sqlite database library itself (kudos to D. I've also included some downloads for two things I found tricky - using the Mono Sqlite data provider with Microsoft.Net, and using the Java Sqlite wrapper on the Mac. What follows is a few notes on how I've got on so far. I was also interested in the possibility of porting the application to Java in order to run on Mac OS X and Linux, the two main "other" desktop platforms. I decided to investigate the feasibility of using Sqlite as an alternative to Microsoft's JET (the Access database engine) in a. Sqlite strikes me as nearly ideal for applications that need fast and robust access to local data. A SQL API is more portable, despite the dreaded implementation differences. So if you use the Codebase API and then later want to upscale to SQL Server or Oracle or DB2, everything will need to be redone. You can use SQL via its ODBC driver, but frankly ODBC should not be necessary for an embedded database. The problem with Codebase is that it is at heart Xbase and not SQL. It reminds me in some ways of Codebase, another excellent database library that runs everywhere. I like it because it is lightweight, fast, cross-platform, and supports a very decent subset of SQL. : I think… I haven't actually checked or tested this.Sqlite is a small C database library. Perfect! : Technically RSQLite is a separate package, but it's a dependency of (), which is as important as base R in my book. tl dr version: (1) install an SQLite ODBC driver, (2) install an ODBC manager, (3) use the manager to configure the SQLite ODBC driver and connect to an existing SQLite database, and (4) connect to the SQLite database through ODBC with LibreOffice Base. Magic! Even though there are 10 steps, it's not too difficult. Create a table, insert some records, and open the SQLite file in a GUI program to see all the changes. Create new tables and forms using LibreOffice: !(ugly_form.png "Super ugly example form") Any time you save, all edits will occur on the SQLite file. This is fine-it's not actually saving the database, just the accompanying form data. Click on "Finish." LibreOffice will prompt you to save an `.odf` database. If you click on "Browse…", you should see the name of the SQLite database you set up as a DSN earlier. Click next to select which ODBC database to load. In the wizard, select "Connect to an existing database" and choose "ODBC": !(base_wizard.png "LibreOffice Base wizard") 8. Open LibreOffice and create a new Base database. The SQLite file is now accessible in any program that uses ODBC. Create a new key named "database" and use the full absolute path to the SQLite database file as the value: !(dsn_setup.png "DSN setup dialog") 6. Add a new driver using these settings: !(driver_setup.png "Driver setup dialog") 5. There are two that work equally well: () and (). Prior to OS X 10.5, Apple included one of these, but for whatever reason they stopped with Snow Leopard. The page includes a link to a precompiled version ( currently it says “Steve Palm kindly provided a build of version 0.9993 for MacOSX 10. Download the SQLite ODBC driver for OS X.Add some tables to it, or don’t-it doesn’t matter. Create a new SQLite database using sqlite3 in Terminal (or even easier, use a GUI program). There are official instructions for doing this on Linux and Windows, but there’s nothing about doing it in OS X. The solutionįortunately there’s a way to use an SQLite database as the backend for LibreOffice Base using an ODBC driver, giving the best of both worlds: an open, universal, Java-free database behind a customizable form-based GUI. LibreOffice Base has excellent support for database-backed forms, but under the hood, LibreOffice uses the Java-based HSQLDB, which does not have native R and Python support and requires older Java runtime environments. ![]() I could use Python to program my own GUI (or even get fancy and learn Swift and make a native Cocoa app), but that seems like an excessive amount of work. There are plenty of SQLite viewers, but I haven’t found any that let you create Access-like forms. 1 Technically RSQLite is a separate package, but it’s a dependency of dplyr, which is as important as base R in my book.
0 Comments
Leave a Reply. |