My First SQLite Project

You can share your experience with HMG. Share with some screenshots/project details so that others will also be benefited.

Moderator: Rathinagiri

User avatar
swapan
Posts: 242
Joined: Mon Mar 16, 2009 4:23 am
Location: Kolkata, India
Contact:

Re: My First SQLite Project

Post by swapan » Wed Sep 16, 2009 7:29 am

Its so good to see so much inputs in this thread. This helps us in our decision making for back ends.

Sudip, I've got the time just to run your project. Its running without any error(s), and for multi-user just executed the exe twice simulataneously in a single computer accessing the same database - its working. But on a network, how it will work - the way we use our dbfs or the way MSSQL works. It doesn't contains any connection string etc., so seems that have to put the database in the server and make that folder shared to all the users - security will be less then.

Also we will need one Query Analyzer kind of tool to maintain the SQLite database as DBA operations will be very much needed. But yes, lets first explore the possiblity of SQLite for our applications and if its gives +ve results then we can go for a tool to maintain SQLite database.

Regards,

Swapan

[PS:BTW, MOL you are looking great in your new avtaar!]




mol wrote:Is it possible to get table sorted with native characters?
Thanks & Regards,
Swapan Das

http://www.swapandas.com/

User avatar
swapan
Posts: 242
Joined: Mon Mar 16, 2009 4:23 am
Location: Kolkata, India
Contact:

Post by swapan » Wed Sep 16, 2009 8:56 am

Dear Sudip:

I must thank you for introducing me to SQLite! Yes, indeed I would love to have one open source database that can atleast work like Access - all the tables embeded into one single database and not "open to all" like our dbfs.

Rgds,

Swapan
Thanks & Regards,
Swapan Das

http://www.swapandas.com/

User avatar
Rathinagiri
Posts: 5263
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 169 times
Been thanked: 172 times
Contact:

Post by Rathinagiri » Wed Sep 16, 2009 10:21 am

FYI, Mozilla Firefox is utilizing SQLite for its bookmarks, history, saving of passwords and other internal variables. :)
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

User avatar
sudip
Posts: 1446
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India
Has thanked: 5 times
Been thanked: 1 time

Post by sudip » Wed Sep 16, 2009 12:30 pm

Hello Friends,

Here is some well known users of SQLite http://www.sqlite.org/famous.html

For SQLite browser you may use http://sourceforge.net/projects/sqlitebrowser/

Mol, I am thinking about more advanced project. I was trying to port Roberto's MiniSql to Sqlite, but still unsolved :(

Swapan, for network access, database may be stored in a shared folder. As per it's site (http://www.sqlite.org), Sqlite is not a Client/Server database. For, locking, it depends on O/S. Sqlite is not a client, it's a server by itself :)

I heard about Sqlite from Rathi. And, saw various posts in different technical groups related to Harbour and xHarbour http://groups.google.com/group/comp.lan ... 8b3a906b4d.

Rathi, is there any way to add login facility with Sqlite?

I am very happy, many friends are interested about this humble project. :)

With best regards.

Sudip
Last edited by sudip on Wed Sep 16, 2009 3:44 pm, edited 1 time in total.
With best regards,
Sudip

User avatar
sudip
Posts: 1446
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India
Has thanked: 5 times
Been thanked: 1 time

Post by sudip » Wed Sep 16, 2009 2:01 pm

Hello Friends,

I added "Pack" facility in the project.

In Sqlite VACUUM command is equivalent to PACK command :), which is used to compress database.

Please download and compile.
SQLite.zip
(9.29 KiB) Downloaded 321 times
I used some codes from Harbour contribution.

With best regards.

Sudip
With best regards,
Sudip

User avatar
mol
Posts: 3214
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 222 times
Been thanked: 123 times
Contact:

Post by mol » Thu Sep 17, 2009 6:05 am

Returning to native characters in database:
Have you seen any routine to sort table regarding international characters? maybe UTF-8 character set?

User avatar
Rathinagiri
Posts: 5263
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 169 times
Been thanked: 172 times
Contact:

Post by Rathinagiri » Thu Sep 17, 2009 8:02 am

I think SQLite supports up to UTF-32. But HMG? It is one of our dreams to have Unicode enabled HMG.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

User avatar
sudip
Posts: 1446
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India
Has thanked: 5 times
Been thanked: 1 time

Post by sudip » Thu Sep 17, 2009 10:59 am

