Слайд 2
![Database A database is an organized collection of data, generally](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/597297/slide-1.jpg)
Database
A database is an organized collection of data, generally stored and
accessed electronically from a computer system
Слайд 3
![Database Edgar Frank "Ted" Codd (19 August 1923 – 18](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/597297/slide-2.jpg)
Database
Edgar Frank "Ted" Codd (19 August 1923 – 18 April 2003)
while working for IBM, invented the relational model for database management, initial paper was
"A Relational Model of Data for Large Shared Data Banks"
Слайд 4
![SQL S-Q-L or “sequel” - Structured Query Language used in](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/597297/slide-3.jpg)
SQL
S-Q-L or “sequel” - Structured Query Language
used in programming and
designed for managing data held in a relational database management system (RDBMS)
Слайд 5
![SQL SQL was initially developed at IBM by Donald D.](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/597297/slide-4.jpg)
SQL
SQL was initially developed at IBM by Donald D. Chamberlin
and Raymond F. Boyce after learning about the relational model from Ted Cod in the early 1970s. This version, initially called SEQUEL (Structured English Query Language), was designed to manipulate and retrieve data stored in IBM's original quasi-relational database management system, System R, which a group at IBM San Jose Research Laboratory had developed during the 1970s.[15]
Слайд 6
![SQL clauses - w3c site Sample: Web SQL Database https://www.w3schools.com/sql/trysql.asp?filename=trysql_select_all](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/597297/slide-5.jpg)
SQL clauses - w3c site
Sample:
Web SQL Database
https://www.w3schools.com/sql/trysql.asp?filename=trysql_select_all
Слайд 7
![SQL statements - w3c site Basic commands: CREATE TABLE, SELECT (JOINS) INSERT, UPDATE, DELETE](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/597297/slide-6.jpg)
SQL statements - w3c site
Basic commands:
CREATE TABLE, SELECT (JOINS) INSERT, UPDATE,
DELETE
Слайд 8
![SQL statements - CREATE TABLE Sample: CREATE TABLE Persons (](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/597297/slide-7.jpg)
SQL statements - CREATE TABLE
Sample:
CREATE TABLE Persons
(
PersonID int,
LastName varchar(255),
FirstName varchar(255),
Address varchar(255),
City
varchar(255)
);
Слайд 9
![SQL statements - INSERT Sample: INSERT INTO Customers (CustomerName, ContactName,](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/597297/slide-8.jpg)
SQL statements - INSERT
Sample:
INSERT INTO Customers (CustomerName, ContactName, Address, City, PostalCode,
Country)
VALUES ('Cardinal', 'Tom B. Erichsen', 'Skagen 21', 'Stavanger', '4006', 'Norway');
Слайд 10
![SQL statements - SELECT Sample: SELECT column1, column2, ... FROM table_name;](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/597297/slide-9.jpg)
SQL statements - SELECT
Sample:
SELECT column1, column2, ...
FROM table_name;
Слайд 11
![SQL statements - DELETE Sample: DELETE FROM table_name WHERE condition;](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/597297/slide-10.jpg)
SQL statements - DELETE
Sample:
DELETE FROM table_name WHERE condition;
Слайд 12
![SQL statements - Other Sample: Select top, Select into, Case,](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/597297/slide-11.jpg)
SQL statements - Other
Sample:
Select top,
Select into,
Case,
Null values, order by, group, by
Stored
procedures
Null values
Слайд 13
![SQL Database types Developed in 1970s to deal with first](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/597297/slide-12.jpg)
SQL Database types
Developed in 1970s to deal with first wave of
data storage applications
MySQL, Postgres, Microsoft SQL Server, Oracle Database
Слайд 14
![SQL Database types MySQL -> Postgres -> Microsoft SQL Server -> Oracle Database](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/597297/slide-13.jpg)
SQL Database types
MySQL -> Postgres -> Microsoft SQL Server -> Oracle
Database
Слайд 15
![MS SQL Server - Management Studio](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/597297/slide-14.jpg)
MS SQL Server - Management Studio
Слайд 16
![NoSQL Database types Document Graph Key-value . Wide-column](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/597297/slide-15.jpg)
NoSQL Database types
Document
Graph
Key-value .
Wide-column
Слайд 17
![NoSQL considerations Large volumes of rapidly changing structured, semi-structured, and](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/597297/slide-16.jpg)
NoSQL considerations
Large volumes of rapidly changing structured, semi-structured, and unstructured data
Agile
sprints, quick schema iteration, and frequent code pushes
Object-oriented programming that is easy to use and flexible
Geographically distributed scale-out architecture instead of expensive, monolithic architecture
Слайд 18
![NoSQL considerations Since its first MongoDB project in 2012, Baidu](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/597297/slide-17.jpg)
NoSQL considerations
Since its first MongoDB project in 2012, Baidu has grown
its cluster to 600 nodes storing 200 billion documents and 1PB of data, powering over 100 apps.
Слайд 19
![NoSQL Database types - Document Document databases pair each key](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/597297/slide-18.jpg)
NoSQL Database types - Document
Document databases pair each key with
a complex data structure known as a document. Documents can contain many different key-value pairs, or key-array pairs, or even nested documents.
Слайд 20
![NoSQL Database types - Graph stores Graph stores are used](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/597297/slide-19.jpg)
NoSQL Database types - Graph stores
Graph stores are used to store
information about networks of data, such as social connections. Graph stores include Neo4J and Giraph.
Слайд 21
![NoSQL Database types - Wide-column Wide-column stores such as Cassandra](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/597297/slide-20.jpg)
NoSQL Database types - Wide-column
Wide-column stores such as Cassandra and HBase
are optimized for queries over large datasets, and store columns of data together, instead of rows
Слайд 22
![NoSQL Database types - Key-value Key-value stores are the simplest](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/597297/slide-21.jpg)
NoSQL Database types - Key-value
Key-value stores are the simplest NoSQL
databases. Every single item in the database is stored as an attribute name (or 'key'), together with its value. Examples of key-value stores are Riak and Berkeley DB. Some key-value stores, such as Redis, allow each value to have a type, such as 'integer', which adds functionality.
Слайд 23
![NoSQL Mongo DB MongoDB uses JSON-like documents with schema.](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/597297/slide-22.jpg)
NoSQL Mongo DB
MongoDB uses JSON-like documents with schema.
Слайд 24
![NoSQL Mongo DB - Robomongo](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/597297/slide-23.jpg)
NoSQL Mongo DB - Robomongo
Слайд 25
![NoSQL Mongo DB - Robomongo](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/597297/slide-24.jpg)
NoSQL Mongo DB - Robomongo
Слайд 26
![NoSQL Mongo DB MongoDB uses JSON-like documents with schema.](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/597297/slide-25.jpg)
NoSQL Mongo DB
MongoDB uses JSON-like documents with schema.
Слайд 27
![NoSQL Mongo DB MongoDB uses JSON-like documents with schema.](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/597297/slide-26.jpg)
NoSQL Mongo DB
MongoDB uses JSON-like documents with schema.
Слайд 28
![NoSQL Mongo DB MongoDB uses JSON-like documents with schema.](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/597297/slide-27.jpg)
NoSQL Mongo DB
MongoDB uses JSON-like documents with schema.
Слайд 29
![Insert data](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/597297/slide-28.jpg)
Слайд 30
![NoSQL Mongo DB Query](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/597297/slide-29.jpg)
Слайд 31
![NoSQL Mongo DB](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/597297/slide-30.jpg)
Слайд 32
![NoSQL Mongo DB MongoDB stores data in flexible, JSON-like documents,](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/597297/slide-31.jpg)
NoSQL Mongo DB
MongoDB stores data in flexible, JSON-like documents, meaning fields
can vary from document to document and data structure can be changed over time.
MongoDB does support a rich, ad-hoc query language of its own.
Слайд 33
![Distributed databases Next generation of database evolution](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/597297/slide-32.jpg)
Distributed databases
Next generation of database evolution
Слайд 34
![CAP Theorem - Distributed databases Eric Allen Brewer The CAP](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/597297/slide-33.jpg)
CAP Theorem - Distributed databases
Eric Allen Brewer
The CAP theorem about
distributed network applications in the late 1990s
Слайд 35
![CAP Theorem - Distributed databases Consistency: Every read receives the](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/597297/slide-34.jpg)
CAP Theorem - Distributed databases
Consistency: Every read receives the most recent
write or an error
Availability: Every request receives a (non-error) response, without the guarantee that it contains the most recent write
Partition tolerance: The system continues to operate despite an arbitrary number of messages being dropped (or delayed) by the network between nodes
Слайд 36
![CAP Theorem - High Availability](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/597297/slide-35.jpg)
CAP Theorem - High Availability
Слайд 37
![CAP Theorem - High Consistency](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/597297/slide-36.jpg)
CAP Theorem - High Consistency
Слайд 38
![CAP Theorem - Partition tolerance](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/597297/slide-37.jpg)
CAP Theorem - Partition tolerance
Слайд 39
![CAP Theorem](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/597297/slide-38.jpg)
Слайд 40
![Cloud databases Azure SQL Database Aws (Amazon Aurora, Amazon Relational Database Service) Google cloud SQL Etc.](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/597297/slide-39.jpg)
Cloud databases
Azure SQL Database
Aws
(Amazon Aurora, Amazon Relational Database Service)
Google cloud
SQL
Etc.
Слайд 41
![Data modeling The data contained in the database The relationships](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/597297/slide-40.jpg)
Data modeling
The data contained in the database
The relationships between data
items
The constraints on data
Слайд 42
![Data modeling - 1 Numbers, Text, Images, Binary, Geo etc.](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/597297/slide-41.jpg)
Data modeling - 1
Numbers,
Text,
Images,
Binary,
Geo etc.
Слайд 43
![Data modeling - 2 ONE - ONE RELATIONS ONE-MANY RELATIONS MANY-TO-MANY RELATIONS](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/597297/slide-42.jpg)
Data modeling - 2
ONE - ONE RELATIONS
ONE-MANY RELATIONS
MANY-TO-MANY RELATIONS
Слайд 44
![Data modeling - 2 ONE - ONE RELATIONS](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/597297/slide-43.jpg)
Data modeling - 2
ONE - ONE RELATIONS
Слайд 45
![Data modeling - 2 2. ONE - MANY RELATIONS](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/597297/slide-44.jpg)
Data modeling - 2
2. ONE - MANY RELATIONS
Слайд 46
![Data modeling - 2 3. MANY- TO - MANY RELATIONS](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/597297/slide-45.jpg)
Data modeling - 2
3. MANY- TO - MANY RELATIONS
Слайд 47
![Data modeling - 3 The constraints on data not null](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/597297/slide-46.jpg)
Data modeling - 3
The constraints on data
not null - each value
in a column must not be NULL
unique - value(s) in specified column(s) must be unique for each row in a table
primary key - value(s) in specified column(s) must be unique for each row in a table and not be NULL; normally each table in a database should have a primary key - it is used to identify individual records
foreign key - value(s) in specified column(s) must reference an existing record in another table (via it's primary key or some other unique constraint)
check