Archive for the 'data base basics' Category

More DB basics

Friday, November 14th, 2008

OK let’s take a step back. The first thing to do it to check out the db admin page. To check it out go to

The uname = “learners”
The pw = “qwertyu”

Check it out.

More DB Basics

Thursday, November 6th, 2008

Previously I wrote -

what I use database’s for:

1. Gather data

2. Store data

3. Relate data

4. Retrieve data

Lets start with gathering data. To interact with the database there is a language called SQL, it’s pronounced see-quill.

The first sql command we will learn about is the “select”. The way the select command works is
select fields from tables where field = value

Now we will try it on an actual database.

The basic point of a database

Sunday, November 2nd, 2008

So now that I’ve gone over what a database is, it’s time to take a step back and explain why anyone would even want to use a database.

Here’s what I use database’s for:

1. Gather data

2. Store data

3. Relate data

4. Retrieve data

Most database systems provide these four things.  They usually have good programs for each.  Most database’s are judged based on how well the programs that gather, store, relate, and retrieve data.  I think it’s wrong to judge a db based on how well the interface programs work.  I think databases should be judged based on how fast they can store data and how fast they can retrieve data.  But whatever.

All of the functions above are accomplished with a language called SQL.  Most people like using programs that make SQL from a UI.

Next we will go over some SQL basics.

More DB Definitions

Wednesday, October 29th, 2008

Database Field – A database field (also known as a data base column) is a set of data values of a particular simple type, one for each row of the table.  (wikipedia)

Database Row – A database row (also known as a record or a tuple) a single piece of data – a row of data or a single record.  

Database Table – A database table is a set of data elements set up in fields and rows.

For example a database table could be called users.  The user table could have three fields (name, phone, and email) and two rows.  It could be shown like:

Name, Phone,email




Fields: Name, Phone, email

Row1: Marty,555-555-5555,

Row2: Melissa,555-555-5555,

One last definition…

Primary Key – A database primary key (unique key) is a field that is used to uniquely identify a row.


So the table could be something like this:

Fields: ID, Name, Phone, Email



The idea is that the ID is a primary key.  The primary key must be unique so each record can be uniquely identified.  So I can say, give me the first name from the record with the ID equal to 2 and I will get Melissa back. 

Lesson 1: Basic Definitions

Sunday, October 19th, 2008

Database Defined:

A Computer Database is a structured collection of records or data that is stored in a computer system. (wikipedia)

Database model:

A database model is a theory or specification describing how a database is structured and used. (wikipedia)


Something that describes how something is going to work.

Relational Database:

The relational model for database management is a database model based on first-order predicate logic, first formulated and proposed in 1969 by Edgar Code.

OK so that definition is useless, so lets dig in.

Predicate Defined:

A feature that allows you to assign an attribute to something.  For example if you say that is a red car you are saying that the car has the attribute of red.

Predicate Logic Defined:

The generic term for symbolic formal systems. (Wikipedia)

Formal Systems:

A formal language together with a deductive system (also called a deductive apparatus) which consists of a set of inference rules and/or axioms.  (Wikipedia)

I think this is basically a system that describes something really complicated.  Something with it’s own words and its own actions.  

What is meant by first order:

This means that there is an abstract (something in your brain) way to relate things togethor. 

First-order predicate logic:

My simplistic view is that for a DB this describes a way to relate abstracting things togethor.

Sum up:

A relational database is a program that has all of the things that Edgar Code described (specified) in 1969.  He described a language, actions, and a way to relate one thing to another.  The goal of any database is to provide a way to organize, insert, and retrieve data.  A relational database also specifies how to relate pieces of data togethor.



I’m going to teach my kids about databases

Sunday, October 19th, 2008

I think the modern relational database concepts are:

1. Interesting

2. Useful

3. Fun

So I am going to teach the kids about them.  I am going to use this blog – category as a place to prepare my lessons.