Chapter 4 - Review
1What version of MySQL are you using? If you don’t know, find out now!
I am running MySQL version 5.5.25 locally.
2What characters can be used in database, table, and column names?
only numbers, letters or underscores are allowed. No spaces.
3Should you treat database, table, and column names as case-sensitive or case-insensitive?
Even though it is dependent on your software setup, it is safest to assume case-sensitivity for naming conventions.
4What are the three general column types?
Text(Strings), Numbers and Date/Time values are the three general data types.
5What are the differences between CHAR and VARCHAR?
CHAR is a fixed length field where VARCHAR is a flexible length taking up only the needed memory for the string stored.
6How do you determine what size (in terms of subtype or length) a column should be?
A column length should be as short as its longest possible data stored.
7What are some of the other properties that can be assigned to columns?
Columns can have default values, they can be required, they can be used to index the table for faster data retrieval. Numeric fields can be non-negative and also auto-incremented.
8What is a primary key?
A primary key acts as the unique identifier for each row in the table. No two rows can have the same Primary Key value.Primary keys are required and must have a value.
9If you're using the command-line mysql client to connect to MySQL, what
username and password combination is required?
To login to the mysql client on the command line, you would first navigate to the proper directory that contains the .exe file then type in
mysql -u username -h hostname -p*Enter the correct username and hostname(localhost) etc.. afterwhich you will be prompted for the correct password associated with that user account.
<?php $review = array( 1=>array( 'q'=>'What version of MySQL are you using? If you don’t know, find out now!', 'a'=>'I am running MySQL version 5.5.25 locally.' ), 2=>array( 'q'=>'What characters can be used in database, table, and column names?', 'a'=>'only numbers, letters or underscores are allowed. No spaces.' ), 3=>array( 'q'=>'Should you treat database, table, and column names as case-sensitive or case-insensitive?', 'a'=>'Even though it is dependent on your software setup, it is safest to assume case-sensitivity for naming conventions.' ), 4=>array( 'q'=>'What are the three general column types?', 'a'=>'Text(Strings), Numbers and Date/Time values are the three general data types.' ), 5=>array( 'q'=>'What are the differences between CHAR and VARCHAR?', 'a'=>'<b>CHAR</b> is a fixed length field where <b>VARCHAR</b> is a flexible length taking up only the needed memory for the string stored.' ), 6=>array( 'q'=>'How do you determine what size (in terms of subtype or length) a column should be?', 'a'=>'A column length should be as short as its longest possible data stored.' ), 7=>array( 'q'=>'What are some of the other properties that can be assigned to columns?', 'a'=>'Columns can have default values, they can be required, they can be used to index the table for faster data retrieval. Numeric fields can be non-negative and also auto-incremented.' ), 8=>array( 'q'=>'What is a primary key?', 'a'=>'A primary key acts as the unique identifier for each row in the table. No two rows can have the same Primary Key value.Primary keys are required and must have a value.' ), 9=>array( 'q'=>'If you\'re using the command-line mysql client to connect to MySQL, what username and password combination is required?', 'a'=>'To login to the mysql client on the command line, you would first navigate to the proper directory that contains the .exe file then type in <pre>mysql -u username -h hostname -p</pre>*Enter the correct <i>username</i> and <i>hostname</i>(localhost) etc.. afterwhich you will be prompted for the correct password associated with that user account.' ), ); include('templates/review.php'); ?>