Are you new to the wonderful world of databases? Confused by thesudden flood of technical jargon? Don't know the difference between a"trigger" and a "stored procedure", a "join" and a "subquery"? Look nofurther - the solution is right here!
First, though, let's start with the basics. What exactly is a database?
A database, quite simply, is a collection of data. Every database is composed of one or more "tables" - these tables, which structure data into rows and columns, are what lend organization to the data.
Here's an example of what a typical table looks like:
# "names" table
+------------+-----------+----------+
| CustomerID | FirstName | LastName |
+------------+-----------+----------+
| 234673 | John | Doe |
| 734736 | Julius | Caesar |
| 1243 | Daffy | Duck |
+------------+-----------+----------+
As you can see, a table divides data into rows, with a new entry (or
"record") on every row. If you think of a table as a filing cabinet, you'll see that every file in the cabinet corresponds to one row in the table.
The data in each row is further broken down into cells (or "fields"), each of which contains a value for a particular attribute of the data. For example, if you consider the record for the user "John Doe", you'll see that the record is clearly divided into separate fields for customer ID, and first and last names.
The rows within a table are not arranged in any particular order - they can be sorted alphabetically, by id, by member name, or by any other criteria you choose to specify. Therefore, it becomes necessary to have some method of identifying a specific record in a table. In the example above, each record is identified by a "CustomerID", which is a number unique to each row or record; this unique field is referred to as the "primary key" for that table. A table may or may not have a primary key - it's not essential - but a primary key does make it easier to locate records in a table.