SQL - Lesson 1
SQL - Lesson 1
(DB)?
Any collection of Databases can be
related information stored in different ways
Phonebook On paper
Shopping List In your mind
Todo List On a computer
Your 5 best friends This powerpoint
Facebook’s User base Comments section
Lazada.com Shopping List
Keeps track of Products, Reviews, Keeps track of consumer products
Purchase Orders, Credit Cards, that need to be purchased
Users, Media, etc.
10-20 pieces of information need
Trillions of pieces of information to be stored and readily available
need to be stored and readily
available
Information is for convenience sake
only and not necessary for
Information is extremely valuable shopping
and critical to Lazada.com
functioning
Security is not important
Security is essential, Lazada stores
Information is stored on a piece of
peoples personal information paper, or even just in someone’s
memory
Credit card #, Address, phone
Information is stored on a
computer
Database Management Systems (DBMS)
A special software program that helps users create and maintain a database
Makes it easy to manage large amounts of information
Handles security
Backups
Importing/exporting data
Concurrency
Interacts with software applications
Programming languages
Lazada.com will interact with the DBMS in order to create, read, update, and
delete information
C.R.U.D
CREATE.READ.UPDATE.DELETE
OR
CREATE.RETRIEVE.UPDATE.DELETE
CRUD represents the four (4) main operations
for database management systems
Two Types of Databases
Non-Relational Databases
Relational Databases (SQL) (noSQL/not just SQL)
Organize data into one or more Organize data is anything but a
tables traditional table
Each table has columns and rows Key value stores
A unique key identifies each row Documents (JSON, XML, etc.)
Graphs
Flexible tables
Relational Databases (SQL)
Queries are requests made to the database management system for specific
information
As the database’s structure becomes more and more complex, it becomes more
difficult to get the specific pieces of information we want
A google search is a query
Wrap Up