Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rnddave/sql-like-a-boss

Not trying to become an SQL Master, but I am looking to up my SQL game.
https://github.com/rnddave/sql-like-a-boss

database databases mysql postgresql sql

Last synced: about 1 month ago
JSON representation

Not trying to become an SQL Master, but I am looking to up my SQL game.

Awesome Lists containing this project

README

        

# The Story of Data

- Data everywhere
- Value & value creation
- Constantly creating more new data
- Data creation is increasing exponentially (data capture, data storage)

## Some SQL History

Was originally called SEQUEL in early 1980's

- Structured
- English
- QUery
- Language

But there was some challenge to that name, hence; SQL

---

- [Codd's Twelve Rules](https://www.w3resource.com/sql/sql-basic/codd-12-rule-relation.php)

# DBMS does the CRUD

- Create
- Read
- Update
- Delete

- Also, Security, Management, Transaction Handling etc

# The Tuple

A Tuple in this sense is a single row of data in a table

Multiple rows = Tuples

# Cardinality

The collection of multiple rows of data = **The Cardinality**

# OLTP vs OLAP

2 types of relational database

- Support Day to Day Business
- Supports Data Analysis

### OLTP

- On-Line Transactional Processing
- Day-to-day-stuff

### OLAP

- On-Line Analytical Processing
- Analysing data so that Day-to-Day future decisions can be made

---

# SQL Command Buckets

- DDL
- DQL
- DML
- DCL

## DDL

- Data Definition Language
- Broad statements
- Used when setting up the database etc
- Change things etc
- CREATE
- ALTER
- DROP
- RENAME
- TRUNCATE
- COMMENT

## DQL

- Data Query Language
- Once a database is in place, most of your work is looking at data
- SELECT

## DML

- Data Modification Language
- data in the tables
- DDL = Database Definitions, making changes to databases
- whereas DML = about the tables inside the database
- INSERT
- UPDATE
- DELETE
- MERGE
- CALL
- EXPLAIN PLAIN
- LOCK TABLE

## DCL

- Data Control Language
- Giving and revoking access
- GRANT
- REVOKE

---