Grupo,
Estoy trabajando con SQLITE, y estoy haciendo este tipo de pruebas:
1. Estoy insertando 10000 registros en la tabla CUSTOMER
2. Al mismo tiempo estoy leyendo la tabla CUSTOMER, al mismo tiempo que se están insertando los 10000 regustros.
PROBLEMA: Cuando se ejecuta el SELEC Cusmter_id, Customer_Name from CUSTOMER me manda un error diciendome que "DATABASE IS LOCKED", y según he leído SQLITE la pueden leer varios usuario, PERO solo UNO la actualiza y es precisamente lo que estoy tratando de simular con mi ejemplo, sin embargo y a pesar de que solo un usuario esta insertando y otro leyendo, me da el error al tratar de leer la tabla
PREGUNTA: ¿Alguien ha trabajado con SQLITE?,
Por favor si alguien lo ha hecho, mande un correo para indicarme qué estoy haciendo mal,
De antemano agradezco la ayuda
SELECT en SQLite
Moderator: Rathinagiri
-
- Posts: 174
- Joined: Mon May 19, 2014 7:43 pm
- DBs Used: DBF, SQLite, MS-SQL, ACCESS, MariaDB (en proceso)
- Location: Morelia, Mich. México
- Contact:
SELECT en SQLite
Cordialmente
POSADAS SOFTWARE
Jorge Posadas Ch.
Programador independiente
Morelia, Mich.
M é x i c o .
Movil +52 44 3734 1858
SKYPE: jorge.posadasch
Email: posoft@gmx.com
POSADAS SOFTWARE
Jorge Posadas Ch.
Programador independiente
Morelia, Mich.
M é x i c o .
Movil +52 44 3734 1858
SKYPE: jorge.posadasch
Email: posoft@gmx.com
- mustafa
- Posts: 1160
- Joined: Fri Mar 20, 2009 11:38 am
- DBs Used: DBF
- Location: Alicante - Spain
- Contact:
Re: SELECT en SQLite
Hola jorge.posadas
El amigo Rathinagiri es el experto en temas de Sqlite
te mando estas entradas haber si te pueden servir
http://hmgforum.com/viewtopic.php?f=15& ... lit=sqlite
http://hmgforum.com/viewtopic.php?f=9&t ... ite#p44206
http://hmgforum.com/viewtopic.php?f=37& ... ite#p28208
http://hmgforum.com/viewtopic.php?f=6&t ... ite#p12091
http://hmgforum.com/viewtopic.php?f=5&t ... ite#p32642
http://hmgforum.com/viewtopic.php?f=40& ... ite#p40397
saludos
Mustafa
El amigo Rathinagiri es el experto en temas de Sqlite
te mando estas entradas haber si te pueden servir
http://hmgforum.com/viewtopic.php?f=15& ... lit=sqlite
http://hmgforum.com/viewtopic.php?f=9&t ... ite#p44206
http://hmgforum.com/viewtopic.php?f=37& ... ite#p28208
http://hmgforum.com/viewtopic.php?f=6&t ... ite#p12091
http://hmgforum.com/viewtopic.php?f=5&t ... ite#p32642
http://hmgforum.com/viewtopic.php?f=40& ... ite#p40397
saludos
Mustafa
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: SELECT en SQLite
Hi,
How do you do your insert?
Within a 'begin' and 'end' transaction?
Further, SQLite is a file based database. We can do multiple select at the same time. But write only once even though we may want to write in different tables. It doesn't have any table level or record level locks. It is a database level lock. So, when you are writing on the database, you can not read.
If you really want to have multi-user system with high concurrency, you can opt for MariaDB/MySQL anyway.
For your kind information, this is an extract from the SQLite documentation.
How do you do your insert?
Within a 'begin' and 'end' transaction?
Further, SQLite is a file based database. We can do multiple select at the same time. But write only once even though we may want to write in different tables. It doesn't have any table level or record level locks. It is a database level lock. So, when you are writing on the database, you can not read.
If you really want to have multi-user system with high concurrency, you can opt for MariaDB/MySQL anyway.
For your kind information, this is an extract from the SQLite documentation.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
-
- Posts: 174
- Joined: Mon May 19, 2014 7:43 pm
- DBs Used: DBF, SQLite, MS-SQL, ACCESS, MariaDB (en proceso)
- Location: Morelia, Mich. México
- Contact:
Re: SELECT en SQLite
Mustafa y Rathinagiri
Agradezco su respuestas y con eso me ha quedado claro que NO se puede usar un SELECT al mismo tiempo que un INSERT, UPDATE, DELETE.
Por lo que ya estoy trabajando en :
1.- Prohibir conflictos al intentar manipular la base de datos tanto para INSERT, DELETE, UPDATE, SELECT
2.- Implementar que no se pueda actualizar al mismo registro.
Estoy consciente y extremadamente consciente que SQLITE no es multiusuario sin embargo con algunas pruebas he logrado inhibir accesos simultáneos a la base de datos, en el evento de INSERT (probaré con UPDATE Y DELETE), después de eso estaré trabajando en evitar que se edite el mismo registro.
Estoy haciendo esto ya que hace mucho tiempo deje usar DBF y por otro lado varios clientes (como suele suceder) no quieren o no tiene la capacidad económica como para invertir en la compra de un servidor, ni tampoco en licencias, etc. etc.
Y por otro lado SQLITE no necesita de mantenimiento como lo requiere un SQL SERVER o MySQL o MariaDB u otras bases de datos similares.
Espero tener este sistema para compartirlo con ustedes.
Y Agradezco la ayuda y sugerencias
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TRADUCCION DIRECTA CON GOOGLE TRANSLATOR:
I appreciate your answers and that it's clear that you can not use a SELECT while an INSERT, UPDATE, DELETE.
So I'm working on:
1. Prohibit conflicts when trying to manipulate the database for both INSERT, DELETE, UPDATE, SELECT
2. Implement that it can not update the same record.
I am aware and acutely aware that SQLITE is not multiuser however some tests have achieved inhibit simultaneous access to the database in the event INSERT (I try to UPDATE and DELETE), after that I will be working to prevent edit the same record.
I'm doing this as long stop using DBF and on the other hand several clients (as often happens) do not want or do not have the financial capacity to invest in buying a server, or in licensing, etc. etc.
And on the other side SQLITE not need maintenance as required by a SQL Server or MySQL or MariaDB or other similar databases.
I hope to have this system to share with you.
And I appreciate the help and suggestions
Agradezco su respuestas y con eso me ha quedado claro que NO se puede usar un SELECT al mismo tiempo que un INSERT, UPDATE, DELETE.
Por lo que ya estoy trabajando en :
1.- Prohibir conflictos al intentar manipular la base de datos tanto para INSERT, DELETE, UPDATE, SELECT
2.- Implementar que no se pueda actualizar al mismo registro.
Estoy consciente y extremadamente consciente que SQLITE no es multiusuario sin embargo con algunas pruebas he logrado inhibir accesos simultáneos a la base de datos, en el evento de INSERT (probaré con UPDATE Y DELETE), después de eso estaré trabajando en evitar que se edite el mismo registro.
Estoy haciendo esto ya que hace mucho tiempo deje usar DBF y por otro lado varios clientes (como suele suceder) no quieren o no tiene la capacidad económica como para invertir en la compra de un servidor, ni tampoco en licencias, etc. etc.
Y por otro lado SQLITE no necesita de mantenimiento como lo requiere un SQL SERVER o MySQL o MariaDB u otras bases de datos similares.
Espero tener este sistema para compartirlo con ustedes.
Y Agradezco la ayuda y sugerencias
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TRADUCCION DIRECTA CON GOOGLE TRANSLATOR:
I appreciate your answers and that it's clear that you can not use a SELECT while an INSERT, UPDATE, DELETE.
So I'm working on:
1. Prohibit conflicts when trying to manipulate the database for both INSERT, DELETE, UPDATE, SELECT
2. Implement that it can not update the same record.
I am aware and acutely aware that SQLITE is not multiuser however some tests have achieved inhibit simultaneous access to the database in the event INSERT (I try to UPDATE and DELETE), after that I will be working to prevent edit the same record.
I'm doing this as long stop using DBF and on the other hand several clients (as often happens) do not want or do not have the financial capacity to invest in buying a server, or in licensing, etc. etc.
And on the other side SQLITE not need maintenance as required by a SQL Server or MySQL or MariaDB or other similar databases.
I hope to have this system to share with you.
And I appreciate the help and suggestions
Cordialmente
POSADAS SOFTWARE
Jorge Posadas Ch.
Programador independiente
Morelia, Mich.
M é x i c o .
Movil +52 44 3734 1858
SKYPE: jorge.posadasch
Email: posoft@gmx.com
POSADAS SOFTWARE
Jorge Posadas Ch.
Programador independiente
Morelia, Mich.
M é x i c o .
Movil +52 44 3734 1858
SKYPE: jorge.posadasch
Email: posoft@gmx.com
- dragancesu
- Posts: 921
- Joined: Mon Jun 24, 2013 11:53 am
- DBs Used: DBF, MySQL, Oracle
- Location: Subotica, Serbia
Re: SELECT en SQLite
SQLite is an easy way to move to SQL not perfect
If possible send the code to a real problem, like our theorizing that (like you) without much success
If possible send the code to a real problem, like our theorizing that (like you) without much success