Creating and Modifying Input Files for an SQlite or a DBMS
Database
The following is the list of input files that can be specified to the SDB
tool for SQLite or DBMS mode:
SQL file
The SQL file contains the database schema definition and data in the
form of standard SQL statements.
Note: The data and the schema information can be mentioned
in the same file or in a different file. When multiple SQL files are provided
as input, the SDB Creator tool runs the SQL statements in each file in a
sequential order.
The following is an example of an SQL file:
CREATE TABLE Test
(
Company varchar,
OrderNumber integer
);
insert into Test(Company,OrderNumber) values('company 1', '3412');
insert into Test(Company,OrderNumber) values('company 2', '5678');
In the preceding example, Test
is the name of the table
that is created. It also inserts records to this table using the
insert
command.
XML Configuration file
The configuration file contains the security settings and database
configuration settings that can be specified as input while creating or
updating the SQLite and DBMS databases.
The configuration file contains:
The following is a sample configuration file:
<?xml version="1.0" encoding="UTF-8"?>
<sdb:sdb version="2.0"
xmlns:sdb="http://www.symbian.com/sdbcreator/symbiansecuritysettings"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<database type="sqlite">
<policy type="default" always="fail"/>
<policy VID="f" type="schema">
<capability type="TrustedUI"/>
<capability type="PowerMgmt"/>
<capability type="DRM"/>
</policy>
<configuration name="page_size" value="512"/>
<configuration name="encoding" value="UTF_16"/>
</database>
<database type="dbms">
<configuration name="block_size" value="4096"/>
<configuration name="cluster_size" value="4096"/>
<configuration name="locale" value="./library.dll"/>
</database>
</sdb:sdb>