[sqlite] Can i store DER encoded Certificate data in sqlite

2007-04-12 Thread samrat saha
Dear All, I am trying to store certificate related DER encoded data using sqlite database?? But what kind of datatype should i use in sqlite to store and retrive DER encoded data?? Is there anyway to store the DER encoded certificate related fileds in sqlite?? Thanks in advance.. Samrat

RE: [sqlite] Help with SQL syntax. Ticket #2296

2007-04-12 Thread Samuel R. Neff
Still, I think backwards compatibility and consistency with other databases would be most important in this situation. I just checked MSSQL and it's same as current sqlite which uses the first select statement's column names. It doesn't just affect order by too.. based on the standard SQLite

Re: [sqlite] Help with SQL syntax. Ticket #2296

2007-04-12 Thread Joe Wilson
--- [EMAIL PROTECTED] wrote: > Consider this query: > >SELECT a, b FROM t1 UNION SELECT b, a FROM t1 ORDER BY a,b; > > Is the query above equalent to: > > (1) SELECT a, b FROM t1 UNION SELECT b, a FROM t1 ORDER BY 1,2; > > Or is it the same as: > > (2) SELECT a, b FROM t1 UNION

Re: [sqlite] Help with SQL syntax. Ticket #2296

2007-04-12 Thread Dennis Cote
On 4/12/07, Samuel R. Neff <[EMAIL PROTECTED]> wrote: Wouldn't implementation dependent mean it's not really standardized? The way I read it the query could still be considered legal in some dbms and not in others (which stinks). Samuel, That's not what the standard says. It says the name

RE: [sqlite] Help with SQL syntax. Ticket #2296

2007-04-12 Thread Samuel R. Neff
Wouldn't implementation dependent mean it's not really standardized? The way I read it the query could still be considered legal in some dbms and not in others (which stinks). Besides, the current version of SQLite seems to match on the first tables names which is consistent with

Re: [sqlite] Data structure

2007-04-12 Thread Eduardo Morras
At 17:35 11/04/2007, you wrote: >Lloyd wrote: >> >>Sorry, I am not talking about the limitations of the system in our side, >>but end user who uses our software. I want the tool to be run at its >>best on a low end machine also. >>I don't want the capabilities of a data base here. Just want to

Re: [sqlite] Help with SQL syntax. Ticket #2296

2007-04-12 Thread Darren Duncan
At 7:22 PM + 4/12/07, [EMAIL PROTECTED] wrote: Consider this query: SELECT a, b FROM t1 UNION SELECT b, a FROM t1 ORDER BY a,b; Is the query above equalent to: (1) SELECT a, b FROM t1 UNION SELECT b, a FROM t1 ORDER BY 1,2; Or is it the same as: (2) SELECT a, b FROM t1

Re: [sqlite] Re: SQLite and nested transactions

2007-04-12 Thread Darren Duncan
At 9:48 AM -0600 4/12/07, Dennis Cote wrote: Yes I did assume no coupling because you didn't suggest any. If there is coupling this is just another case of the second example. While I didn't explicitly suggest coupling before, I was making my arguments on the general case where actions

Re: [sqlite] Help with SQL syntax. Ticket #2296

2007-04-12 Thread Dennis Cote
[EMAIL PROTECTED] wrote: Consider this query: SELECT a, b FROM t1 UNION SELECT b, a FROM t1 ORDER BY a,b; Is the query above equalent to: (1) SELECT a, b FROM t1 UNION SELECT b, a FROM t1 ORDER BY 1,2; Or is it the same as: (2) SELECT a, b FROM t1 UNION SELECT b, a FROM t1

Re: [sqlite] Re: SQLite and nested transactions

2007-04-12 Thread rhurst2
Gerry, I took a look at this and I don't see how it works. I believe I would have to do the following: Make TEMP copies of all of the tables that are being modified. Upon COMMIT: Delete the old tables Rename the temp tables to the old tables COMMIT I don't see an easy way to do

RE: [sqlite] Help with SQL syntax. Ticket #2296

2007-04-12 Thread Samuel R. Neff
Andy's answer and explanation is consistent with my experience and expectations too.. mostly from MSSQL and Access background. Sam --- We're Hiring! Seeking a passionate developer to join our team building products. Position is in the Washington D.C.

Re: [sqlite] Re: SQLite and nested transactions

2007-04-12 Thread rhurst2
Thanks. I'll look into this path and see if it fits. Anybody here live in the Irvine, Ca area. After the discussions on this subject I have come to the conclusion that we need somebody to implement our embedded database. Ray Gerry Snyder <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED]

Re: [sqlite] Help with SQL syntax. Ticket #2296

