Database Building

28 02 2008

Database Structures

R.D.M.S. = Relational Database Management Systems

(can access relational info from various tables)

D.B.2 = Big, expensive
ORACLE = Big, expensive
SQllite = free
mySQL = free = what we’re using

SQL = Structrured Query Language

SQL = Language used to ask questions

ORACLE/mySQL etc. translates info slightly different.

SQL Command to create database is

Create Database (andrea_database )

Column = Field
Row = Record

Field names cannot have spaces.

Every Record in a Db has to be completely unique.

Must have a mechanism to make sure Db records are unique.
(accession number)

Most common DATA TYPES:

PRIMARY KEY: generates unique # for records.

End of primary key # should always be ID therefore you always know what the primary key # is.

Primary Key type is almost always INT (integer/whole number).

VARCHAR = Variable Character Length = allows you to keep the size of memory set aside to a minimum.
ex. VARCHAR 30 (store characters up to the # 30) Maximum VARCHAR for mySQL is 255.
If you need more characters than 255, use TEXT or BLOB. BLOB is for more text/info.

Salary = FLOAT = Floating point #; #’s with a decimal.

DATE =

NAMING CONVENTIONS:
Name of Database/ Field/ Table

Rule #1: Make the name as descriptive as possible: explicitly state what they contain.

Rule #2: For 2 word field: lowerCase firstWord, upperCase secondWord   firstNameHere


Actions

Information

Leave a comment