473,386 Members | 1,886 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

sqlite or xml

Hello group,

If I need store and use a couple thousand of people's contact info:
first name, last name, phone, fax, email, address, etc. I'm thinking
of using either sqlite or xml. Which one is better? My understanding
is if there is large amount of data, sqlite would be better as far as
speed is concerned. But how much data is considered to be "large
amount"?

Thank you!
Dec 6 '07 #1
7 3970
On Dec 6, 10:21 pm, Kelie <kf9...@gmail.comwrote:
Hello group,

If I need store and use a couple thousand of people's contact info:
first name, last name, phone, fax, email, address, etc. I'm thinking
of using either sqlite or xml. Which one is better? My understanding
is if there is large amount of data, sqlite would be better as far as
speed is concerned. But how much data is considered to be "large
amount"?

Thank you!
I'm personally partial to databases myself and at a thousand records a
database is good idea, or an indexed file. Depends on what you want
to do with it in the end which should resolve the problem. Do you
need it to accessed (read & write) by multiple people ? Or would it
just be a single transaction process (ie. just you locally)
Dec 6 '07 #2
how much data is considered to be "large amount"?

one record

Unless you really need XML to communicate with some other app via
a predetermined schema, use a database to store and retrieve
data. If you only need to send data to another app via a
predetermined schema, use a database and then offer an "export to
XML" functionality.

for s in ['regular expressions', 'XML', 'perl', 'WS-*']:
print """
Some people, when confronted by a problem,
think "I know, I'll use %s!"
Now they have two problems.""" % s

-tkc
Dec 6 '07 #3
Tim Chase wrote:
>how much data is considered to be "large amount"?

one record

Unless you really need XML to communicate with some other app via a
predetermined schema, use a database to store and retrieve data. If you
only need to send data to another app via a predetermined schema, use a
database and then offer an "export to XML" functionality.
I agree. IMO, XML should be used as a data exchange format, not as
database format for databases of *any* length. Though some
products/projects may tell you otherwise.

I won't limit data exchange to only other apps/programs. One benefit of
XML is that it's relatively human readable, so exchanging data directly
with humans using XML is probably acceptable, but shouldn't be encouraged.
Dec 6 '07 #4
Tim Chase wrote:
>how much data is considered to be "large amount"?

one record

Unless you really need XML to communicate with some other app via a
predetermined schema, use a database to store and retrieve data. If you
only need to send data to another app via a predetermined schema, use a
database and then offer an "export to XML" functionality.
I agree. IMO, XML should be used as a data exchange format, not as
database format for databases of *any* length. Though some
products/projects may tell you otherwise.

I won't limit data exchange to only other apps/programs. One benefit of
XML is that it's relatively human readable, so exchanging data directly
with humans using XML is probably acceptable, but shouldn't be encouraged.
Dec 6 '07 #5
Thanks Chris, Tim and Yu-Xi. I'll follow your advice and use database.
Dec 6 '07 #6
On Dec 7, 12:34 am, Kelie <kf9...@gmail.comwrote:
Thanks Chris, Tim and Yu-Xi. I'll follow your advice and use database.
Hi Kelie

If you're happy going with sqlite then stick with it. If on the other
hand you were considering XML because you're more comfortable with
that (e.g. you find XML easy to work with and you're more familiar
with XPath/XQuery than SQL) then you could use XML if you wanted. The
choice is not between XML and databases, it's between XML and
relational. There are -- shock-horror! -- full-featured XML databases
too (e.g. Berkeley DB XML, which is lightweight, fast, embeddable and
open source like sqlite, with indexing, transactions etc. if you need
that). XML is very widely used in publishing and not only as a data
transfer format which happens to be human-readable. The main reason
for going for a database over a file in your case is I'd guess to
support searching, since performance wouldn't be an issue these days
with a few thousand records.

Developers tend to have strong feelings in favour of relational (=
"tabular" storage) over xml database (= "hierarchical" storage) but
this will change. If you are asking what would work for your
relatively simple use-case, the answer is both, since the storage
model isn't that important for a contacts address list. What would
work best for you in this case is whichever you would prefer...

TimvN

Dec 7 '07 #7
On Dec 6, 3:37 pm, tinkerbar...@gmail.com wrote:
If you're happy going with sqlite then stick with it. If on the other
hand you were considering XML because you're more comfortable with
that (e.g. you find XML easy to work with and you're more familiar
with XPath/XQuery than SQL) then you could use XML if you wanted. The
choice is not between XML and databases, it's between XML and
relational. There are -- shock-horror! -- full-featured XML databases
too (e.g. Berkeley DB XML, which is lightweight, fast, embeddable and
open source like sqlite, with indexing, transactions etc. if you need
that).
Tim?

Ah, now you're making it hard for me to decide again. :-) Talking
about comfortable, I do like Amara XML toolkit a lot. But I'll stick
with sqlite in this case.

Thanks for your valuable input and for mentioning Berkeley DB XML. I
didn't know about it and will have to read about it.
Dec 7 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: David Fowler | last post by:
I'm new to getting in touch with other PHP users/PHP team, so please excuse me if this post is at all inappropriate or in the wrong place. In the current release of PHP (5.1.4) and in the CVS for...
12
by: John Salerno | last post by:
I've been looking around and reading, and I have a few more questions about SQLite in particular, as it relates to Python. 1. What is the current module to use for sqlite? sqlite3? or is that not...
4
by: Jim Carlock | last post by:
I added the following lines to PHP.INI. extension=php_pdo.dll extension=php_pdo_sqlite.dll extension=php_sqlite.dll specifically in that order. I noticed the extensions getting loaded are...
14
by: 7stud | last post by:
Does sqlite come in a mac version? Thanks.
10
by: Luigi | last post by:
Hello all! I'm a newbie in PHP. I have written a short script that tries to update a SQLite database with the user data. It is pretty simple, something like this: <?php $sqlite =...
9
by: Gilles Ganault | last post by:
Hello I was looking for a lighter web server than Apache, and installed Lighttpd on CentOS through yum. It works fine, but I now need to use SQLite from a PHP script. I seem to understand that...
8
by: Gilles Ganault | last post by:
Hello I need to compile PHP5 with SQLite statically and without PDO. I don't need DB-independence, so it's fine using sqlite_*() functions instead of PDO. 1. I've downloaded, compiled, and...
3
by: Daniel Fetchinson | last post by:
Does Python 2.5.2's embedded SQLite support full text searching? Sqlite itself is not distributed with python. Only a python db api compliant wrapper is part of the python stdlib and as such it...
0
by: Joe Goldthwaite | last post by:
Thanks Guilherme. That helped. I guess I was thinking that pysqlite would automatically come with some version of sqlite. The fact that it doesn't is what was causing me to get the strange...
20
by: timotoole | last post by:
Hi all, On a (sun) webserver that I use, there is python 2.5.1 installed. I'd like to use sqlite3 with this, however sqlite3 is not installed on the webserver. If I were able to compile sqlite...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.