2007-04-12 Thread Andrew Finkenstadt
My understanding is: select a, b from t1 union select b, a from t1 is equivalent to select a as a, b as b from t1 union select b as a, a as b from t1 And therefore, the first sql statement controls the resulting column names, and the order by applies to the column names (transitively)

[sqlite] Help with SQL syntax. Ticket #2296

2007-04-12 Thread drh
Consider this query: SELECT a, b FROM t1 UNION SELECT b, a FROM t1 ORDER BY a,b; Is the query above equalent to: (1) SELECT a, b FROM t1 UNION SELECT b, a FROM t1 ORDER BY 1,2; Or is it the same as: (2) SELECT a, b FROM t1 UNION SELECT b, a FROM t1 ORDER BY 2,1; I need to know

Re: [sqlite] Null row detection when doing sqlite3_step

2007-04-12 Thread pompomJuice
Thanks. Igor Tandetnik wrote: > > pompomJuice <[EMAIL PROTECTED]> wrote: >> Basically I am looking for somthing simular to oracle's code 1403 >> where a query returned zero rows. > > If a resultset is empty, the very first call to sqlite3_step would > return SQLITE_DONE (normally it would

[sqlite] Building Test Fixture under Visual Studio 2005

2007-04-12 Thread Noah Hart
I am trying to build the test files under VS2005 I've created a new project and added all the test files with additional libraries for TCL and the sqlite3 libraries. All compiles fine, with the exception of the following errors Error 21 error C2491: 'Sqlite3_Init' : definition of

Re: [sqlite] Re: SQLite and nested transactions

2007-04-12 Thread Ken
Autonomous transactions: ie begin begin autonomous txn1 commit; commit txn1 This transaction has no impact on the outer txn. I believe it can commit either in or out of the parent transaction as well Quite a bit more complicated

Re: [sqlite] Performance analysis of SQLite statements

2007-04-12 Thread John Stanton
What do you want to measure? Jonas Sandman wrote: Anyone know a good bench-marking (preferably free or cheap) which can be used to benchmark C/C++ code in Windows? Best regards, Jonas On 4/12/07, Samuel R. Neff <[EMAIL PROTECTED]> wrote: Are there any tools to help analyze the performance

Re: [sqlite] SQLite join-mechanisms question

2007-04-12 Thread Cesar Rodas
Thank very very much That is the information that i was searching for! ;) On 12/04/07, Dennis Cote <[EMAIL PROTECTED]> wrote: Cesar Rodas wrote: > Thanks for the answer mister Hipp, but I am searching an SQL help. > I'd like > to know how is the SQLite join algorithm or where i could find

Re: [sqlite] Data structure

2007-04-12 Thread John Stanton
We use a very simple data retrieval method for smallish datasets. The data is just stored in memory or as a memory mapped file and a sequential search used. It sounds crude but when you use a fast search algorithm like Boyer-Moore it outperforms index methods up to a surprisingly large

RE: [sqlite] Data structure

