SQL on the iPhone

May 20th, 2009

During development of StoreIt, it is sometimes nice to be able to test SQL running directly on an iPhone without going through the process of building the code into the application. This gives a good idea of performance which you wouldn’t get running the same SQL off the device. For this purpose, we built a little tool for creating and querying a SQLite database on an iPhone or iPod Touch. We are pleased to announce that we have now made this application available through the AppStore.

SQLite Database Console supports the following features:

  • SQL console providing access to the SQL language supported by the SQLite database platform.
  • Access to all recently executed statements for easy re-execution.
  • Recently executed statements saved between sessions.
  • Access to the SQLite SQL documentation within the application meaning you can easily switch between the documentation and SQL console when building your queries.
  • Connect to the SQLConsole from your desktop machine over Wi-Fi to enable backup and restore of database.
  • Use database SQLConsole connection to load SQLite databases created on other machines.

You can find out more about SQLite Database Console on www.database4iphone.com or SQLite Database Console is available now on the iPhone AppStore.

iPhone Business Forms with StoreIt Professional Edition

May 6th, 2009

Building on the success of the StoreIt Database Application, we are pleased to announce the release of StoreItPro.

We had received a number of requests for functionality that we felt would take StoreIt beyond it’s original vision of providing an easy to use app for storing and retrieving data on the move. People wanted to use it across their business, which meant more control was required over how data was entered into the database. As a result we have built StoreItPro, a powerful forms and mobile database tool for the iPhone and iPod Touch.

Whether for individual use or sharing across your business, with the addition of powerful features such as field constraints, conditional fields and calculations across fields and records, StoreIt Professional Edition delivers a tool for building and deploying business forms applications that help you to run your business whereever you are.

Read more about StoreItPro at www.database4iphone.com or on the iPhone App Store.

We are also pleased to announce the release of our latest update for our standard edition of StoreIt. Listening to user feedback, StoreIt Update 2.1 includes the following usability enhancements and bug fixes.

  • You can now change the order of fields after a category has been created.
  • It is now possible to select a view without having to enter the edit view screen.
  • Note fields are displayed using the full screen when keyboard is not visible.
  • Import/export to text file supports newlines within quoted strings.
  • Auto-capitalization of Category and Field names.
  • Fixed display of duplicate and missing records in item lists for large data sets.
  • Various fixes to handling of view and filter definitions.

This update is available immediately from the iPhone App Store or you can read more at www.database4iphone.com.

Read a comparison of both editions of StoreIt in our FAQ.

StoreIt now supports text file import

March 28th, 2009

With StoreIt Update 2.0, you can now migrate data from other tools or desktop databases using the new text file import functionality. Import enables tab-separated text files to be loaded into StoreIt via your browser and the StoreIt Wi-Fi Link.

In addition to the import functionality, StoreIt 2.0 has also added the following functionality.

  • You can now create multiple views on each category which, as well as supporting different display and sort fields, includes the ability to filter the data displayed in each view.
  • The Order button has been renamed View to reflect the more powerful view functionality.
  • Views can now be unsorted and are now unsorted by default.
  • New location field format with links to Maps application.
  • Pick lists now supported on text fields enabling you to specify a pre-defined list of values to select from.
  • The Items field type has been renamed to Category to better reflect the ability to store nested categories within fields.
  • Nice new StoreIt icon!

This update is available immediately from the iPhone App Store or read more on the StoreIt web site.

Update to StoreIt Application Demonstrator: WhatWhereWhen

March 17th, 2009

We have released an update of the StoreIt Demonstrator application WhatWhereWhen. This brings WhatWhere up-to-date to include features available in the latest release of StoreIt and includes some features that will be found in the next release of StoreIt.

The new release of WhatWhereWhen (version 1.2.5) includes the following new functionality.

  • Full text search is now supported and allows you to quickly find records containing any words or phrases.
  • Where you made your sighting is now linked directly to the Maps Application. Simply click the field and you will see where you were on a map.
  • You can now upload existing lists of Sightings that you hold in Excel or other desktop databases to WhatWhereWhen using a CSV text file import.
  • A progress bar has been added when you are transferring information to or from WhatWhereWhen so you know how things are getting along.

WhatWhereWhen is available for FREE from the iPhone AppStore or find out more at www.database4iphone.com.

StoreIt iPhone Database Update: Productivity Improvements

February 24th, 2009

