Inside Symbian SQL A Mobile Developer s Guide to SQLite 1st Edition Ivan Litovski download
Inside Symbian SQL A Mobile Developer s Guide to SQLite 1st Edition Ivan Litovski download
https://ebookname.com/product/inside-symbian-sql-a-mobile-
developer-s-guide-to-sqlite-1st-edition-ivan-litovski/
https://ebookname.com/product/programming-java-2-micro-edition-
for-symbian-os-a-developer-s-guide-to-midp-2-0-martin-de-jode/
https://ebookname.com/product/porting-to-the-symbian-platform-
open-mobile-development-in-c-c-symbian-press-1st-edition-mark-
wilcox/
https://ebookname.com/product/the-definitive-guide-to-sqlite-
definitive-guide-1st-edition-mike-owens/
https://ebookname.com/product/the-ruby-way-solutions-and-
techniques-in-ruby-programming-second-edition-desconocido/
An Introduction to Mechanical Engineering Part 2 1st
Edition Michael Clifford
https://ebookname.com/product/an-introduction-to-mechanical-
engineering-part-2-1st-edition-michael-clifford/
https://ebookname.com/product/introduction-to-business-fourth-
edition-jeff-madura/
https://ebookname.com/product/globalization-culture-and-
education-in-the-new-millennium-1st-edition-marcelo-suarez-
orozco/
https://ebookname.com/product/the-word-of-light-piercing-the-
veil-of-chaos-1st-edition-shlomo-shoham/
https://ebookname.com/product/evaluating-teen-services-and-
programs-1st-edition-sarah-flowers/
Ralph Waldo Emerson Bloom s Modern Critical Views 2
Updated Edition Harold Bloom (Edited And With An
Introduction By)
https://ebookname.com/product/ralph-waldo-emerson-bloom-s-modern-
critical-views-2-updated-edition-harold-bloom-edited-and-with-an-
introduction-by/
Inside Symbian SQL
Lead Authors
Ivan Litovski with Richard Maynard
With
James Aley, Philip Cheung, James Clarke, Lorraine Martin,
Philip Neal, Mike Owens, Martin Platts
Reviewed by
Erhan Cetintas, Renzo Cherin, Alex Dimitrov, Chris Dudding,
Lucian Piros, George Sewell, Andrew Thoelke
For details of our global editorial offices, for customer services and for information about
how to apply for permission to reuse the copyright material in this book please see our
website at www.wiley.com.
The right of the author to be identified as the author of this work has been asserted in
accordance with the Copyright, Designs and Patents Act 1988.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, electronic, mechanical,
photocopying, recording or otherwise, except as permitted by the UK Copyright, Designs
and Patents Act 1988, without the prior permission of the publisher.
Wiley also publishes its books in a variety of electronic formats. Some content that appears
in print may not be available in electronic books.
Apress hereby grants to John Wiley & Sons, Ltd permission to republish content from
Chapters 3 and 4 of The Definitive Guide to SQLite (Apress 2006) by Mike Owens for
inclusion in Inside Symbian SQL: A Mobile Developer’s Guide to SQLite. Apress retains
the non-exclusive right to publish Chapters 3 and 4 of The Definitive Guide to SQLite in a
future work.
ISBN 978-0-470-74402-4
A catalogue record for this book is available from the British Library.
Typeset in 10/12 Optima by Laserwords Private Limited, Chennai, India
Printed in Great Britain by TJ International Ltd, Padstow, Cornwall
Contents
1 Introduction 1
1.1 Where Should You Start? 1
1.2 Symbian Terminology and Version Numbering 2
1.3 The Relational Model and the Structured Query
Language (SQL) 2
1.4 What Is Symbian SQL? 3
1.5 A Well-Oiled Machine 6
1.6 Tools and Troubleshooting 6
1.7 Further Reading and Resources 6
2 Getting Started 9
2.1 Where to Get Symbian SQL 9
vi CONTENTS
References 389
Index 391
Foreword
RICHARD HIPP
Are you skeptical of the benefits of using the Structured Query Language
(SQL) and SQLite in a mobile device? I would be if I were 25 years
younger and reading this book for the first time. When I first encountered
the SQL language two decades ago, I was deeply suspicious of the
whole idea. SQL seemed like a complex solution to a simple problem.
Wouldn’t it be easier to just read and write directly to various disk files
(sometimes called a ‘pile-of-files’ database) and use a simple key–value
pair database?
In the years that followed that first encounter, I discovered that the
SQL programming language does in fact make many programming tasks
much, much easier. As applications grow more complex and use richer
content, it becomes important to be able to organize that content in
a structured way. The pile-of-files and key–value approaches quickly
become unwieldy. Despite its initial complexity, SQL so greatly simplifies
the management of complex data sets that it ends up being a huge net
simplification. SQL frees the programmer from the drudgery of low-level
I/O interactions and allows the developer to focus on user-facing aspects
of the application.
A programmer familiar with SQL can often replace hundreds or thou-
sands of lines of low-level I/O code with a single 10-line SQL statement,
and in so doing simultaneously scale their productivity and code main-
tainability. The use of SQL also allows programmers to defer data storage
design decisions until late in the design cycle or to make major changes
to storage strategies late in a design with minimal impact to code. Fur-
thermore, the transactional model supported by SQL turns out to be an
exceedingly powerful abstraction that helps to make applications both
more robust and easier to implement.
xiv FOREWORD
My first encounter with SQLite was during the selection of a new rela-
tional database for the Symbian platform in 2005. I worked with Richard
Maynard and his team to study several commercial and non-commercial
databases. As a stakeholder representing application software compo-
nents that needed more sophisticated database capabilities than the
existing solution, I had a keen interest in choosing the right database. We
studied the functionality offered by each product and created benchmarks
representative of the usage planned by the Phonebook and Messaging
applications. We evaluated a wide range of criteria including response
time, memory consumption, disk usage and I/O operations. SQLite was
the best choice – it had high performance and enough functionality
for our planned usage. We were not alone in choosing SQLite: Apple,
Google and Palm also made the same choice for their mobile products.
This book provides a unique insight into Symbian SQL, the
client–server database incorporating SQLite on Symbian. It tells you
what you need to know to take advantage of the performance and
scalability offered by SQLite databases. The authors are all active
contributors to the Symbian platform and have personally influenced the
implementation and evolution of Symbian SQL.
The early chapters of this book contain much of what you’d expect –
an introductory tutorial to demonstrate basic usage of the Symbian SQL
API, an explanation of the relational model for database management,
the key concepts of Symbian database programming and a class-by-class
description of the Symbian SQL API. There’s also an in-depth study into
the architecture and internals of the SQLite library in Chapter 7, which
includes details of the Symbian platform porting layer and technical
information about performance optimizations identified by Symbian and
xviii FOREWORD
Open Source
I have been working on the Symbian platform for a long time now. I
joined Symbian Software Limited as a software engineer in September
1998, initially developing application software for the Psion Series 5mx
and then working on the first Symbian devices such as the Ericsson R380.
Back then all mobile phones had monochrome displays. The excitement
of seeing a prototype of the color screen Nokia 9210 Communicator in a
London hotel suite in 1999 compares well to the surprise and excitement
I felt when I heard that there were plans to make the code available to
everyone via the Symbian Foundation in June 2008.
Symbian SQL is available now as part of the Persistent Data Services
package that is part of the Symbian platform. I’m the package owner for
Persistent Data Services, which is the operating system layer package that
provides the standard frameworks and libraries for handling persistent
data storage. The source code is available to all under an Eclipse Public
License, from developer.symbian.org .
Persistent Data Services has a dedicated mailing list for discussion
of new package features, a discussion forum for the OS Base Services
technology domain, a bug database to report defects, a published backlog
of features under development, and wiki articles about our technology.
All can be accessed from the wiki page we have created for this book at
developer.symbian.org/wiki/index.php/Inside Symbian SQL.
FOREWORD xix
And Finally . . .
I’d like to thank Ivan Litovski, Richard Maynard, and the other authors
for creating an invaluable reference for anybody working with Symbian
SQL. If you use Symbian SQL or want to learn how, then read this book!
Chris Dudding
Persistent Data Services Package Owner, Nokia
November 2009
Author Biographies
Ivan Litovski
Ivan joined Symbian in 2002, working first in the Java team and later with
the System Libraries, Persistent Data Services and Product Creation Tools
teams. Ivan has been a software professional since 1997. He is experi-
enced with Java, embedded software, information security, networking,
scalable servers and Internet protocols. He enjoys solving difficult prob-
lems including in research and development. He has authored several
patents and papers in peer-reviewed, international journals. He holds a
BSc in Electronics and Telecommunications from the University of Nis,
Serbia and is an Accredited Symbian Developer.
Richard Maynard
Richard has worked within the Symbian Devices division of Nokia
Devices R&D as an architect for persistent data storage since Nokia
acquired Symbian in 2009. Richard joined Symbian in 2002 working in
the System Libraries team. After leading the team’s transition to platform
security in Symbian OS v9, he moved to head up the newly formed Per-
sistent Data Services team which had been created in order to introduce a
new standards-compliant SQL database to the platform. Prior to working
xxii AUTHOR BIOGRAPHIES
James Aley
James joined Symbian in 2006 for a year as the industrial placement
portion of his Computer Science degree at King’s College London. After
graduating in 2008, he worked as a Software Engineer for Nokia until
autumn 2009. He is now working at Symbian Foundation as a Technology
Specialist, focussing on the productivity technology domain.
James authored a metadata-based search service for the Symbian
platform based on Symbian SQL. This service made very heavy use of
the technology and is a good example of how it makes demanding
persistence projects simple for the developer.
Philip Cheung
Philip joined Symbian as a graduate software engineer in 2006, working
in the System Libraries team. He now works as a software engineer
in the Persistent Data Services team in the Symbian Devices division
of Nokia Devices R&D. During his time at Symbian and Nokia, Philip
has been involved in various projects on Symbian SQL. Philip received
an MEng in Computer and Communications Systems Engineering from
UMIST in 2004.
James Clarke
James joined Symbian in 2005, working on the contacts database engine
in the Personal Information Management team. Before that he worked
for 10 years in academia as a researcher and database developer. James
now works as a software engineer in the Persistent Data Services team
in the Symbian Devices division of Nokia Devices R&D. He has a BA in
Geography and an MSc in Computer Science, both from the University
of London.
Lorraine Martin
Born and raised in Glasgow, Lorraine graduated from Glasgow University
with a first class Joint Honors degree in Computing Science and Mathe-
matics in 1997. She worked for Cisco Systems before taking a year out in
2001 to indulge her passion for traveling.
AUTHOR BIOGRAPHIES xxiii
Philip Neal
Philip read Classics and Modern Languages at Queen’s College, Oxford
and researched into computational linguistics at UMIST, Lancaster and
Essex universities. He is a translator and technical author.
Michael Owens
Michael is the IT Director for CENTURY 21 Mike Bowman, Inc. An avid
open source developer, Michael has written for several publications,
including the Linux Journal , C++ User’s Journal , and Dr. Dobbs Journal .
He has been a speaker on SQLite at the O’Reilly Open Source Convention
(OSCON).
Michael earned a bachelor’s degree in chemical engineering from
the University of Tennessee. He has worked at the Oak Ridge National
Laboratory as a process design engineer and Nova Information Systems as
a software developer. He is the original developer of PySqlite, the Python
extension for SQLite.
Martin Platts
Martin joined the Symbian Databases team in 2007, where he worked as
Tech Lead on the database characterization project to compare DBMS,
SQL and other third-party databases. Before joining Symbian, Martin
gained four years of Symbian experience, working on projects for com-
panies such as Nokia and Sony Ericsson. These projects included, among
other things, DBMS databases, messaging and multimedia. Martin is now
a Project Manager in the Graphics team at Nokia. He is also a part-time
DJ and club night promoter, and full-time football addict.
Random documents with unrelated
content Scribd suggests to you:
"Se on Alphonso, lyön vetoa siitä", huusi Collins eräälle
apulaiselleen, joka juoksi hänen vieressään. "Nyt se pehmittää
Ralphin."
30.
Vankilan ahtaus alkoi tuntua vasta sitten, kun Miksi oli viety isoon
näyttämön päällä olevaan huoneeseen, missä ennestään oli
vähintään kaksikymmentä koiraa häkkeihinsä teljettyinä. Ne olivat
surkeaa joukkoa, useimmat huonoa rotua, alakuloisia ja viheliäisiä.
Monella oli pahoja haavoja päässä Davisin pahoinpitelyn jälkeen.
Kukaan ei hoitanut näitä haavoja, eivätkä ne parantuneet puuterista,
jota siroteltiin niiden peitteeksi, kun koirien piti esiintyä. Jotkut
ulvoivat surkeasti silloin tällöin, ja vähän väliä ne kaikki haukkuivat
yhdessä, kun eivät voineet mitään muutakaan keksiä ahtaissa
kopeissaan.
Miksi oli ainoa, joka ei yhtynyt tähän kuoroon. Alakuloisuuden yhä
kasvaessa se oli jo aikoja sitten herjennyt haukkumasta. Se oli
käynyt liian epäseuralliseksi ottaakseen osaa tuollaisiin
mielenosoituksiin, eikä se myöskään seurannut niiden äkäpussien
esimerkkiä, jotka aina haukkua luskuttivat häkkinsä säleiden takaa.
Miksi oli liian synkkämielinen viitsiäkseen riidellä. Se halusi vain
saada olla rauhassa, ja sitä se saikin aivan ylenpalttisesti kahden
ensimmäisen vuorokauden kuluessa.
"Juo, piru vie, juo — pidä hyvänäsi", sanoi mies ja painoi niiden
pään likaiseen saippuaveteen.
"No, tämän jälkeen eivät ainakaan voi sanoa, etten minä koskaan
pese koiriani", Davis huomautti vesijohdon luota, missä huuhtoi
käsiään. "Tätä voi jo sanoa päivätyöksi, rakkaani." Rouva Davis
nyökkäsi samanmielisesti. "Voimme harjoitella niiden kanssa
huomenna ja ylihuomenna. Meillä on hyvää aikaa. Pistäydyn tänne
illalla ja keitän niille vähän puuroa. Ne tarvitsevat kyllä ylimääräisen
aterian paastottuaan kaksi päivää."
Miksi oli vain täyterojua, eikä sillä ollut muuta tehtävää kuin istua
tuolillaan. Mutta ensin sen tuli hypätä tuolilleen, ja antaessaan
käskyn siihen Davis sivalsi sitä samalla korvalle. Miksi murisi.
"Mitä nyt?" mies sähisi. "Uusi koira tahtoo hieroa riitaa. Sen saat
nyt jättää, niin — saat vastedes olla kiltti koira. — Pidä, kultaseni,
niitä muita kurissa, sillä aikaa kun minä annan uudelle koiralle
ensimmäisen ojennuksen."
"Se ei ole vielä mitään verrattuna siihen, mitä nyt seuraa", sanoi
Davis ja kohotti rautatankoa. "Aion lyödä sen kuoliaaksi, pieksää sen
henkihieveriin. Odottakaa, niin saatte nähdä."
Eikä Miksi voinut tehdä muuta kuin mitä teki. Se olisi ollut sille
yhtä mahdotonta kuin oli olla murisematta, kun sitä uhattiin kepillä,
tai turmelematta Dickin ja Daisy Bellin numeroa, kun se kuuli
soitettavan "Aalto, vie minut Rioon". Se voi nyt yhtä vähän vaieta
kuin Jeri oli voinut Arielin kannella silloin, kun Villa Kennan kiersi
käsivartensa sen ympäri, kietoi sen ihanaan tukkaansa ja laulullaan
loihti sen mieleen ammoin menneet ajat ja toverit suuressa
koiralaumassa. Miksin kävi samoin kuin Jerin. Soitto oli taikakeino,
joka synnytti unia. Miksikin muisti kadonneet toverit ja etsi niitä, etsi
lumiaavikoita ja tähtiä, jotka tuikkivat taivaalla pimeänä kylmänä
yönä, kuuli hiljaisten ulvahdusten vastaavan omaan ulvontaansa
kaukaa lumipeittoisten kukkulain takaa, sieltä, missä koiralauma
kokoontui. Lauma oli hajonnut; jo tuhansia vuosi Miksin esi-isät
olivat asuneet ihmisten tulilla, mutta se muisti yhä muinaiset toverit,
aina kun sävelten taikavoima sai sen valtoihinsa ja täytti sen
olemuksen näyillä ja aavistuksilla jossakin muualla maailmasta, jota
se itse ei ollut milloinkaan nähnyt. Tähän hereillä nähtyyn uneen
liittyi hovimestarin muisto ja rakkaus tätä jumalaa kohtaan, joka oli
opettanut sen laulamaan saman sävelen, mitä viuluasoittava
sirkusratsastaja juuri nyt veteli. Ja Miksi avasi suunsa, sen kurkku
tärisi, etukäpälät tekivät hermostuneita liikkeitä, aivankuin se todella
olisi juossut, kuten se nyt mielikuvituksessaan juoksi, takaisin
hovimestarin luo, takaisin ohi kaikkien vuosisatojen, kadonneen
koiralauman luo ja sitten veljineen varjolaumassa yli lumiaavikoiden
ja läpi metsäin temppeliholvien riistaa ajaen.
32.
Mutta yleisö!
33.
"Voitte olla varmat siitä, että ellei tuska vaikuta eläimeen, sitä ei
voi opettaa. Tuska on ainoa opettaja."
Oli päiviä, jolloin koko ilma oli täynnä areenalta tulevia vihan ja
tuskan huutoja ja vaikerrusta, niin että kaikki häkeissä olevat eläimet
kiihtyivät ja kävivät levottomiksi. Koska Mulcachy aina kehui
selviävänsä kaikkein vaikeimminkin opetettavista eläimistä, hän sai
aina vaikeimmat tapaukset osalleen. Hänen kerrottiin onnistuvan
siinä, missä muut epäonnistuivat, ja pelkäämättömänä,
kylmäverisenä ja viekkaana hän piti huolen siitä, ettei hänen
maineensa päässyt kalpenemaan. Ei ollut mitään, mihin hän ei olisi
uskaltanut ryhtyä, ja kun hän heitti jonkun eläimen, ei siitä ollut
enää mitään toivoa. Silloin se joutui häkkivangiksi ja sai alati
matkustaa edestakaisin, kunnes se katkeroitui koko ihmismaailmalle
ja ärjyi ilmoille vihansa synnyttäen selkääkarmivan pelon maksavissa
katsojissa.
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
ebookname.com