CS422 Principles of Database Systems Introduction to NoSQL Chengyu Sun California State University, Los Angeles.

Slides:



Advertisements
Similar presentations
Data Management in the Cloud Paul Szerlip. The rise of data Think about this o For the past two decades, the largest generator of data was humans -- now.
Advertisements

Introduction to Backend James Kahng. Install Node.js.
NoSQL and NewSQL Justin DeBrabant CIS Advanced Systems - Fall 2013.
Neo4j Adam Foust.
CS 405G: Introduction to Database Systems 24 NoSQL Reuse some slides of Jennifer Widom Chen Qian University of Kentucky.
A Social blog using MongoDB ITEC-810 Final Presentation Lucero Soria Supervisor: Dr. Jian Yang.
Databases Dan Otero Alex Loddengaard
1 Yasin N. Silva Arizona State University This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Hadoop Team: Role of Hadoop in the IDEAL Project ●Jose Cadena ●Chengyuan Wen ●Mengsu Chen CS5604 Spring 2015 Instructor: Dr. Edward Fox.
AN INTRODUCTION TO NOSQL DATABASES Karol Rástočný, Eduard Kuric.
Systems analysis and design, 6th edition Dennis, wixom, and roth
WTT Workshop de Tendências Tecnológicas 2014
Goodbye rows and tables, hello documents and collections.
Modern Databases NoSQL and NewSQL Willem Visser RW334.
NoSQL Databases NoSQL Concepts SoftUni Team Technical Trainers Software University
Changwon Nati Univ. ISIE 2001 CSCI5708 NoSQL looks to become the database of the Internet By Lawrence Latif Wed Dec Nhu Nguyen and Phai Hoang CSCI.
Database Essentials. Key Terms Big Data Describes a dataset that cannot be stored or processed using traditional database software. Examples: Google search.
CSE 3330 Database Concepts MongoDB. Big Data Surge in “big data” Larger datasets frequently need to be stored in dbs Traditional relational db were not.
MongoDB is a database management system designed for web applications and internet infrastructure. The data model and persistence strategies are built.
Introduction to MongoDB
CS779 Term Project Steve Shoyer Section 5 December 9, 2006 Week 6.
Introduction.  Administration  Simple DBMS  CMPT 454 Topics John Edgar2.
NoSQL Or Peles. What is NoSQL A collection of various technologies meant to work around RDBMS limitations (mostly performance) Not much of a definition...
NOSQL DATABASE Not Only SQL DATABASE
Some notes on NoSQL, in particular MongoDB Bettina Berendt (with thanks to Matthijs van Leeuwen for some of the slides) 8 December 2015.
NoSQL databases A brief introduction NoSQL databases1.
Introduction to Core Database Concepts Getting started with Databases and Structure Query Language (SQL)
CS422 Principles of Database Systems Introduction to NoSQL Chengyu Sun California State University, Los Angeles.
Group members: Phạm Hoàng Long Nguyễn Huy Hùng Lê Minh Hiếu Phan Thị Thanh Thảo Nguyễn Đức Trí 1 BIG DATA & NoSQL Topic 1:
1 Section 1 - Introduction to SQL u SQL is an abbreviation for Structured Query Language. u It is generally pronounced “Sequel” u SQL is a unified language.
1 Gaurav Kohli Xebia Breaking with DBMS and Dating with Relational Hbase.
Introduction to Mongo DB(NO SQL data Base)
Neo4j: GRAPH DATABASE 27 March, 2017
CS 405G: Introduction to Database Systems
NO SQL for SQL DBA Dilip Nayak & Dan Hess.
NoSQL: Graph Databases
DBSI Teaser Presentation
and Big Data Storage Systems
Chengyu Sun California State University, Los Angeles
NoSQL Databases NoSQL Concepts Databases Telerik Software Academy
Cloud Computing and Architecuture
CS320 Web and Internet Programming SQL and MySQL
CSE 775 – Distributed Objects Bekir Turkkan & Habib Kaya
CS122B: Projects in Databases and Web Applications Winter 2017
Based on: NoSQL Databases Based on:
CS422 Principles of Database Systems Course Overview
Introduction In the computing system (web and business applications), there are enormous data that comes out every day from the web. A large section of.
MongoDB Er. Shiva K. Shrestha ME Computer, NCIT
Modern Databases NoSQL and NewSQL
NOSQL.
NOSQL databases and Big Data Storage Systems
1 Demand of your DB is changing Presented By: Ashwani Kumar
11/18/2018 2:14 PM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN.
Intro to NoSQL Databases
Intro to NoSQL Databases
NoSQL Databases Antonino Virgillito.
Intro to NoSQL Databases
CSE 482 Lecture 5: NoSQL.
Introduction of Week 11 Return assignment 9-1 Collect assignment 10-1
relational thoughts on NoSql
CS5220 Advanced Topics in Web Programming Introduction to MongoDB
Cloud Computing for Data Analysis Pig|Hive|Hbase|Zookeeper
CS3220 Web and Internet Programming SQL and MySQL
Database Management Systems
Introduction to Data Science
CMPE 280 Web UI Design and Development March 14 Class Meeting
CS3220 Web and Internet Programming SQL and MySQL
NoSQL databases An introduction and comparison between Mongodb and Mysql document store.
Intro to NoSQL Databases
Presentation transcript:

