Presentation is loading. Please wait.

Presentation is loading. Please wait.

Designing Databases ySQL Happy Meal Example.

Similar presentations


Presentation on theme: "Designing Databases ySQL Happy Meal Example."— Presentation transcript:

1 Designing Databases ySQL Happy Meal Example

2 The Setup Website for McDonald’s Happy Meal toy collectors
Basic Functionality: Allow people to create site account Post info about toys Look up info about toys Trade/Post for Sale The Setup

3 What Data Must Site Deal In?
Database to house individual data Determine how to organize it Ea. Piece of info stored: FIELD Sets of related fields: TABLE All tables together: DATABASE What Data Must Site Deal In?

4 Some Basic Info to Store
User Info First Name Last Name User ID Password Photo Address Toy Info Name Collection Year Picture Toy ID Some Basic Info to Store

5 Way to Link the Two Tables
Collection User ID Toy ID Way to Link the Two Tables

6 Translating to MySQL Creating Actual Database

7 Select Data Types for Fields
varchar(40) varchar(15) mediumblob date Select Data Types for Fields

8 Start the WAMP & Open MySQL

9 Create a new DB

10 Name it Set collation to utf8_general_ci Press create Create DB

11 Select the DB (happymeals)

12 Fill in info Press Go Create User Table

13 Fill in Fields Set userid as primary Set Fields in Table

14 See Results

15 Create Toy Table Return to DB by clicking happymeal link Fill in info
Press Go Create Toy Table

16 Fill in Fields Set userid as primary Set Fields in Table

17 View Results

18 Create Collection Table

19 Set Fields

20 View Results

21 Access Tables & Print from Print View Option Link

22 View of Whole DB

23 View of Individual Tables


Download ppt "Designing Databases ySQL Happy Meal Example."

Similar presentations


Ads by Google