|
|
|
|
|
|
|
Empress Technical News Empress
SDK for Android The latest Empress SDK for Android offers Android application developers new ways to develop advanced database applications requiring robustness, reliability, security, high performance, large data sets, multi-tasking control and much more. Since Android comes with SQLite support, most Android application developers use SQLite for their database data driven applications. In many cases, application developers find that SQLite based applications will outgrow SQLite capabilities and these developers will find themselves scratching their heads and looking for an alternate solution. Empress SDK for Android with Empress SQLite Interface is a nice alternate solution. Empress for Android supports the following APIs: 1. Empress JDBC API (JDBC) Empress SDK for Android supports the database access standard API, JDBC. The JDBC API can help developers create new database applications or migrate existing database applications to Android. The JDBC API can access databases on the local Android device (Figure 1). In addition, Empress JDBC Android application developers can create applications where data is stored outside of the local device such as on a local LAN, an Internet location or even in a Cloud (Figure 2).Figure 1: Empress Android JDBC API It is even possible to mix and match local, LAN, Internet and Cloud database storage from the same Android device. Figure 2: Different Ways to Use Empress Android JDBC Applications In addition to JDBC, SDK for Android supports the Empress Sqlite database interface (see Figure 3) as defined in the Android package android.database.sqlite. Android application developers can utilize the Empress Sqlite API to convert an existing Android sqlite application or create a new application. This Empress Sqlite API helps developers migrate existing database applications to Android or create new ones quickly and with low conversion effort. Figure 3: Empress Android SQLite Compatibility API (sqlite API) Empress SDK for Android also supports the usage of callable administration functions (e.g. creating and removing databases, exporting and importing data, checking and repairing databases) and setting Empress System variables in the Android environment. Empress SQLite versus SQLite on Android Devices Empress SDK for Android offers many advantages compared to SQLite on Android devices. To mention a few: Robustness and Reliability Empress database engine has a long history of over 30 years of usage in embedded applications. Bringing the same database engine to Android devices allows developers to experience the same kind of reliability and robustness that many production systems have experienced for decades.Additional Features With Empress, database developers are offered a full-fledged database development environment comparable to enterprise environments. Many features, such as encryption, allow application developers to enhance their Android applications.Large data set solution Empress allows application developers to build applications that can go way beyond just contacts and address book dataMulti-access solution Empress APIs for Android supports concurrent access that allows applications to run multiple tasks at the same time.Database degradation over time Since SQLite has a single file to contain all the data, there is a greater likelihood of the database file being fragmented compared to Empress where the database data is spread over multiple files.Performance Performance of Android devices (phones, tablets, special devices, …) depends on factors such as: the location of the data storage, memory, CPU, Android version, etc. Benchmarks have shown that Empress APIs beat SQLite on Android devices with larger data sets. Develop Empress Applications Using sqlite API Since Android defines classes and methods in its package android.database.sqlite. The following classes are supported: Classes SQLiteClosable SQLiteCursor SQLiteDatabase SQLiteOpenHelper SQLiteProgram SQLiteQuery SQLiteQueryBuilder SQLiteStatement android.database.sqlite classes are referenced in: http://developer.android.com/reference/android/database/sqlite/package-summary.html Converting SQLite Applications to Empress When converting SQLite Android application to work with Empress SQLite, here are the major areas that application developers need to be aware of: Import Lines import database.sqlite.* Import lines related to SQLite should be changed in the following way: import com.empress.database.sqlite.* Set up Empress Temporary Directory on the Android Target At runtime, the Empress Database engine needs a temporary directory to store temporary files when necessary. This task is optional if your default temporary directory is writeable. On Android devices, the typical default is: /sdcard which is usually writeable, so you don’t need to do anything. Set License Key In order to enable Empress applications to be used in Android environment, a valid license key must be set in the application before using Empress methods. An Empress license key will be provided to you by Empress Software Inc. The key could be an evaluation key that expires after a certain time or a runtime key that does not expire for production purpose. For example: lic_str = " 18a94c3c3a2d4a9f3c0b0a225bae78398561c30476be1ad3" Example The Empress sample project EmpressEmpSQLiteSample included in the Empress SDK for Android zip file has all the Empress components pre-configured so that users can try it and run it in their Android emulator or a real device. 4 shows the EmpressEmpSQLiteSample directory structure: Figure 4: EmpressEmpSQLiteSample Directory Structure
|
Company |
Products |
Services |
Partners |
Media |
|
USA: 301-220-1919 Canada
& International: 905-513-8888 |