01 nosql and multi model database
TRANSCRIPT
لقاءات الخلیل التقنیةHebron Tech Meetup
Multi-model NoSQL database
Hebron Tech Meetup / 13-02-2016
TopicsThis is slides is presented at “Hebron Tech meetup “ https://www.facebook.com/groups/659298460875650/
1- What is nosql?
Introduction about nosql database , categories of them , and use-cases .
2- introduction to multi-model database.
how it works, explain relationships , and examples.
3- Demo
Open your browser and get you hands dirty with orientDb
This template is free to use under Creative Commons Attribution license. If you use the graphic assets (photos, icons and typographies) provided with this presentation you must keep the Credits slide.
Hello!I am Mahdi AtawnaI am here because I love to give presentations.
You can find me at:
@mshanak
1.What is NOSQL
introduction about NOSQL types and use-casesBY: Shadi atawna
What is Problem of RDBMS?
▷ Schemas aren’t designed for Sparse data.▷ Normalize, creates a lot of tables .▷ Joins can be prohibitively expensive
What is Problem of RDBMS?
▷ Don’t do unstructured data search well (i.e. google type searching)
▷ databases are simply not designed to be distributed○ Don’t Scale well.
○ clustering is not dynamic and expensive.
▷ Class of non-relational data storage systems
▷ Running well on clusters (distributed)▷ Mostly open-source▷ Built for the 21st century web needs .▷ Schema-less
What is NoSQL?
Why NoSQL?
1. Big Users2. Big Data3. The Internet of things4. The Cloud Computing5. Scalability and Performance Advantages6. Flexible Data Model
Types/Models of NoSQL:
1. Key value Databases2. Document Databases3. Column family Stores4. Graph Databases
Types/Models of NoSQL:
1. Key value Databases2. Document Databases3. Column family Stores4. Graph Databases
1Document Databases
a computer program designed for storing, retrieving, and managing document-oriented information, also known as semi-structured data.
Document Databases
Document Databases Example
Document DatabasesFeatures:
1. Making the value visible for query2. Flexible schema3. Semi-Structured.
Limitations:
1. not handling transaction on multiple document.
Use Cases:
1. event logging2. Content management systems, blogging platforms
2Graph Databases
a database that uses graph structures for semantic queries with nodes, edges and properties to represent and store data.
Graph vs RDBMS
A Graph Database creates the relationship just once (when the edge is created)
VS
RDBMS computes the relationship every time you query a database
App with many databases
2.Multi-model database
“A multi-model database combines a
document store with a graph database and is at the same time a
key/value store,
“
Benefits
1. Just one product to learn and maintain2. Just one vendor relationship to manage3. No ETL, no synchronization required4. Performance and Reliability is easy to test
from the beginning
graph example
Popular multi-model databases
http://orientdb.com/orientdb/ https://www.arangodb.com/
OrientDb: Queries
Orient DB uses SQL as it's query language and adds some extensions to enable graph functionality.
1. SQL is the mostly widely recognized standard.2. The majority of developers have experience and
are comfortable with SQL
OrientDb: Select
OrientDb: query examples
> SELECT FROM MyClass WHERE id = 1
> SELECT FROM User WHERE name LIKE 'mahdi%'
> SELECT SUM(salary) FROM Employee WHERE age < 40 GROUP BY job
OrientDb: INSERT
> INSERT INTO Employee(name, surname, gender) VALUES ('Jay', 'Miner', 'M')
> INSERT INTO Employee CONTENT { name : 'Jay',
surname : 'Miner', gender : 'M'
}
OrientDb: JoinsSQL:SELECT *FROM Employee A, City BWHERE A.city = B.idAND B.name = 'Rome'
OrientDb:SELECT * FROM Employee WHERE city.name = 'Rome'
OrientDb: Create Relations
CREATE EDGE FROM #10:3 TO #11:4
CREATE EDGE friends FROM #10:3 TO #11:4
OrientDb: Query Relations/ TRAVERSE
TRAVERSE * FROM #10:1234
TRAVERSE friends FROM #10:1234 WHILE $depth <= 3
TRAVERSE in(“friends”) FROM #10:1234 WHILE $depth <= 3
Query Relations - TRAVERSE
SELECT FROM (TRAVERSE friends FROM #10:1234 )
WHERE city = 'Rome'
-----------------------select from
( traverse in("livedIn") from #15:2 ) where @class="teacher"
3.Demo
Credits
Special thanks to all the people who made and released these awesome resources for free:
▷ Presentation template by SlidesCarnival▷ Photographs by Unsplash