2007-04-12 Thread Gauthier, Dave
valgrind -Original Message- From: Lloyd [mailto:[EMAIL PROTECTED] Sent: Thursday, April 12, 2007 12:26 AM To: [EMAIL PROTECTED] Subject: Re: [sqlite] Data structure Would anybody suggest a good tool for performance measurement (on Linux) ? On Wed, 2007-04-11 at 10:35 -0500, John

RE: [sqlite] Performance analysis of SQLite statements

2007-04-12 Thread Brandon, Nicholas \(UK\)
> > You used to be able to compile with -DVDBE_PROFILE=1 to enable some > > special assembly-language instructions that would use > hi-res timers on > > ix586 chips to provide the cycle counts needed to execute each > > instruction in a VDBE program. But I haven't used that feature in >

Re: [sqlite] Journal files not deleted.

2007-04-12 Thread P Kishor
Guilty of extending this silly thread... On 4/12/07, Noah Hart <[EMAIL PROTECTED]> wrote: Not to quibble, but to quote from wipro's website "Only Indian company to be ranked among the top 10 global outsourcing providers in IAOP's 2006 Global Outsourcing 100 listing" you are indeed

Re: [sqlite] Journal files not deleted.

2007-04-12 Thread drh
The original question was something about journal files not being deleted Nobody else has reported seeing this behavior. If you want help, you will have to give us additional information. -- D. Richard Hipp <[EMAIL PROTECTED]>

RE: [sqlite] Journal files not deleted.

2007-04-12 Thread Noah Hart
Not to quibble, but to quote from wipro's website "Only Indian company to be ranked among the top 10 global outsourcing providers in IAOP's 2006 Global Outsourcing 100 listing" NH -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, April

Re: [sqlite] SQLite join-mechanisms question

2007-04-12 Thread Dennis Cote
Cesar Rodas wrote: Thanks for the answer mister Hipp, but I am searching an SQL help. I'd like to know how is the SQLite join algorithm or where i could find it (in what ".c" file). Thank for the help! ;) Cesar, You should check out the slide show at

Re: [sqlite] Performance analysis of SQLite statements

2007-04-12 Thread Dennis Cote
Jonas Sandman wrote: Anyone know a good bench-marking (preferably free or cheap) which can be used to benchmark C/C++ code in Windows? It's not free, but AQTime http://www.automatedqa.com/products/aqtime/ from AutomatedQA is quite good and supports most compilers under windows. You can

Re: [sqlite] Re: SQLite and nested transactions

2007-04-12 Thread Dennis Cote
Darren Duncan wrote: At 3:33 PM -0600 4/11/07, Dennis Cote wrote: You have lost me here. If this transaction is considered successful without executing the middle step (which is the same as executing it and then undoing that execution) then that step does not belong in this transaction.

Re: [sqlite] Performance analysis of SQLite statements

2007-04-12 Thread Nuno Lucas
On 4/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: You used to be able to compile with -DVDBE_PROFILE=1 to enable some special assembly-language instructions that would use hi-res timers on ix586 chips to provide the cycle counts needed to execute each instruction in a VDBE program. But I

[sqlite] Looking for sqlite3_fds.h and fds.c

2007-04-12 Thread Huian Li
I have a package which uses functions like sqlite3_get_database_file_fd() and sqlite3_get_journal_file_fd(). Supposedly sqlite3_fds.h has these two functions and fds.c defines them, but I searched both sqlite-3.3.4 and sqlite-3.3.15, and could not find anything. Does anyone know where I can find

Re: [sqlite] Re: SQLite and nested transactions

2007-04-12 Thread Dennis Cote
Ken wrote: Correct me if I'm wrong on this concept: Adding nested transactions really means adding the ability to demark internally a transaction ID. So that later that transaction can be rolled back. Consider begin Main; step a savepoint

Re: [sqlite] Re: SQLite and nested transactions

2007-04-12 Thread Dennis Cote
Ramon Ribó wrote: I cannot agree here. Just imagine that the user decision is based on the imported data. Of course, you can read the data of the file, store in temporal structures on memory, ask the user and then, enter the data into the database. But the advantage of using sqlite as

[sqlite] Re: Null row detection when doing sqlite3_step

2007-04-12 Thread Igor Tandetnik
pompomJuice <[EMAIL PROTECTED]> wrote: Basically I am looking for somthing simular to oracle's code 1403 where a query returned zero rows. If a resultset is empty, the very first call to sqlite3_step would return SQLITE_DONE (normally it would be SQLITE_ROW). That's your cue. How do I know

Re: [sqlite] Null row detection when doing sqlite3_step

2007-04-12 Thread pompomJuice
Sortoff. Basically I am looking for somthing simular to oracle's code 1403 where a query returned zero rows. How do I know when step resulted in zero rows without checking each column value that the query returned. If it is so that I need to check all columns then I would like to know which of

Re: [sqlite] Re: SQLite and nested transactions

2007-04-12 Thread Ken
Dennis Cote <[EMAIL PROTECTED]> wrote: Ramon Ribó wrote: > > > Imagine one application that can import data from a file. You want > that, in case of computer crash, either all the data of the file is > imported or none. At the same time, you want the user to manually > accept or reject every

[sqlite] Re: Null row detection when doing sqlite3_step

2007-04-12 Thread Igor Tandetnik
pompomJuice <[EMAIL PROTECTED]> wrote: What is the best way to determine that sqlite3_step returned a null now? I'm not sure what you mean by sqlite3_step returning a NULL. I assume you mean it returns a row one or more columns of which contain NULL values. You can check that with

Re: [sqlite] Re: SQLite and nested transactions

2007-04-12 Thread Dennis Cote
Jef Driesen wrote: I can give you the example of an application using sqlite as the on-disk file format. As mentioned on the sqlite website [1], the traditional File/Open operation does an sqlite3_open() and executes a BEGIN TRANSACTION. File/Save does a COMMIT followed by another BEGIN

[sqlite] Null row detection when doing sqlite3_step

2007-04-12 Thread pompomJuice
Hello. What is the best way to determine that sqlite3_step returned a null now? At the moment the only way I see is checking each select column with sqlite3_column_bytes and setting the row ato null id all of those calls return 0. Is there maybe a better way? I can't seem to find such an

Re: [sqlite] SQLite join-mechanisms question

2007-04-12 Thread Cesar Rodas
On 12/04/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: "Cesar Rodas" <[EMAIL PROTECTED]> wrote: > Hello. > > I have a question about SQLite join-mechanisms. Let me explain with an > example. > > I have the follow table. > CREATE TABLE a( >word_id INTEGER, >doc_id INTEGER > ); > >

Re: [sqlite] Data structure

2007-04-12 Thread Ken
You might want to check out kazlib for your data structure lookups. It cantains code to implement Linked List, Hast, and Dictionary access data structures. The hashing code is really quite fast for in memory retrievals plus it is dynamic so that you don't have to preconfigure your

Re: [sqlite] Data structure

2007-04-12 Thread Ken
I've used callgrind to get a hierachy of calls, it's good to graphically see where your spending time at in the code. Also you might want to check out oprofile. Its more of a system based profiler. And if you want to spend $$$ Rational Rose (I thinkt its an IBM product now) Purify

Re: [sqlite] SQLite join-mechanisms question

2007-04-12 Thread drh
"Cesar Rodas" <[EMAIL PROTECTED]> wrote: > Hello. > > I have a question about SQLite join-mechanisms. Let me explain with an > example. > > I have the follow table. > CREATE TABLE a( >word_id INTEGER, >doc_id INTEGER > ); > > CREATE INDEX "a_index1" ON "a"( > "doc_id" ASC > ); > >

Re: [sqlite] SQLite join-mechanisms question

2007-04-12 Thread Cesar Rodas
I want to know SQLite join algorithm On 12/04/07, P Kishor <[EMAIL PROTECTED]> wrote: On 4/12/07, Cesar Rodas <[EMAIL PROTECTED]> wrote: > Hello. > > I have a question about SQLite join-mechanisms. Let me explain with an > example. > > I have the follow table. > CREATE TABLE a( >word_id

Re: [sqlite] Performance analysis of SQLite statements

2007-04-12 Thread Jonas Sandman
Anyone know a good bench-marking (preferably free or cheap) which can be used to benchmark C/C++ code in Windows? Best regards, Jonas On 4/12/07, Samuel R. Neff <[EMAIL PROTECTED]> wrote: Are there any tools to help analyze the performance of components with a particular SQLite statement?

Re: [sqlite] SQLite join-mechanisms question

2007-04-12 Thread P Kishor
On 4/12/07, Cesar Rodas <[EMAIL PROTECTED]> wrote: Hello. I have a question about SQLite join-mechanisms. Let me explain with an example. I have the follow table. CREATE TABLE a( word_id INTEGER, doc_id INTEGER ); CREATE INDEX "a_index1" ON "a"( "doc_id" ASC ); CREATE INDEX "a_index"

[sqlite] SQLite join-mechanisms question

2007-04-12 Thread Cesar Rodas
Hello. I have a question about SQLite join-mechanisms. Let me explain with an example. I have the follow table. CREATE TABLE a( word_id INTEGER, doc_id INTEGER ); CREATE INDEX "a_index1" ON "a"( "doc_id" ASC ); CREATE INDEX "a_index" ON a ( "word_id" DESC ); And how can SQLite do an

[sqlite] Performance analysis of SQLite statements

2007-04-12 Thread Samuel R. Neff
Are there any tools to help analyze the performance of components with a particular SQLite statement? I'm aware of the EXPLAIN option which can show what VBDE code was used to execute a statement, but afaik there is no way to tell the time each step took. Basically I want to know how long the

[sqlite] Re: Encoding confusion

2007-04-12 Thread Igor Tandetnik
Anders Persson <[EMAIL PROTECTED]> wrote: What is confusing me is how are the string stored, if i understand corrent it is UTF-8 is this done automatic and what coding is a get back when a extra data ? SQLite database may store string data in UTF-8, UTF-16le or UTF-16be encodings. The

Re: [sqlite] Re: SQLite and nested transactions

2007-04-12 Thread Ramon Ribó
Dennis, I cannot agree here. Just imagine that the user decision is based on the imported data. Of course, you can read the data of the file, store in temporal structures on memory, ask the user and then, enter the data into the database. But the advantage of using sqlite as storage

[sqlite] Encoding confusion

2007-04-12 Thread Anders Persson
Hi! I am using SQLITE to save webbased data, under Unix, linux, osx the program is written i C, and uses the C-interface. What is confusing me is how are the string stored, if i understand corrent it is UTF-8 is this done automatic and what coding is a get back when a extra data ? Stupid

[sqlite] Re: SQLite and nested transactions

2007-04-12 Thread Jef Driesen
Dennis Cote wrote: [EMAIL PROTECTED] wrote: It appears that my requirements are to be able to do the following: BEGIN parent; insert into t values ('a'); BEGIN child; insert into t values ('b'); insert into t values ('c'); ROLLBACK child; // child aborts insert