day2-relationaldatabasesandsql-200315141206.pptx

MustaphaGarba1 10 views 10 slides Oct 05, 2024
Slide 1
Slide 1 of 10
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10

About This Presentation

Second day of SQL classes at Aiivon Innovation Hub


Slide Content

SQL Fundamentals Class 10th March 2020 © 2020 Mustapha M Garba

Day 2 Learning Objectives Acquire a basic understanding of relational databases Work hands on with PostgreSQL on database fundamentals Learn how these skills can be used to obtain actionable insights

What is SQL? Definition Structured Query Language (SQL) is a language used to manage structured data in a relational database system. SQL is a standard language of the ISO. Reasons For Usage It allows us to quickly and efficiently store and relate data without needing to concern ourselves with deeper infrastructural concerns. SQL Extensions Basically nobody uses plain SQL in the modern day; common SQL extension sets include T-SQL (or MS-SQL), Oracle, MySQL, PostgreSQL, and MariaDB

1970s SEQUEL is developed at IBM Laboratories 1979 Relational Software release the first commercial RDBMS, Oracle. 1986 ISO and ANSI adopt SQL as a standard database language definition 2001 The Rise of Distributed SQL Systems 2020 ???

Installation

Category Space of SQL Commands Data Declaration Language Used to define the database schema CREATE DROP ALTER RENAME TRUNCATE COMMENT Data Manipulation & Query Language Used to manipulate and query relations SELECT INSERT UPDATE DELETE Transactional Control Language Deal with ‘transactions’ within the database COMMIT ROLLBACK

WHAT IS A RELATIONAL DATABASE? And, pertinently, what is a database schema ? A schema is a description of the entities in a database and the relationship between them. max growth A relational database is a collective of data organized by tables, columns and records

SIMPLE DATA MODEL DATABASE (SCHEMA) TABLE (RELATION) FIELD FIELD TABLE SCHEMA

Database Creation The following command set will create a database in a Postgres server: CREATE SCHEMA databasename; OWNER = rolename; CREATE TABLE tablename ( Column1 columntype, Column2 columntype, … ) ;

Practice With SQL Statements