3. Ø New SQL is a class of modern relational database
management system
Ø The same Scalable performance of NOSQL system for
Online transaction processing
Ø (read-write)workloads while still maintaining the
ACID guarantees of a traditional database system
WHAT IS NEW SQL
4. 1. New architecture : volt DB,
2. SQL engine : Toku DB , Scale DB
3. Transparent Sharing : Scale base , db shards
WHY DO WE NEED NEWSQL:
qThe same scalable performance of NOSQL for OLTP ,
and still maintaining the ACID with relations and
SQL
NEW SQL CATEGORIES
5. qRead data without blocking update
qEach transaction keeps a snapshot
qBy reading the snapshot gets a consistent view of the
database
Time
MVCC
(multi version concurrency control)
Snapshot
6. Provide concurrency control
Traditional relational db concurrency control
2 phase looking
New SQL DB concurrency control
MVCC(multi version concurrency control)
1. Optimistic concurrency control
2. Basic timestamp concurrency control
3. t/o with partition-level locking
4. And others
EX:google spanner,voltDB,memSQL
ARCHITECTURE: NEW SQL
7. Write latency
with the concurrency control , need more the time
to make sure the data is consistent
Can use in memory mechanism to help us reduce
latency , but restricted by memory size
DRAWBACK OF NEWSQL
8. A database trends to watch
New SQL is ACID complaint , SQLbased , scalable ,
distributed , highly available RDBMS system
NEWSQL database are become more demanded due
to the rice of data-oriented industries
availability
consistency
Partition
tolerance
10. The following is a short, incomplete history of the SQL
Standards – ISO/IEC 9075
1987 – Initial ISO/IEC Standard
1989 – Referential Integrity
1992 – SQL2
1995 SQL/CLI (ODBC)
1996 SQL/PSM – Procedural Language extensions
1999 – User Defined Types
2003 – SQL/XML
2008 – Expansions and corrections
2011 (or 2012) System Versioned and Application Time
Period Tables
SQL STANDARDS
11. Data stored in columns and tables
Relationships represented by data
Data Manipulation Language
Data Definition Language
Transactions
Abstraction from physical layer
SQL CHARECTERISTICS
12. Applications specify what, not how
Query optimization engine
Physical layer can change without modifying
applications
Create indexes to support queries
In Memory databases
SQL- PHYSICAL LAYER
ABSTRACTION
13. Data manipulated with Select, Insert, Update, &
Delete statements
Select T1.Column1, T2.Column2 …
From Table1, Table2 …
Where T1.Column1 = T2.Column1 …
Data Aggregation
Compound statements
Functions and Procedures
Explicit transaction control
DATA MINING LANGUAGE(DML)
14. Schema defined at the start
Create Table (Column1 Datatype1, Column2 Datatype
2, …)
Constraints to define and enforce relationships
Primary Key
Foreign Key
Etc.
Triggers to respond to Insert, Update , & Delete
Stored Modules
Alter …
Drop …
Security and Access Control
DTA DEFINATION LANGUAGE
15. Atomic – All of the work in a transaction completes
(commit) or none of it completes
Consistent – A transaction transforms the database
from one consistent state to another consistent state.
Consistency is defined in terms of constraints.
Isolated – The results of any changes made during a
transaction are not visible until the transaction has
committed.
Durable – The results of a committed transaction
survive failures
TRANSACTIONS- ACID Properties
16. Commercial
IBM DB2
Oracle RDMS
Microsoft SQL Server
Sybase SQL Anywhere
Open Source (with commercial options)
MySQL
Ingres
Significant portions of the
world’s economy use SQL databases!
SQL DATABASE Examples
17. INTRODUCTION:
q They also use non-SQL languages and
mechanism to interact with data.
q NOSQL database system arose alongside major
internet companies , such as Google , Amazon and
face book .
NO SQL DATABASE
18. Strong consistency:
All clients see the same version of data.
Highly available:
Data always available , at least one copy of there
quested data even if one of the nodes is down.
Partition –Tolerance:
The total system keeps its characteristics even
when being deployed on different servers
CHARACTERISTICS OF NOSQL
DATABASE
19. ü Large scale data processing.
ü Exploratory analytics on semi-structure data
(export level).
ü Large volume data storage.
PRIMARY UESE OF NON SQL
DATABASE
22. q This DMS store items as alpha-numeric
identifiers that refers to the key. Each key has
associated values.
q This value could be simple text strings or more
complex lists and sets.
q Search only performed against keys , and limited
to exact matches
KEY VALUE DATABASES
23. KEY VALUE DATA BASES:
Car
Key Attributes
1. Make: Nisan
Model: pathfinder
Color: green
Year: 2003
2. Make: Nisan
Model: pathfinder
Color: blue
Color: green
Year:2005
Transmission: auto
24. qDesigned to manage and store documents
qThese documents are encoded in a standard data
enhance format such as XML,JSON(java script option
notation) or BSON(binary JSON)
DOCUMENT DATABASES
25. Uses of documents:
Documents databases are good for storing
and managing Big Data-Size collections of literal
documents such as text documents email
messages
Collection of data
26. q It consist of a key-value pair where the value
consist of set of columns.
q The column family databases are represented in
tables , each key-value pair being a row.
q All the related data
can be grouped as one family.
COLUMN- FAMILY DATABASES
27. Uses of column family:
Large-scale , batch-oriented data processing.
Sorting , parsing , conversion:
- Conversions between hexadecimal , binary and
decimal code values
Exploratory and predictive analytics performed expert
statistics
28. 1234
name Martin
Billing address Data
payment data
Odr 1001 Data
Odr 1002 Data
Odr 1003 Data
Odr 1004 data
Column key Column value
Row key
29. Graph database are useful when are you more interested
in relationship between data then the data itself and it
perfectly for social network.
GRAPH DATABASES
32. SQL NOSQL
Relational database No-relational , distributed databases
Relational model Model-less approach
Pre- defined schema Dynamic schema for unstructured data
Uses SQL Uses Un SQL (Unstructured query
language)
Not preferred for large databases Largely preferred for large datasets
Emphasis on ACLD properties Follows browser’s CAP theorem
Excellent support from vendors Relies heavily on community support
Supports complex querying and data
keeping needs
Does not have good support for complex
querying
EX:Oracle,DB2,MySQL,MS SQL ,
PostgreSQL
EX:MonogoDB,Hbase,Cassandra,Radis,Ne
o4j,CouchDb,Couchbase,Risk Etc….