+ All Categories
Home > Documents > Class11 Introduction to relational databases and MySQL MIS 3501, Fall 2015 Brad Greenwood, PhD MBA...

Class11 Introduction to relational databases and MySQL MIS 3501, Fall 2015 Brad Greenwood, PhD MBA...

Date post: 18-Jan-2018
Category:
Upload: posy-austin
View: 221 times
Download: 0 times
Share this document with a friend
Description:
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

If you can't read please download the document

Transcript

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 What Have We Done 2014, Mike Murach & Associates, Inc. Slide 2 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 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! 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 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'; 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 Primary key Columns Rows Terminology (2) 2014, Mike Murach & Associates, Inc. Slide 8 Primary key Foreign key 2014, Mike Murach & Associates, Inc. Slide 9 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'; 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. 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 2014, Mike Murach & Associates, Inc. Slide 13 2014, Mike Murach & Associates, Inc. Slide 14 2014, Mike Murach & Associates, Inc. Slide 15 2014, Mike Murach & Associates, Inc. Slide 16 2014, Mike Murach & Associates, Inc. Slide 17 2014, Mike Murach & Associates, Inc. Slide 18 2014, Mike Murach & Associates, Inc. Slide 19 2014, Mike Murach & Associates, Inc. Slide 20 2014, Mike Murach & Associates, Inc. Slide 21 2014, Mike Murach & Associates, Inc. Slide 22 Yes, you could do it all from the command line phpMyAdmin 2014, Mike Murach & Associates, Inc. Slide 23 This is what well use. 2014, Mike Murach & Associates, Inc.24


Recommended