Facdatum is pleased to announce the release of StoreIt Version 1.2. This time we’ve focused on adding a number productivity improvements, making StoreIt even easier to use. This update includes the following new functionality.

- Full text search supported across all fields within a category.
- Auto-completion added to text fields enabling much quicker data entry for repetitive values.
- Email, web and telephone field formats added with links to appropriate applications on iPhone.
- New money field format.
- New checkmark field type for recording YES/NO information.
- Progress bar now displayed during import/export operations.
- Getting started message and links to documentation provided.

This update is available now from the iPhone App Store or you can find out more on the StoreIt web site. Thanks.

StoreIt Demonstrator: iPhone Application Platform

February 19th, 2009

Facdatum are pleased to announce the release of WhatWhereWhen as a demonstration of some of the features of StoreIt and as an example of how data centric iPhone or iPod Touch applications can be quickly built using StoreIt as the application platform.

Whether you’re a bird watcher or rail fan, a lover of wild plants or fine architecture, WhereWhatWhen allows you to log your sightings directly onto your iPhone™ or iPod® Touch.

Features include:
- In addition to fields for recording the Where, What and When, you can store photos and long field notes recording the full details of your observation.
- Entering data couldn’t be quicker, with auto-completion available to avoid repetitive typing.
- Ability to edit your records after the initial entry, so you can go back and enter more detailed notes once you are back in the comfort of your own home.
- Using you home Wi-Fi connection, you can export the data you have collected in text format onto your desktop computer to upload to your own database.
- Full backup and recovery of your data is also supported.

So car enthusiasts and trackers of wildlife, fishermen and plane spotters, try WhatWhereWhen today! Available FREE on the iPhone AppStore or find out more at www.database4iphone.com.

Or, if you’re a domain expert or data set owner who believes you could use StoreIt to build a data centric application for the iPhone or iPod Touch then contact us.

New release of StoreIt: Database tool for iPhone

January 29th, 2009

Facdatum is pleased to announce the release of StoreIt Version 1.1. Taking feedback from our users we have endevoured to expand the capabilities on the StoreIt iPhone database tool. This update contains a bunch of new functionality. Including:

- new image field type allowing images to be stored with other data.
- ability to choose your images from the iPod or iPhone photo library.
- new note field type allowing long multi-line text entries to be viewed and stored.
- ability to store items within items (lists of lists) using the new nested items field type.
- use nested items to create records with parent-child/master-detail relationships greatly extending the types of information StoreIt can hold.
- use the web browser on your desktop computer to link to StoreIt.
- use StoreIt Link to export data to CSV/tab-separated text format for reading into Excel or other tools.
- use StoreIt Link to backup and restore information held in StoreIt.
- note that the export and backup/restore functions require your iPod or iPhone to be connected to your local network via Wi-Fi.

This update is available now from the iPhone App Store or you can find out more on the StoreIt web site. Thanks.

Database Query Plan Analysis in Java Applications

November 7th, 2008

Analyzing the query plans that are being executed by a slow performing database-centric Java application is often key to identifying the causes of the poor performance in the data tier. Capturing these plans however can sometimes be hard, either because the SQL is programmatically constructed, generated by a third party data access layer, or it’s hard to tie in the SQL that can be captured on the database side with the executing Java program. JDBC Tools provides support for capturing query plans at runtime from within any Java program.

JDBC Tools is an open source framework for placing monitoring code within the JDBC layer of an application. It can support custom monitoring plugins, but comes with standard Logger and Query Plan plugins. In this article we will take a look at the Query Planning plugin and see how it can be used to help diagnose application performance issues.

First you need to configure JDBC Tools and the query plan plugin module to work with your database. This is done by editing the jdbc-tools.properties file that comes with the JDBC Tools distribution. Here is an example of the key elements of these properties configured for query planning purposes.

jdbc.listener.classes=com.facdatum.jdbc.logger.JDBCLogger, \
com.facdatum.jdbc.planner.QueryPlanListener
driver.delegate=com.microsoft.sqlserver.jdbc.SQLServerDriver
driver.path=c:\\home\\user\\tools\\jdbc\\sqljdbc.jar
driver.class=com.microsoft.sqlserver.jdbc.SQLServerDriver
driver.url=jdbc:sqlserver://localhost:50679
driver.user=sa
driver.password=sa

