Introduction to – AngularJS – Girl Develop It



Introduction to – AngularJS – Girl Develop It

0 0


class-sql-intro

intro to SQL

On Github itechdom / class-sql-intro

Introduction to

AngularJS

Girl Develop It

Daniel Lucas / @danlucas

SQL

  • Structured Query Language.

  • Standard way to define, store, manipulate data.

  • Industry standard.

Why use SQL

  • Unified and Shared language to manage data which can span multiple systems.

  • Syntax is close to spoken language.

DELETE FROM user Where name = "Sam"

DATABASE

  • We have a school, let's call it Turing. Turing has students, teachers, classes and courses.

Database

  • we first start by creating a Database. A database is a container for our data. Let's call it Turing.

in SQL

CREATE DATABASE Turing

Tables

  • In Turing, we have teachers, students, courses, classes. They are the "things" that are in our database.

  • We define these in what we call Tables. And they look like tables you see in any application (word, excel .. etc)

  • Each table has rows, and columns

  • Columns give properties to our data or table: name, age, gender, race ... etc

  • Rows are entries in our table: Sam, Rebecca, John etc

Name Age Gender Sam 25 Male Rebecca 21 Female

Columns

  • We have a school, let's call it Turing. Turing has students, teachers, classes and courses.

Rows

  • We have a school, let's call it Turing. Turing has students, teachers, classes and courses.

Queries

  • The Q in SQL. We need a way to do a search on our data.

  • This answers the question: I need to get a subset of my data that satisfies a condition.

SELECT

  • Give me the student with the name = "sam"

  • We do that with a SELECT statement.

SELECT * FROM students where name = "sam"

Demo

  • Let's demo this in PhpMyAdmin.