472,977 Members | 1,925 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,977 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 3957
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: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

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.