MySQL Tables and Relations 101

Slides:



Advertisements
Similar presentations
Designing a Database Unleashing the Power of Relational Database Design.
Advertisements

CSC 2720 Building Web Applications Database and SQL.
Database Design Concepts
Database Lecture # 1 By Ubaid Ullah.
PHP Programming with MySQL Slide 8-1 CHAPTER 8 Working with Databases and MySQL.
Constraints  Constraints are used to enforce rules at table level.  Constraints prevent the deletion of a table if there is dependencies.  The following.
University of Sunderland COM 220Lecture Two Slide 1 Database Theory.
Database Fred Durao What is a database? A database is any organized collection of data. Some examples of databases you may encounter in.
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.
PowerBuilder Online Courses - by Prasad Bodepudi Database Painter Primary & Foreign Keys Extended Attributes PowerBuilder System Tables Database Profiles.
Howard Paul. Sequential Access Index Files and Data File Random Access.
1 CS 430 Database Theory Winter 2005 Lecture 13: SQL DML - Modifying Data.
INFORMATION TECHNOLOGY DATABASE MANAGEMENT. A database is a collection of information organized to provide efficient retrieval. The collected information.
CS320 Web and Internet Programming SQL and MySQL Chengyu Sun California State University, Los Angeles.
Introduction to Database Programming with Python Gary Stewart
Chapter 12 Introducing Databases. Objectives What a database is and which databases are typically used with ASP.NET pages What SQL is, how it looks, and.
1 Database Systems Introduction to Microsoft Access Part 1.
INTRODUCTION TO DATABASES (MICROSOFT ACCESS)
Databases.
CS320 Web and Internet Programming SQL and MySQL
Indexes By Adrienne Watt.
Insert, Update and the rest…
Prepared by : Moshira M. Ali CS490 Coordinator Arab Open University
© 2016, Mike Murach & Associates, Inc.
SQL – More Table Constraints
Session 4 PHP & MySQL.
Database Management Systems (DBMS)
Web Programming Week 3 Old Dominion University
Relation (Table) Row/Tuple/Record Column/Attribute/Field name birth
Database Management  .
Referential Integrity
Relation (Table) Row/Tuple/Record Column/Attribute/Field name birth
The University of Texas – Pan American
* Lecture 26 Manifest Asynchrony
Server Side Programming Overview And file system basics
Introduction to Databases with MAMP/LAMP/WAMP thrown in!
CT Web Development, Colorado State University
* Lecture 12 Mapping, Map Reduction Summing integers,
HTML5 Drawing Canvas and Video
Chapter 8 Working with Databases and MySQL
Handling Files In particular, uploading files.
Tables from Arrays of Objects Exploding Strings
Content Management and WordPress
Session #, Speaker Name Indexing Chapter 8 11/19/2018.
HTML Basics & Context & IDEs & Server Basics & Online Notes
* Lecture 22 Images * Course logo spider web photograph from Morguefile openstock photograph by Gabor Karpati, Hungary.
Introduction to AJAX and the migration toward applications
CS1222 Using Relational Databases and SQL
Teaching slides Chapter 8.
Insert, Update, Delete Manipulating Data.
* Lecture 5 PHP Basics * Course logo spider web photograph from Morguefile openstock photograph by Gabor Karpati, Hungary.
Querying Client Information Forms and Passing Data,
* jQuery * Course logo spider web photograph from Morguefile openstock photograph by Gabor Karpati, Hungary.
PHP and MySQL.
Referential Integrity
Authentication Stepped Up Persistent User Data Protected Content.
CS122 Using Relational Databases and SQL
Data Management Innovations 2017 High level overview of DB
Database Management System
CS 142 Lecture Notes: Relational Databases
Web Programming Week 3 Old Dominion University
CS3220 Web and Internet Programming SQL and MySQL
CS1222 Using Relational Databases and SQL
Loops and Conditionals Generating , Reading files.
CS3220 Web and Internet Programming SQL and MySQL
DATABASE Purpose of database
Alternatives to our approach
Web Programming Week 3 Old Dominion University
CS122 Using Relational Databases and SQL
Presentation transcript:

MySQL Tables and Relations 101 * Lecture 17 MySQL Tables and Relations 101 * Course logo spider web photograph from Morguefile openstock photograph by Gabor Karpati, Hungary.

CSU CS CT 310 - Web Development, ©Ross Beveridge & Jamie Ruiz Data - Tables Table is, more or less, a flat database. Contains “things”, objects. One thing per row. Columns store attributes. Primary index unique for each row. Relations kick in later How we relate tables to one another. 11/22/2018 CSU CS CT 310 - Web Development, ©Ross Beveridge & Jamie Ruiz

Exercise Some Commands use CREATE INSERT SELECT UPDATE DROP id name artist 1 Mudlark Leo Kottke 2 My Feet Are Smiling 3 Lucky The Man Wizz Jones 4 The Blue Idol Altan 5 Return of the Repressed John Fahey 11/22/2018 CSU CS CT 310 - Web Development, ©Ross Beveridge & Jamie Ruiz

Create Music Database In general, new databases do not come and go often. 11/22/2018 CSU CS CT 310 - Web Development, ©Ross Beveridge & Jamie Ruiz

CSU CS CT 310 - Web Development, ©Ross Beveridge & Jamie Ruiz Example 1 11/22/2018 CSU CS CT 310 - Web Development, ©Ross Beveridge & Jamie Ruiz

Where’s the Beef, ah … Data. Data from tables is stored in files. Case sensitivity comes from host OS. In case it is not obvious. NEVER MANIPULATE THESE FILES DIRECTLY. 11/22/2018 CSU CS CT 310 - Web Development, ©Ross Beveridge & Jamie Ruiz

Relations 101 Leo Kottke appears twice. Leo Kottke Wizz Jones Altan John Fahey The Blue Idol Mudlark Lucky The Man My Feet Are Smiling Return of the Repressed 11/22/2018 CSU CS CT 310 - Web Development, ©Ross Beveridge & Jamie Ruiz

CSU CS CT 310 - Web Development, ©Ross Beveridge & Jamie Ruiz Example 2 11/22/2018 CSU CS CT 310 - Web Development, ©Ross Beveridge & Jamie Ruiz

Keys: Primary and Foreign Primary Key Unique! Establishes Relation: Loosely speaking, a ‘pointer’ to the other object. Two cds related to one artist. 11/22/2018 CSU CS CT 310 - Web Development, ©Ross Beveridge & Jamie Ruiz