What version of MySQL are you using?

The version on my local WAMP stack is 5.5.24. The version on my Site5 server is 5.1.76

You can use phpinfo() to determine the version number.

What characters can be used in database, table, and column names?

Only letters, numbers, and the underscore (no spaces)

Should you treat database, tables, and column names as case-sensitive or case-insensitive?


Recommendation - use all lowercase

What are three general column types?

Text, Number, and Date/Time

What are the differences between CHAR and VARCHAR?

Both of these types store strings and can be set with a maximum length. Strings stored as CHAR will always be stored as a string the length of the column (using spaces to pad it; these spaces will be removed when you retrieve the stored value from the database.) Strings stored as VARCHAR will be stored as the length of the string plus 1.

Recommendation - Use CHAR for fixed length columns such as State, use VARCHAR otherwise

How do you determine what size (in terms of subtype or length) a column should be?

The size of any field should be restricted to the smallest possible value based upon the largest possible input.

What are some of the other properties that can be assigned to columns?


What is a primary key?

The primary key is a unique way to refer to a particular record in a table. A primary key must always have a value, that value must never change and that value must be unique for each record in the table.

If you're using the command-line mysql client to connect to MySQL, what username and password combination is required?

When using the command line interface (cli), the root username and password are used.