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

Slides:



Advertisements
Similar presentations
Murach’s C# 2010, C6 © 2010, Mike Murach & Associates, Inc.Slide 1.
Advertisements

Murach’s SQL Server 2008, C6© 2008, Mike Murach & Associates, Inc.Slide 1.
SQL for SQL Server, C6© 2002, Mike Murach & Associates, Inc.Slide 1.
Murach’s C# 2010, C3 © 2010, Mike Murach & Associates, Inc.Slide 1.
Murach's MySQL, C3© 2012, Mike Murach & Associates, Inc.Slide 1.
Murach's C# 2012, C3© 2013, Mike Murach & Associates, Inc.Slide 1.
Murach's PHP and MySQL, C2© 2010, Mike Murach & Associates, Inc.Slide 1.
Murach's MySQL, C1© 2012, Mike Murach & Associates, Inc.Slide 1.
Murach's MySQL, C2© 2012, Mike Murach & Associates, Inc.Slide 1.
Murach's PHP and MySQL, C2© 2010, Mike Murach & Associates, Inc.Slide 1.
Murach’s SQL Server 2008, C1© 2008, Mike Murach & Associates, Inc.Slide 1.
Murach’s C# 2010, C1© 2010, Mike Murach & Associates, Inc.Slide 1.
Murach's MySQL, C1 © 2012, Mike Murach & Associates, Inc. Slide 1.
© 2013, Mike Murach & Associates, Inc.
Murach’s SQL Server 2008, C4© 2008, Mike Murach & Associates, Inc.Slide 1.
Murach’s C# 2010, C4 © 2010, Mike Murach & Associates, Inc.Slide 1.
Murach’s C# 2010, C4 © 2010, Mike Murach & Associates, Inc.Slide 1.
Murach's PHP and MySQL, C4© 2010, Mike Murach & Associates, Inc.Slide 1.
Murach's C , C4 © 2009, Mike Murach & Associates, Inc. Slide 1 © 2009, Mike Murach & Associates, Inc.Slide 1.
Murach's PHP and MySQL, C4© 2010, Mike Murach & Associates, Inc.Slide 1.
Murach's PHP and MySQL, C4© 2010, Mike Murach & Associates, Inc.Slide 1.
Murach’s Java SE 6, C21© 2007, Mike Murach & Associates, Inc.Slide 1.
SQL Lecture 10 Inst: Haya Sammaneh. Example Instance of Students Relation  Cardinality = 3, degree = 5, all rows distinct.
Mid-term Exam Answer Keys Week 7 Spring I. Multiple Choices Questions Each may have more than one answer (6 x 4 = 24 points total)
1004INT Information Systems Week 10 Databases as Business Tools.
DAT702.  Standard Query Language  Ability to access and manipulate databases ◦ Retrieve data ◦ Insert, delete, update records ◦ Create and set permissions.
Database Design Concepts
Web Application Development. Tools to create a simple web- editable database QSEE MySQL (or PHPMyAdmin) PHP TableEditor.
Class03 Introduction to Web Development with PHP MIS 3501, Fall 2015 Brad Greenwood, PhD MBA Department of MIS Fox School of Business Temple University.
Chapter 7 Working with Databases and MySQL PHP Programming with MySQL 2 nd Edition.
15/10/20151 PHP & MySQL 'Slide materials are based on W3Schools PHP tutorial, 'PHP website 'MySQL website.
Introduction to MySQL Lab no. 10 Advance Database Management System.
ISM 4212 Lab Creating DB Tables 02 copyright Lars Paul Linden 2007.
SQL Basics. 5/27/2016Chapter 32 of 19 Naming SQL commands are NOT case sensitive SQL commands are NOT case sensitive But user identifier names ARE case.
Course FAQ’s I do not have any knowledge on SQL concepts or Database Testing. Will this course helps me to get through all the concepts? What kind of.
RDBMS MySQL. MySQL is a Relational Database Management System MySQL allows multiple tables to be related to each other. Similar to a Grandparent to a.
Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin APPENDIX C DESIGNING DATABASES APPENDIX C DESIGNING DATABASES.
Class06 Conditional Statements MIS 3501, Fall 2015 Brad Greenwood, PhD MBA Department of MIS Fox School of Business Temple University 9/10/2015 © 2014,
Distribution of Marks For Second Semester Internal Sessional Evaluation External Evaluation Assignment /Project QuizzesClass Attendance Mid-Term Test Total.
Sessions and cookies (part 2) MIS 3501, Fall 2015 Brad N Greenwood, PhD Department of MIS Fox School of Business Temple University 11/19/2015.
Form Data (part 2) MIS 3502, Fall 2015 Brad N Greenwood, PhD Department of MIS Fox School of Business Temple University 11/10/2015 Slide 1.
Form Data (part 1) MIS 3502, Fall 2015 Brad Greenwood, PhD Department of MIS Fox School of Business Temple University 11/10/2015.
Class07 PHP: loops and includes MIS 3501, Fall 2015 Brad Greenwood, PhD MBA Department of MIS Fox School of Business Temple University 9/15/2015.
Hoi Le. Why database? Spreadsheet is not good to: Store very large information Efficiently update data Use in multi-user mode Hoi Le2.
Database Planning Database Design Normalization.
Class05 How to get data from a form MIS 3501, Fall 2015 Brad N Greenwood, PhD MBA Department of MIS Fox School of Business Temple University 9/8/2015.
© 2010, Mike Murach & Associates, Inc.
Brad N Greenwood, PhD MBA
Form Data (part 2) MIS 3502, Fall 2015 Jeremy Shafer Department of MIS
Organize your code with MVC
© 2016, Mike Murach & Associates, Inc.
Session 4 PHP & MySQL.
Form Data (part 1) MIS 3502, Fall 2015 Jeremy Shafer Department of MIS
Class07 PHP: loops and includes
© 2010, Mike Murach & Associates, Inc.
© 2010, Mike Murach & Associates, Inc.
PDO Database Connections: Getting data out of the database
© 2010, Mike Murach & Associates, Inc.
© 2010, Mike Murach & Associates, Inc.
Introduction to relational databases and MySQL
© 2015, Mike Murach & Associates, Inc.
© 2015, Mike Murach & Associates, Inc.
© 2015, Mike Murach & Associates, Inc.
Class08 Using the Documentation
Class05 How to get data from a form
Class11 Introduction to relational databases and MySQL
© 2015, Mike Murach & Associates, Inc.
© 2015, Mike Murach & Associates, Inc.
© 2010, Mike Murach & Associates, Inc.
Presentation 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 we’ll use.

© 2014, Mike Murach & Associates, Inc.24