MySQL
  Home arrow MySQL arrow Data Definition Language, Part 1
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
MYSQL

Data Definition Language, Part 1
By: Sams Publishing
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 41
    2005-01-19


    Table of Contents:
  • Data Definition Language, Part 1
  • 4.1 General Database and Table Properties
  • 4.3 Limits on Number and Size of Database Components
  • 4.4 Identifier Syntax
  • 4.5 CREATE DATABASE and DROP DATABASE
  • 4.7 DROP TABLE
  • 4.9 Creating and Dropping Indexes
  • 4.10 Column Types
  • 4.10.2 String Column Types
  • 4.10.3 Date and Time Column Types
  • 4.10.4 Column Options
  • 4.10.5 Using the AUTO_INCREMENT Column Option
  • 4.10.6 Automatic Type Conversion and Value Clipping

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Data Definition Language, Part 1
    ( Page 1 of 13 )

    Studying for the MySQL Certification exam? This article, the first of two parts, covers roughly 10 percent of the material that will appear on the exam, including general database and table properties, storage engines and table types, and more. It is excerpted from chapter four of the book MySQL Certification Guide written by Paul Dubois et. al. (Sams, 2004, ISBN: 0672326329).

    This chapter covers the following exam topics:

    • General database and table properties

    • Storage engines and table types

    • Limits on number and size of database components

    • Identifier syntax

    • The CREATE DATABASE and DROP DATABASE statements

    • The CREATE TABLE, ALTER TABLE, and DROP TABLE statements

    • The CREATE INDEX and DROP INDEX statements; specifying indexes at table-creation time

    • Creating and using primary keys

    • Column types

    • Using AUTO_INCREMENT

    • String and number formats

    • Using SHOW and DESCRIBE to review table structures

    Questions on the material in this chapter make up approximately 20% of the exam.

    Several of MySQL's SQL statements comprise the Data Definition Language (DDL) that is used to define the structural characteristics of your databases. The following statements create or remove databases and tables or modify the structure of tables:

    • CREATE DATABASE creates a new database.

    • DROP DATABASE removes a database and any tables it contains.

    • CREATE TABLE creates a new table.

    • DROP TABLE removes a table and any data it contains.

    • ALTER TABLE modifies the structure of an existing table.

    • CREATE INDEX adds an index to a table.

    • DROP INDEX removes an index from a table.

    Several of the table-related DDL statements require you to provide column definitions. MySQL allows several different types of data to be stored, and it's important to understand what column datatypes are available so that you can define your tables appropriately for the information they'll contain.

    This chapter provides a general overview of how MySQL manages databases and tables and a discussion of the syntax of legal names that can be used to refer to them. It also describes how to use each of the DDL statements and discusses the available column datatypes, their properties, how to use them, and the syntax for writing column definitions.

    Related to the DDL statements, MySQL supports several statements that are helpful for checking what databases or tables exist and for getting information about the internal column and index structure of tables. These statements include SHOW and DESCRIBE; they are discussed at the end of this chapter.

    This chapter excerpt is from MySQL Certification Guide by Paul Dubois et al. (Sams, 2004, ISBN: 0672326329 ). Check it out at your favorite bookstore today. Buy this book now.



     
     
    >>> More MySQL Articles          >>> More By Sams Publishing
     

       

    MYSQL ARTICLES

    - MySQL Security Tips
    - Designing a MySQL Database: Tips and Techniq...
    - The Three Most Important MySQL Queries
    - Null and Empty Strings
    - MySQL Server Tuning Tips and Tricks
    - MySQL Query Optimizations and Schema Design
    - MySQL Benchmarking Tools and Utilities
    - MySQL Benchmarking Concepts and Strategies
    - Take Some Load off MySQL with MemCached
    - MySQL Table Prefix Changer Tool in PHP
    - Using the SIGNAL Statement for Error Handling
    - Error Handling Examples
    - Error Handling
    - Completing a Search Engine with MySQL and PH...
    - Paginating Result Sets for a Search Engine B...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
    Stay green...Green IT