(upbeat music)
So if we're going to use a database in our programmes
it's important to understand what a database is.
Now a database is just an organised collection of data
that can be used to store information
on a computer or on an Android device
or accessed from a web server over the internet.
Now if you used an Android phone or tablet
and if you're watching this as part of my Android course
then you certainly will have Android itself
uses many databases to store things like
your contacts info, text messages,
and also your browser history.
Now search history on a browser is also stored in a database
which is how the Google search on your phone knows
what you've searched for previously
and can offer suggestions.
Anything that stores and retrieves information
can be called a database these days,
though, and the term database is normally used
to refer to more structured data.
Now vendors such as Microsoft, Oracle, and IBM
produce database management systems based on
a relational database.
The data is stored is rows and columns with
a row corresponding to a single record
and the columns representing the fields
that make up a record,
such as name address and data of birth
in the case of a persons record
or stock number, description, and quantity
in a stock keeping application.
So there's a huge number of database systems out there.
Probably the most well know are the
traditional databases being Microsoft SQL Server,
Oracle, and DB2 from IBM.
Now Oracle now own the Java language
after buying Sun Microsystems,
but they were originally created as a database company.
So these traditionally databases typically use Structured
Query Language, shortened to Sequel or S-Q-L,
for performing operations such as querying
and updating the data,
but there is now a growing interest in
NoSQL databases used for storing and processing Big Data.
Android includes a public domain database engine
called SQLite and Python includes support for SQLite
databases in the standard library.
Unlike our traditional database management systems,
such as SQL Server or Oracle,
SQLite is completely self contained,
it doesn't actually need a separate server to run on.
SQLite was designed to be embedded into systems
and originally missile guidance systems, in fact.
Now it uses the SQL language, which makes very easy to use.
If you already know a bit about databases
that means that you can move on to use
other SQL databases once you've learned to use SQLite.
Now SQL was developed from Edgar F. Codd's work
on relational databases in the 1970s
and became became an ANSI standard in 1986.
SQLite implements most of the features of SQL-92
and although, there have been four revisions of the standard
since SQL-92 includes everything needed
for most database tasks.
Interestingly, text messages on an iPhone
are also stored in a SQLite database.
So if you're freaking out about now at the prospect
of having to learn yet another language, don't worry.
SQL is a language, but it's nowhere
near as complicated as Java, for example.
In fact, you can do a lot of database work with only
four commands, Select, Insert, Update, and Delete.
You'll see those in
this section of the course as we work forward.
Now if you're going to be doing a lot of database work
then you will need to learn SQL more fully
then what we need here and you'll also need to learn about
things like normalisation,
but the basics that I'm gonna cover
will allow you to create programmes that can do
basic storage, update, and retrieval
of information in a database.
SQLite has been around since 2000
and it is a very fast and very stable
stand alone database.
In fact, it's the most widely deployed
database engine in the world.
It's actually close to being the most
widely deployed piece of software of any kind,
which is pretty impressive.
The examples of its use and justification for that claim
that it's the most widely deployed
database engine in the world are at
sqlite.org/mostdeployed.html.
An interesting read there if you've got the time.
You can also find out more information
about SQLite at that website.
Click the SQLite logo at the top of the page
to go to the home page
and you can just go to sqlite.org
or you can just type in sqlite.org/index.html,
either way it will get you there.
All right, so we're gonna first look at some basic database
terminology and then we're gonna move on to use
SQLite to create a database
and store some information in that database.
We need to understand things like table,
records, and fields, as well as record sets
and why they're important.
So we'll start, though, by looking at
database terminology in the next video.