Presentation is loading. Please wait.

Presentation is loading. Please wait.

Class11 Introduction to relational databases and MySQL MIS 3501, Fall 2015 Brad Greenwood, PhD MBA Department of MIS Fox School of Business Temple University.

Similar presentations


Presentation on theme: "Class11 Introduction to relational databases and MySQL MIS 3501, Fall 2015 Brad Greenwood, PhD MBA Department of MIS Fox School of Business Temple University."— Presentation transcript:

1 Class11 Introduction to relational databases and MySQL MIS 3501, Fall 2015 Brad Greenwood, PhD MBA Department of MIS Fox School of Business Temple University 9/29/2015

2 What Have We Done © 2014, Mike Murach & Associates, Inc. Slide 2

3 Databases are not complicated © 2014, Mike Murach & Associates, Inc. 3 A database is a collection of information that is organized so that it can easily be accessed, managed, and updated. They are not complicated

4 MySQL Weeks 5 & 6 HTML & CSS Weeks 1 & 2 PHP Weeks 3 & 4 PDO Week 7 Course Overview 4 To do: Organize your code with MVC (week 8) Debug your code (week 9) Work with forms (week 10) Use arrays (week 11 & 12) Use sessions (week 13) Now we are here!

5 Topics For Today © 2014, Mike Murach & Associates, Inc. 5 ERD / Schema Diagrams Terminology Anatomy of a database Tables, Columns, Rows Entity, Attribute, Tuple Data Types int, float, varchar, et al Statements select, insert, update, delete retrieve, insert, change, remove

6 Remember MIS2502? (2) © 2014, Mike Murach & Associates, Inc. 6 Schema Diagrams SQL Statements select productName, listPrice, productCode, categoryName from products, categories where products.categoryID = categories.categoryID AND categoryName = 'Basses';

7 Terminology © 2014, Mike Murach & Associates, Inc. 7 Schema Diagrams Can you find an example of a …. primary key foreign key one-to-many relationship many-to-many relationship bridge table

8 Primary key Columns Rows Terminology (2) © 2014, Mike Murach & Associates, Inc. Slide 8

9 Primary key Foreign key © 2014, Mike Murach & Associates, Inc. Slide 9

10 © 2014, Mike Murach & Associates, Inc. Slide 10 Another way of looking at it… Products Categories The categoryID is the common data element between the two. Recall from before: select productName, listPrice, productCode, categoryName from products, categories where products.categoryID = categories.categoryID AND categoryName = 'Basses';

11 © 2014, Mike Murach & Associates, Inc. Slide 11 This is the level of detail that a developer really needs to get work done. Column name Data Type Will accept null? productID will automatically increment by one with each new record.

12 © 2014, Mike Murach & Associates, Inc. Slide 12 There are a lot more MySQL data types… but knowing these allow you to do everything you need to do in this class, and in many practical situations. Note the similarity between these data types and PHP data types

13 © 2014, Mike Murach & Associates, Inc. Slide 13

14 © 2014, Mike Murach & Associates, Inc. Slide 14

15 © 2014, Mike Murach & Associates, Inc. Slide 15

16 © 2014, Mike Murach & Associates, Inc. Slide 16

17 © 2014, Mike Murach & Associates, Inc. Slide 17

18 © 2014, Mike Murach & Associates, Inc. Slide 18

19 © 2014, Mike Murach & Associates, Inc. Slide 19

20 © 2014, Mike Murach & Associates, Inc. Slide 20

21 © 2014, Mike Murach & Associates, Inc. Slide 21

22 © 2014, Mike Murach & Associates, Inc. Slide 22 Yes, you could do it all from the command line…

23 phpMyAdmin © 2014, Mike Murach & Associates, Inc. Slide 23 This is what we’ll use.

24 © 2014, Mike Murach & Associates, Inc.24


Download ppt "Class11 Introduction to relational databases and MySQL MIS 3501, Fall 2015 Brad Greenwood, PhD MBA Department of MIS Fox School of Business Temple University."

Similar presentations


Ads by Google