Igor Delovski Board Forum Index Igor Delovski Board
My Own Personal Slashdot!
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

SQLite

 
Post new topic   Reply to topic    Igor Delovski Board Forum Index -> Mac Cocoa
Mac Cocoa  
Author Message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3136
Location: Europe

PostPosted: Fri May 22, 2009 2:42 pm    Post subject: SQLite Reply with quote

dBlog - iPhone SDK Tutorial: Reading data from a SQLite Database

"I see many people asking for SQLite tutorials around, and since I am using
SQLite for the next part in the Advanced RSS Reader Tutorial, I thought
I would write up a quick tutorial on using SQLite with the iPhone SDK."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Sat May 30, 2009 10:43 pm    Post subject: Reply with quote

sqlite.org - How SQLite Is Tested

"There are three independent test harnesses used for testing the core SQLite
library. Each test harness is designed, maintained, and managed separately
from the others."
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3136
Location: Europe

PostPosted: Sun May 31, 2009 8:25 pm    Post subject: Reply with quote

Shannon Appelcline - A Database Development Gotcha

"On page 305 [of iPhone in Action], we say "Once you've linked in your data-
base the first time [by adding it to your project], you can go back and make
changes to it, and the new version will always be used when you recompile
your project." And that's true ... to a certain extent."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Fri Jun 19, 2009 11:52 pm    Post subject: Reply with quote

so - iPhone create SQLite database at runtime?

"Open the file as usual using sqlite3_open(). Run your creation commands
(i.e., create your tables, views, etc.)"
Back to top
View user's profile Send private message Visit poster's website
XNote
Kapetan


Joined: 16 Jun 2006
Posts: 532

PostPosted: Wed Jul 08, 2009 5:11 pm    Post subject: Reply with quote

jainmarket - iPhone SDK Tutorial: Reading data from a SQLite Database

"I see many people asking for SQLite tutorials around, and since I am using
SQLite for the next part in the Advanced RSS Reader Tutorial, I thought I
would write up a quick tutorial on using SQLite with the iPhone SDK."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Fri Jul 17, 2009 12:28 pm    Post subject: Reply with quote

MF - Gah, how do you go about designing databases?

"Some advice I would offer is to learn about normalisation and attempt to
achieve as many normal forms as possible but always be prepared to de-
normalise where necessary. Don't pursue perfection because it doesn't
exist, except in training courses..."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Mon Nov 16, 2009 10:43 pm    Post subject: Reply with quote

iphonedevsdk.com - SQLite, inserts and reading back UTF8 characters
properly


"I'm having some issues inserting and reading back UTF8 special characters
from SQlite..."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Tue Mar 02, 2010 6:48 pm    Post subject: Reply with quote

iPhone SDK Articles - SQLite Tutorial - Saving images in the database

"Using BLOB data type we can store an image in the SQLite database. The
data that actually gets stored in the database is the bytes that make up an
image or a file. The is the sixth tutorial in SQLite tutorial series and borrows
its source code from the previous one."
Back to top
View user's profile Send private message Visit poster's website
XNote
Kapetan


Joined: 16 Jun 2006
Posts: 532

PostPosted: Thu Jun 24, 2010 6:24 pm    Post subject: Reply with quote

sqlite.org - Scrolling Cursor

"There is no sqlite3_step_backwards() function in SQLite. It is normal-
ly at this point in the reasoning process that the programmer gets on the
mailing list asking for how to 'scroll backwards'.

Do not leave queries open waiting for the user input. Run a query to fill
up the screen with as much information as it will hold then reset() or fina-
lize() the query statment. Get in, grab your data, then get out. Later on,
when the user decides to scroll up or down (which will usually be eons of
time later from the point of view of your CPU), run another query to re-
fresh the screen with new data."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Fri Jun 25, 2010 9:07 pm    Post subject: Reply with quote

so - Using backticks around field names

"Lastly, it allows you to use whatever field name you wish when design-
ing your table. Sometimes it makes a lot of sense to name a field `key`,
`order`, or `values`... all of which require backticks when referring to
them."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Mon Jun 28, 2010 5:11 pm    Post subject: Reply with quote

sqlite.org - Opening A New Database Connection

"Whether or not an error occurs when it is opened, resources associated
with the database connection handle should be released by passing it to
sqlite3_close() when it is no longer required.

The sqlite3_open_v2() interface works like sqlite3_open() except that it
accepts two additional parameters for additional control over the new
database connection. The flags parameter to sqlite3_open_v2() can take
one of the following three values...
    * SQLITE_OPEN_READONLY
    * SQLITE_OPEN_READWRITE
    * SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE

If the filename is ":memory:", then a private, temporary in-memory
database is created for the connection."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Thu Oct 07, 2010 7:06 pm    Post subject: Reply with quote

PostgreSQL connection

"I was able to compile libpq for the iPhone using arm6 processor

I used the following ./configure command..."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Tue Mar 22, 2011 2:05 pm    Post subject: Reply with quote