If you ensure that this properties file and the supplied jdbc-tools.jar file are on your application’s CLASSPATH then all you need to do to activate query planning from your application is to replace the driver name you use in your application with com.facdatum.jdbc.listener.driver.DriverListener and add listener: after jdbc: in your URL connection string (e.g. jdbc:listener://localhost:50679). Run your application as normal and you will notice a jdbc-logging.log file gets produced.

Currently all calls and exits from the JDBC API are also getting logged. If you do not want this then it can be switched off by changing the log.levels entry in the properties file.

log.levels=

Or, if you want to control which parts of your application get logged then you can configure the ListenerCallFilter plugin. How to do this is explained in the JDBC Tools usage documentation.

The query plans appear in the log file as PLAN messages, where the query plan lines form the message body with each line separated by ^ symbols. These can be converted into a more readable multi-line form using the tools in your favourite editor or tools from your operating system. Here’s a sed script that does the job.

grep PLAN jdbc-logging.log | sed 's/\^/\n/g'

If the query plan contains mutliple columns then these will be bar (|) separated so can be nicely formatted in a spreadsheet.

Reviewing the generated plans you will notice that a single plan is generated for each unique SQL statement executed. Multiple executions do not generate multiple query plans. If you want more control over when plans are generated then you can use the ListenerDurationFilter. This can control output based on the execution time of the SQL queries. Here is an example configuration.

jdbc.listener.classes=com.facdatum.jdbc.logger.JDBCLogger, \
com.facdatum.jdbc.listener.filters.ListenerDurationFilter, \
com.facdatum.jdbc.planner.QueryPlanListener
jdbc.duration.filter.limit=10000
jdbc.duration.filter.change=0.25
jdbc.planner.repeat=true

You’ll see we’ve added the filter to the jdbc.listener.class property and configured some new properties. Other properties remain the same.

  • The jdbc.duration.filter.limit property specifies a duration in milliseconds under which the query plan generation is filtered out.
  • jdbc.duration.filter.change specifies that if the duration of a SQL query changes by the specified percentage then generate the query plan again. So in this example, queries that take over 10 seconds to execute and whose performance has degraded by 25% from the first run will have their query plans generated.
  • We’ve also set the jdbc.planner.repeat to true so SQL that gets passed through the percentage change filter have a query plan generated.

Finally, it is also possible to pre-seed some execution time limits for specific SQL statements.

jdbc.duration.store.filepath=/home/user/sqltimings.store

In this example, the sqltimings.store file contains colon(:) separated <sql>:<duration> pairs which specify initial limits for query execution times.

select * from northwind..employees where FirstName = ?:200

We have seen that with JDBC Tools and it’s query planning capabilities it is possible to straightforwardly capture SQL execution plans to enable quick identification of database performance problems. It can also be as an early warning system to keep a record of the query plans that an application is using over time or to capture the right information when performance has degraded.

JDBC Tools can work with any database platform that is accessed through a JDBC driver, however the query planning capabilties currently support Oracle, Microsoft SQL Server and MySQL. The latest version of JDBC Tools can be downloaded from SourceForge or you can find out more information from http://jdbc-tools.sourceforge.net.

JDBC Tools Version 1.1 Released

November 6th, 2008

JDBC Tools enables monitoring operations to be plugged into the JDBC layer of a Java application. It comes with pre-defined logging and query planning components, but can be easily configured to support any monitoring code that you want to the JDBC layer.

Version 1.1 of JDBC Tools adds support for MySQL and Microsoft SQL Server to the query planning component, complementing the existing support for Oracle. This release also adds the ability to filter monitoring based on execution time, so exception processing can be controlled when SQL query duration exceeds a specified threshold or has changed significantly from previous execution times.

JDBC Tools Version 1.1.0 is available for download from SourceForge or further information is available from http://jdbc-tools.sourceforge.net.

Database Tool for iPhone platform

October 31st, 2008

As users ourselves, we’ve fallen in love with the iPhone platform. We’ve noticed that more and more topic specific database applications have appeared on the AppStore, covering things like To Dos, Expenses, Customer Information, Diet Progress, Time Billing, Shopping Lists, Mileage Records, etc., but there have been few tools available that allow users to create these database applications for themselves. Well, we couldn’t resist building an application for such a great platform. Facdatum is pleased to anounce the release of StoreIt a simple and easy to use database tool for the iPhone and iPod Touch. You can find out more at the StoreIt web site, or on the iPhone App Store.