[prev in list] [next in list] [prev in thread] [next in thread]
List: sqlite-users
Subject: Re: [sqlite] Novice SQLite user
From: Simon Slavin <slavins () bigfraud ! org>
Date: 2010-05-27 2:16:44
Message-ID: 34181A9E-98BD-4B5C-9CBB-A0B87FEFFC3C () bigfraud ! org
[Download RAW message or body]
On 27 May 2010, at 2:15am, jdee5 wrote:
> hanks for your reply. I have read through the link you suggested, very
> helpful...if I may ask another question concerning this. Say on my
> application I have 2 users reading some of the database contents at the same
> time and they both log something in my application at the same time.
By 'log something' I assume you mean they are making changes to the same database \
they are both reading.
> For
> example say they want to both review different customer accounts and add a
> payment to the different customer accounts. Would there be a delay with
> both of those when using SQLite, if so would it be significant?
This is impossible to say because it depends on your network setup and how your \
application works, but purely as a guess, one user would see no delay at all and the \
other would see one of less than half a second.
> Can I use SQLite this way have my application stored on the server and allow
> users on a LAN/peer to peer have the ability to open my app and write to it
> at the same time?
SQLite does not care (or even know) where your application is stored. It does care \
where the file that holds the database is stored (the one you called in your '_open' \
command) and needs to deal correctly with whatever networking (p2p is fine) you are \
using. I would guess you are intending to write a Windows application so you need to \
be sure that your Windows network resource supports file locking correctly.
> does this type of multi user access often corrupt the
> database?
The page I pointed to has a section called something like 'How to corrupt your \
database'. Don't do those things. If you do manage to find a bug that hasn't been \
fixed yet (unlikely but not impossible), please tell us because the clever people \
here will pounce on it and fix it.
> If my database does become corrupt how can I repair it.
One common way is to use the sqlite3 command-line program to dump your entire \
database as one big text file full of SQL commands, then to use those commands to \
create another database. Sometimes corruption can be fixed just by remaking your \
indexes. It depends what went wrong.
As a responsible supplier you will, of course, be making sure your customer knows to \
take backups of your database occasionally.
Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic