Back to main
Video: SQL Basics for Beginners
https://www.youtube.com/watch?v=zbMHLJ0dY4w
Introduction to SQL
-
Features
-
Well defined standards
-
Each query has to be written in a specific way
-
Can create multiple views
Data and Database
-
Database: data from user is process, stored
-
Types
-
Distributed Database
-
Object Oriented Database
-
Centralized Database
-
Operational Database
-
Graph Database
-
NoSQL Database
-
Cloud Database
-
Relational Database
Popular Databases
-
mongoDB
-
Postgres
-
Microsoft access
-
Microsoft sql server
-
Mysql
-
Oracle
Table: collection of data in a tabular form
-
Contains data values named values
-
Intersection of rows and columns = cell
-
Any amount of rows, set amount of columns
-
Table has to have a name
-
Tuples: single row of table which contains single record for that relation
-
Attributes: features of an entity
-
Has a name and data value
-
Table constraints: restrictions defined by user when table is created
-
Have to be decided during creation of table
-
Check default
-
Primary key
-
Foreign key
-
Not null
-
Index
-
Unique
SQL Queries
-
Select statement: what part of table you want to select
-
Where clause: if we need only certain records, filters through table
-
And, or, not operator: just like operators in java
-
Insert into: inserting new record or data into table
-
Aggregate values
-
Average, min, etc.
-
Order by: sort result in ascending or descending order
-
Null values: are null (field with no value)
-
Update: modify rows in a table
-
Delete: delete rows