rathinagiri wrote:I think SQLite supports up to UTF-32. But HMG? It is one of our dreams to have Unicode enabled HMG.
Hello, may be this documentation will be helpful (http://www.sqlite.org/faq.html#q18)
Case-insensitive matching of Unicode characters does not work.

The default configuration of SQLite only supports case-insensitive comparisons of ASCII characters. The reason for this is that doing full Unicode case-insensitive comparisons and case conversions requires tables and logic that would nearly double the size of the SQLite library. The SQLite developers reason that any application that needs full Unicode case support probably already has the necessary tables and functions and so SQLite should not take up space to duplicate this ability.

Instead of providing full Unicode case support by default, SQLite provides the ability to link against external Unicode comparison and conversion routines. The application can overload the built-in NOCASE collating sequence (using sqlite3_create_collation()) and the built-in like(), upper(), and lower() functions (using sqlite3_create_function()). The SQLite source code includes an "ICU" extension that does these overloads. Or, developers can write their own overloads based on their own Unicode-aware comparison routines already contained within their project.
With best regards.
Sudip
With best regards,
Sudip

User avatar
esgici
Posts: 4513
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 389 times
Been thanked: 111 times
Contact:

Post by esgici » Thu Sep 17, 2009 12:05 pm

Hi All

Well, the star of SQLite is ascending quickly :)

There is any opinion about its limits :?:

Every light product have same (generally undocumented) limits for forcing user to purchase the non-light version.

Do you really want to confront your customer with expose to reach any of that limits ?

Regards

--

Esgici
Viva INTERNATIONAL HMG :D

User avatar
gfilatov
Posts: 656
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Has thanked: 24 times
Been thanked: 227 times
Contact:

Post by gfilatov » Thu Sep 17, 2009 12:55 pm

esgici wrote:Hi All

...
There is any opinion about its limits :?:

...
Hello Esgici,

Please take a look for the following description:
About SQLite

SQLite is a in-process library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. The code for SQLite is in the public domain and is thus free for use for any purpose, commercial or private. SQLite is currently found in more applications than we can count, including several high-profile projects.

SQLite is an embedded SQL database engine. Unlike most other SQL databases, SQLite does not have a separate server process. SQLite reads and writes directly to ordinary disk files. A complete SQL database with multiple tables, indices, triggers, and views, is contained in a single disk file. The database file format is cross-platform - you can freely copy a database between 32-bit and 64-bit systems or between big-endian and little-endian architectures. These features make SQLite a popular choice as an Application File Format. Think of SQLite not as a replacement for Oracle but as a replacement for fopen()

SQLite is a compact library. With all features enabled, the library size can be less than 300KB, depending on compiler optimization settings. (Some compiler optimizations such as aggressive function inlining and loop unrolling can cause the object code to be much larger.) If optional features are omitted, the size of the SQLite library can be reduced below 180KB. SQLite can also be made to run in minimal stack space (16KB) and very little heap (100KB), making SQLite a popular database engine choice on memory constrained gadgets such as cellphones, PDAs, and MP3 players. There is a tradeoff between memory usage and speed. SQLite generally runs faster the more memory you give it. Nevertheless, performance is usually quite good even in low-memory environments.

SQLite is very carefully tested prior to every release and has a reputation for being very reliable. Most of the SQLite source code is devoted purely to testing and verification. An automated test suite runs millions of tests involving hundreds of millions of individual SQL statements and achieves over 99% statement coverage. SQLite responds gracefully to memory allocation failures and disk I/O errors. Transactions are ACID even if interrupted by system crashes or power failures. All of this is verified by the automated tests using special test harnesses which simulate system failures. Of course, even with all this testing, there are still bugs. But unlike some similar projects (especially commercial competitors) SQLite is open and honest about all bugs and provides bugs lists including lists of critical bugs and minute-by-minute chronologies of bug reports and code changes.

The SQLite code base is supported by an international team of developers who work on SQLite full-time. The developers continue to expand the capabilities of SQLite and enhance its reliability and performance while maintaining backwards compatibility with the published interface spec, SQL syntax, and database file format. The source code is absolutely free to anybody who wants it, but professional support services are also available.

We the developers hope that you find SQLite useful and we charge you to use it well: to make good and beautiful products that are fast, reliable, and simple to use. Seek forgiveness for yourself as you forgive others. And just as you have received SQLite for free, so also freely give, paying the debt forward.
I hope that give you an idea :idea:
Kind Regards,
Grigory Filatov

"Everything should be made as simple as possible, but no simpler." Albert Einstein

Post Reply