MF - Efficient table views using SQLite

"Only the promary key is indexed by default - if you want to index anything
else you will have to tell the DB about it when you first create the table."
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3136
Location: Europe

PostPosted: Fri May 06, 2011 3:05 pm    Post subject: Reply with quote

ccgus / fmdb

This is an Objective-C wrapper around SQLite: http://sqlite.org/
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Fri May 06, 2011 11:55 pm    Post subject: Reply with quote

sqlite.org - 1.0 File Locking And Concurrency In SQLite Version 3

"Locking and concurrency control are handled by the pager module. The
pager module is responsible for making SQLite "ACID" (Atomic, Consistent,
Isolated, and Durable). The pager module makes sure changes happen all
at once, that either all changes occur or none of them do, that two or more
processes do not try to access the database in incompatible ways at the
same time, and that once changes have been written they persist until
explicitly deleted."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Tue Jun 14, 2011 5:04 pm    Post subject: Reply with quote

karnakgames.com - Painless iOS content apps with SQLite ActiveRecord

"Active Record is a pattern to model applications following an object-relatio-
nal mapping which means you’ll have a “virtual object database”: each data-
base table is represented as a class and each table registry is an instance of
its table class. In your application you won’t make direct calls to SQLite fun-
ctions nor write SQL queries everywhere."
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3136
Location: Europe

PostPosted: Mon Jul 16, 2012 1:52 am    Post subject: Reply with quote

"Another side effect of a dynamic database is table fragmentation. The pages
containing the data of an individual table can become spread over the data-
base file, requiring longer for it to load. This can appreciably slow database
speed because of file system behavior. Compacting fixes both of these pro-
blems.

... The easiest way to remove empty pages is to use the SQLite command
VACUUM. This can be done from within SQLite library calls or the sqlite utility.

How many free pages there are in a database can be determined at runtime
using the function sqlite_count_free_pages()..."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Wed Jul 18, 2012 5:52 pm    Post subject: Reply with quote

so -ADD COLUMN to sqlite db IF NOT EXISTS - flex/air sqlite?

"ALTER TABLE tbl_status ADD COLUMN status_default TEXT;

http://www.sqlite.org/lang_altertable.html

That being said, adding columns in SQLite is limited. You cannot add a
column anywhere but after the last column in your table."


Related: sqlite3odbc.c

Code:
sql = sqlite3_mprintf("PRAGMA table_info('%q')", s->dyncols[i].table);
if (sql)  {
   ret = sqlite3_get_table(sqlite, sql, &rowp, &nrows, &ncols, NULL);
   sqlite3_free(sql);
}
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3136
Location: Europe

PostPosted: Thu Dec 04, 2014 10:11 pm    Post subject: Reply with quote

blog.jooq.org - Do You Really Understand SQL’s GROUP BY and HAVING clauses?

"There are some things in SQL that we simply take for granted without
thinking about them properly.

One of these things are the GROUP BY and the less popular HAVING
clauses. Let’s look at a simple example. For this example, we’ll reiterate
the example database we’ve seen in this previous article about the awe-
some LEAD(), LAG(), FIRST_VALUE(), LAST_VALUE() functions"
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3136
Location: Europe

PostPosted: Fri Jan 08, 2016 9:28 am    Post subject: Reply with quote

Five reasons you should use SQLite in 2016

"SQLite is easy to manage -- it's a single file. The file format is stable across
major versions, so if I had a SQLite database file from version 3.0.0 (back in
2004), I could read it using the latest SQLite 3.10.0."
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3136
Location: Europe

PostPosted: Thu Aug 27, 2020 6:43 pm    Post subject: Reply with quote

git - OHMySQL

"The library supports Objective-C and Swift, iOS and macOS. You can connect to
your remote MySQL database using OHMySQL API. It allows you doing queries
in easy and object-oriented way. Common queries such as SELECT, INSERT,
DELETE, JOIN are wrapped by Objective-C code and you don't need to dive into
MySQL C API."


git - mysql-ios

"This repo is a convenience project for building mysql for iOS (in particular
mysqlclient). It contains the mysql source at version 8.0.12 and generated
or modified XCode project for building mysqlclient for iOS."
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3136
Location: Europe

PostPosted: Mon Nov 27, 2023 7:12 pm    Post subject: Reply with quote

wiki.tnonline.net - SQLite Performance on Btrfs

"By using Write-Ahead Logging we can gain a 300% performance boost,
compared to about 25-30% increase using the nocow attribute!."
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3136
Location: Europe

PostPosted: Sun Dec 03, 2023 11:49 am    Post subject: Reply with quote

Valentina - SQLite Server - Valentina 13

"Serve stunningly visual reports from all major data sources.

Reports Server + SQLite Server + Forms Server + object-relational SQL
Valentina DB Server. Windows, macOS & Linux on x86 & ARM64."
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Igor Delovski Board Forum Index -> Mac Cocoa All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Delovski.hr
Powered by php-B.B. © 2001, 2005 php-B.B. Group