MySQL Crash Course, Chapter 1
Upcoming SlideShare
Loading in...5

Like this? Share it with your network


MySQL Crash Course, Chapter 1



MySQL Crash Course, Chapter 1

MySQL Crash Course, Chapter 1



Total Views
Views on SlideShare
Embed Views



2 Embeds 8 6 2



Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

MySQL Crash Course, Chapter 1 Presentation Transcript

  • 1. MySQL Crash Course Chapter 01 Understanding SQL Author: Ben Forta | Publisher: Sams Publishing Copyright 2010
  • 2. What is a Database?
    • A database is a collection of data stored in some organized fashion
      • simply a physical location to store data
    • Database software is called the Relational Database Management System (RMDBS)
      • the database is the container created and manipulated via the RDBMS
    Copyright 2010
  • 3. Common RDBMSs
    • The most common database software programs are:
      • Oracle
      • Microsoft SQL Server
      • IBM DB2
      • MySQL
      • Postgre SQL
    Copyright 2010
  • 4. Tables
    • A database consists of tables that are interrelated (thus relational database)
      • just like a website consists of web pages that are linked
    Copyright 2010
  • 5. Tables Example
    • One table stores information about customers
      • table called customers
    • Another table stores information about customer orders
      • table called orders
    Copyright 2010
  • 6. Schema
    • A schema is a set of information that describes a table
    Copyright 2010
  • 7. Columns and Datatypes
    • Table are made up of columns
    • Columns are referred to as fields
    • A field contains a particular piece of information
      • column equals field
    Copyright 2010
  • 8. Columns and Datatypes
    • Example: table named customers
    • Note: each field should hold distinct information (for example, name should be split into two fields, one for first name , one for last name .)
    Copyright 2010 city address name ??? etc. »
  • 9. Columns and Datatypes
    • Each column in a database has an associated datatype
      • allows only specific data in that column
      • helps store data correctly
      • specified when table is created
    • Example:
      • a field called price would only store data that looks like “19.99” and not “Boston”
    Copyright 2010
  • 10. Rows
    • Data in a table is stored in rows
      • a row is a record in a table
    • Example: a customers table might store information about one customer in one row
      • row equals record
    Copyright 2010
  • 11. Primary Keys
    • Every row in a table should have some column (or set of columns) that uniquely identifies it, called the primary key
      • used to refer to a specific row
    Copyright 2010
  • 12. Primary Keys
    • Example: table named customers
    • primary key (unique value per row)
    Copyright 2010 274 Moody Street address » Kery name_last Peter name_first 001 id
  • 13. Primary Keys
    • Best Practices (Don’ts)
    • Don’t update values in primary key columns
    • Don’t reuse values in primary key columns
    • Don’t use values that might change in primary key columns
    Copyright 2010
  • 14. What is SQL?
    • SQL is a language designed specifically for communicating with databases
      • acronym for Structured Query Language
      • pronounced as the letters S-Q-L or as “sequel”
    Copyright 2010
  • 15. What is SQL?
    • Advantages of SQL
      • every major RMDBS supports SQL
      • learning one language enables you to interact with many databases
      • SQL is made up of description English words, and there aren’t that many of them, therefore . . .
      • SQL is not difficult to learn
    Copyright 2010
  • 16. What is SQL?
    • Disadvantages of SQL
      • no two RDBMSs implement SQL identically
      • just like no two browsers implement HTML and CSS identically
    Copyright 2010
  • 17. MySQL Crash Course
    • Go to
    FOR MORE INFO... Copyright 2010