SQL Databases SQL --> Sequel What is a database? A database is a file or set of files in which you locate information (easily and quickly) based on certain key information. Usually, the database has key fields and data fields, although SQL does blur the line a little bit here. SQL is a database standard, it is used heavily in all sorts of applications and all sorts of platforms. It is not perfect. (SQL Injection Attacks). This is when you are able to trick SQL into performing an operation that the programmer did not intend. SQL is a major deal on multiuser platforms. It regulates situations in which more than one user is inside a database at the same time. (Having a whole bunch of users inside the database is no problem at all, as long as no one starts changing anything.) On a handheld device, such as an iPhone, the understanding is that there AREN'T multiple users. The only user is the individual holding the device, and so all the levels of protection that SQL provides are simply not necessary, so the iPhone uses SQLite. Regular SQL requires an SQL that is constantly running to supervise the whole database thing, but SQLite doesn't use anything like this; it simply accesses and modifies SQL databases with the understanding that nobody else is doing this. You can make your own SQLite Databases with something called DB Browser For SQLite. This is free software; you can download it yourself. An SQL database can contain one or more related tables. Right now, we'll start with a database that has one table. A table contains a number of pieces of information (rows). Each row contains fields. A primary key is what your table is indexed on. In other words, you can look up information easily by the primary key. AutoIncrement means that in this table, if the user doesn't specify a primary key, one will be given to it automatically, by giving it a key one larger than the previous key. It usually helps if a key is unique; no two entries in the database have the same key as each other.