Skip to main content

Posts

Showing posts with the label how to manage a database

Managing Databases

1. Login in to the mysql client using the login name and password provided by your instructor. 2. View the existing databases that the MySQL Server is maintaining. mysql> SHOW DATABASES; 3. There should be only three databases that the MySQL Server is maintaining: INFORMATION_SCHEMA, mysql and test. Remove any additional databases that exist. If need be, mysql> DROP DATABASE db_name; 4. Create a new database called photo_album with a default character set of utf8. mysql> CREATE DATABASE photo_album CHARACTER SET utf8; 5. Using the mysql client, verify that the database was created. mysql> SHOW DATABASES; 6. View the contents of the /usr/local/mysql/data directory. Is there a new sub-directory associated with the database just created? >ls /usr/local/mysql/data/ 7. View the db.opt file located in the associated sub-directory to verify the correct default character set is being used. What collation type has been assigned as default? Does that mak

HOW TO MANAGING DATABASES

Database Properties The heart of any database is the tables, because the tables contain the data that is used to provide information  to the end users. Tables are contained in databases, and in MySQL each database has an associated "data  directory" to store all the physical components of the database, to include tables. This physical  representation on disk of the tables is dependent on the type of storage engine that the table is utilizing;  however, every table, no matter of the type of storage engine that is being used, contains a format file  (table_name.frm) which describes the table definition and structure.  In addition to the physical representation of the table, there is also the better known logical aspect of the  table. This logical aspect is represented in rows and columns. Rows within a table, consist of a collection of  values that describe an entity (ex. an employee). Columns within a table, consist of a collection of similar  data among rows (ex. employe