You are on page 1of 18

Sixth lecture

Introduction to Relational Database and SQL


Introduction to Relational Database

Introduction to Relational Database and SQL


Introduction to
What's in This
Course
relational databases and
SQL
What's in
This
Module
What is a relational database
What are the basics of the
CRUD operations
Broad Database
Categories

Sql (or relational) No Sql


Data is not modeled
using
relationships
What is a relational database?
Data is organized into tables
Tables have rows and columns
Tables are related through
keys
Data is accessed in a relational
database through SQL
Structured Query Language
CRUD

Create Read

Update Delete
SELECT TicketsSold FROM Gigs ◄ Simple read

SELECT id, name FROM Venues ◄ Filters

WHERE name LIKE '%arena%'

SELECT * FROM gigs ◄ Joins


JOIN venues ON venues.id = gigs.venueid

WHERE venues.name LIKE '%arena%'

SELECT COUNT(*) from Gigs ◄ SQL Functions


where TicketsSold < 30
INSERT INTO
◄ Insert into
venues (name, capacity) ◄ Table and columns to add
values ('The Arena', 100); ◄ Values to insert
UPDATE venues ◄ Update table
◄ columns to update
SET capacity=30
◄ Values to change to
WHERE id=4

UPDATE venues ◄ BEWARE


SET capacity=30
DELETE FROM ◄ DELETE from
◄ table
venues

WHERE Id=5 ◄ filter

DELETE FROM
◄ BEWARE
venues
Relational database holds
Summar
related data in tables
y Basic CRUD operations are
- Create
- Read
- Update
- Delete
Up Next:

Moe similar recap lectures I made for your advantage(specially for practical exams):
WHERE
ORDER BY
Introduction of SQL
Basics in SQL

Open the following folder(SQL)

You might also like