CS422 Principles of Database Systems Introduction to NoSQL Chengyu Sun California State University, Los Angeles

The Need for NoSQL Big Data Semi-structured Data Large-scale Parallel Processing

Is CSNS Big? Database 112 tables 1.6 million records 260 MB (including indexes) Files 327, GB Data collected on 11/29/2015

Some Data Are Definitely Big Google processed 24 PB data per day in 2009 Facebook had 1.5 PB photos and 60 billion images in 2009 As of 7/1/2015, the Internet Archive Wayback Machine contains 23 PB data and grows at a rate of TB per week

How Big Is Big? Currently any data set over a few TB is considered big data Data size large enough to span several storage units Traditional RDBMS starts to show signs of stress

Semi-Structured Data Data that has some structure but does not conform strictly to a schema Data may be irregular or incomplete Structure may change rapidly or unpredictably

Semi-Structured Data Example: HTML Pages Many HTML pages have a structure: header, footer, menu, title, content … But many don’t And those that do implement the structure in all kinds of different ways HTML5 introduces many new tags New data, e.g. Same data now under different tags, e.g. vs.

The “Web Scale” Google (2012) 3.3 billion search per day Twitter (2013) 500 million tweets per day Facebook (4/2015) 936 million daily active users

Scalability The ability of a system to increase throughput with addition of resources to address load increases Vertical Scaling – faster CPUs, more memory, bigger hard drives … Horizontal Scaling – add more nodes to server clusters

Why Not RDBMS? Its strengths are also its weakness StrengthWeakness Schema Clearly defines data and relationship; ensures data quality and integrity. Not suitable for semi- structured data. ACID Guarantees the correctness of the operations and the durability of the data. Makes it very difficult to scale SQL One language for all data and all RDBMS. Impedes rapid application development (RAD) due to the mismatch between SQL and the application languages.

NoSQL No SQL, Not Only SQL, Not Relational … A term that describes a class of data storage and manipulation technologies and products that do not follow the RDBMS principles and focus on large datasets, performance, scalability, and agility.

Types of NoSQL Databases Key-Value Stores Column Family Stores Graph Databases Document Databases

Key-Value Stores Simple, fast, scalable ProductUsed By RedisTwitter, GitHub, Snapchat, Craigslist DynamoEA, New York Times, HTC CassandraFacebook, Twitter, Reddit VoldemortLinkedin

Column Family Stores Data is stored in a column-oriented way as opposed to the row-oriented format in RDBMS ProductUsed By BigTableGoogle HBaseFacebook, Yahoo, Hulu and others HypertableBaidu, Rediff

Column and Column Family Columns: first_name, last_name, gender, occupation, zip_code Column families name : first_name, last_name profile : gender, occupation location : zip_code Column families typically need to be pre- defined while new columns can be added at any time

Units of Data row-key: 1 first_name: John last_name: Doe gender: male zip_code: row-key: 2 first_name: Jane zip_code: 10002

Data Storage row-key: 1 first_name: John last_name: Doe row-key: 2 first_name: Jane row-key: 1 zip_code: row-key: 2 zip_code: row-key: 1 gender: male namelocationprofile

Graph Databases Stores vertices (i.e. entities) and edges (i.e. relationships between vertices) Optimized for graph storage and processing ProductUsed By Neo4jInfoJobs, Addidas

Document Databases A document in a document database consists of a loosely structured set of key-value pairs. ProductUsed By MongoDBFacebook, Craigslist, Adobe CouchDBApple, BBC

“Document” Example { ‘first_name’: ‘John’, ‘last_name’: ‘Doe’, ‘age’: 20, ‘address’: { ‘street’: ‘123 Main’ ‘city’: ‘Los Angeles’ ‘state’: ‘CA’ } It’s really an object!

Objects in JavaScript (I) A JavaScript object consists of a set of properties which can be added dynamically var car = new Object(); car.make = ‘Honda’; car.model = ‘Civic’; car.year = 2001; var owner = new Object(); owner.name = ‘Chengyu’; car.owner = owner;

Objects in JavaScript (II) Object Literal var car = { make: ‘Honda’, model: ‘Civic’, year: 2001, owner: { name: ‘Chengyu’ } };

Objects in JavaScript (III) JSON (JavaScript Object Notation) var car = { ‘make’: ‘Honda’, ‘model’: ‘Civic’, ‘year’: 2001, ‘owner’: { ‘name’: ‘Chengyu’ } };

NoSQL Database Example: MongoDB

MongoDB Server DB Database Collection

MongoDB Shell > mongo A command line client that provides an interactive JavaScript interface to MongoDB

Basic MongoDB Shell Commands help show dbs use Switch to database won’t be created until some data is inserted into it show collections db.dropDatabase()

Some Collection Methods db..insert() db..update() db..save() db..find() db..remove()

Basic CRUD Operations Create a database test1 Create two documents (i.e. objects or records) John and Jane Save the two documents to a collection users Query the collection

Using find() find( query, projection ) Both query and projection are documents in the form of { field1:, field2: … }

Query Examples List all users Find the users whose first names are John Find the first names of the users whose last names are Doe Find the users who are older than 20 Find the users who are older than 20 and younger than 30 Find the users who are younger than 20 or older than 30 Find the users who live in CA

Programming Language Support Drivers for various server-side programming language – rivers/ rivers/

Readings Professional NoSQL by Shashank Tiwari MongoDB Manual -