WEEK 1, DAY 2 STEVE CHENOWETH CSSE DEPT CSSE 533 –INTRO TO MONGODB.

Slides:



Advertisements
Similar presentations
Introduction to MongoDB
Advertisements

PHP Hypertext Preprocessor Information Systems 337 Prof. Harry Plantinga.
Chapter 15 © 2010 by Addison Wesley Longman, Inc Origins and Uses of Ruby - Designed by Yukihiro Matsumoto; released in Use spread rapidly.
1 More MongoDB: Ch 3- 8, plus a little Hadoop CSSE 533 Week 2, Spring, 2015.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 14 Web Database Programming Using PHP.
Designing a Database Unleashing the Power of Relational Database Design.
Multiple Tiers in Action
Performed by:Gidi Getter Svetlana Klinovsky Supervised by:Viktor Kulikov 08/03/2009.
Building applications with MongoDB – An introduction Roger
Jeff Lemmerman Matt Chimento Medtronic Confidential 1 9th Annual CodeFreeze Symposium Medtronic Energy and Component Center.
MBAC 611.  We have been using MS Access to query and modify our databases.  MS Access provides a GUI (Graphical User Interface) that hides much of the.
A Social blog using MongoDB ITEC-810 Final Presentation Lucero Soria Supervisor: Dr. Jian Yang.
VICTORIA UNIVERSITY OF WELLINGTON Te Whare Wananga o te Upoko o te Ika a Maui SWEN 432 Advanced Database Design and Implementation MongoDB Read Lecturer.
VICTORIA UNIVERSITY OF WELLINGTON Te Whare Wananga o te Upoko o te Ika a Maui SWEN 432 Advanced Database Design and Implementation MongoDB Data Modeling.
CSSE 533 – Database Systems Week 1, Day 1 Steve Chenoweth CSSE Dept.
Structured Query Language (SQL) A2 Teacher Up skilling LECTURE 2.
MICROSOFT ACCESS Pn. Jamilah Binti Yusof. DEFINITION A database is the computer equivalent of an organized list of information. Typically, this information.
How a little code can help with support.. Chris Barba – Developer at Cimarex Energy Blog:
MONGODB NOSQL SERIES Karol Rástočný 1. Prominent Users 2  AppScale, bit.ly, Business Insider, CERN LHC, craigslist, diaspora, Disney Interactive Media.
AL-MAAREFA COLLEGE FOR SCIENCE AND TECHNOLOGY INFO 232: DATABASE SYSTEMS CHAPTER 7 INTRODUCTION TO STRUCTURED QUERY LANGUAGE (SQL) Instructor Ms. Arwa.
MongoDB An introduction. What is MongoDB? The name Mongo is derived from Humongous To say that MongoDB can handle a humongous amount of data Document.
Internet Forms and Database Bob Kisel Amgraf, Inc.
Chapter 15: Using LINQ to Access Data in C# Programs.
NoSQL continued CMSC 461 Michael Wilson. MongoDB  MongoDB is another NoSQL solution  Provides a bit more structure than a solution like Accumulo  Data.
WTT Workshop de Tendências Tecnológicas 2014
PHP meets MySQL.
Goodbye rows and tables, hello documents and collections.
Web Design: Basic to Advanced Techniques Fall 2010 Mondays 7-9pm 200 Sutardja-Dai Hall Databases & SQL Lecture Code:
INFO 344 Web Tools And Development CK Wang University of Washington Spring 2014.
1 Working with MS SQL Server Textbook Chapter 14.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Working with MSSQL Server Code:G0-C# Version: 1.0 Author: Pham Trung Hai CTD.
NOSQL DATABASES Please remember to read the NOSQL Distilled book and the Seven Databases book.
TUTORIAL 10: PROGRAMMING WITH JAVASCRIPT Session 2: What is JavaScript?
Creating Dynamic Web Pages Using PHP and MySQL CS 320.
Web Scripting [PHP] CIS166AE Wednesdays 6:00pm – 9:50pm Rob Loy.
20-753: Fundamentals of Web Programming 1 Lecture 12: Javascript I Fundamentals of Web Programming Lecture 12: Introduction to Javascript.
1.NET Web Forms Business Forms © 2002 by Jerry Post.
Database Concepts CPTE 212 3/19/2015 John Beckett.
Just a Little PHP Programming PHP on the Server. Common Programming Language Features Comments Data Types Variable Declarations Expressions Flow of Control.
1 MONGODB: CH ADMIN CSSE 533 Week 4, Spring, 2015.
Overview of Form and Javascript fundamentals. Brief matching exercise 1. This is the software that allows a user to access and view HTML documents 2.
Forms Collecting Data CSS Class 5. Forms Create a form Add text box Add labels Add check boxes and radio buttons Build a drop-down list Group drop-down.
MongoDB First Light. Mongo DB Basics Mongo is a document based NoSQL. –A document is just a JSON object. –A collection is just a (large) set of documents.
03 | Express and Databases
Just a Little PHP Programming PHP on the Server. Common Programming Language Features Comments Data Types Variable Declarations Expressions Flow of Control.
IST 220 – Intro to Databases Lecture 2 Touring Microsoft Access.
Open Source Server Side Scripting ECA 236 Open Source Server Side Scripting PHP Basics.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 14 Web Database Programming Using PHP.
Introduction to MongoDB. Database compared.
You Inherited a Database Now What? What you should immediately check and start monitoring for. Tim Radney, Senior DBA for a top 40 US Bank President of.
COMP 430 Intro. to Database Systems MongoDB. What is MongoDB? “Humongous” DB NoSQL, no schemas DB Lots of similarities with SQL RDBMs, but with more flexibility.
Mongo Database (Intermediate)
MongoDB Er. Shiva K. Shrestha ME Computer, NCIT
Dineesha Suraweera.
MongoDB CRUD Operations
javascript for your data
MongoDB for the SQL DBA.
Advanced Topics in Concurrency and Reactive Programming: MongoDB, Mongoose Majeed Kassis.
Intro to Relational Databases
Web DB Programming: PHP
CMPE 280 Web UI Design and Development October 18 Class Meeting
Data Management Innovations 2017 High level overview of DB
Lecture 2 Database & SQL Continued
CSE 482 Lecture 5: NoSQL.
CS5220 Advanced Topics in Web Programming Introduction to MongoDB
Building applications with MongoDB – An introduction
CS3220 Web and Internet Programming SQL and MySQL
NoSQL & Document Stores
Server & Tools Business
Presentation transcript:

WEEK 1, DAY 2 STEVE CHENOWETH CSSE DEPT CSSE 533 –INTRO TO MONGODB

2 2 THE ORIGINAL MONGO IN ACTION From Mel Brooks’ “Blazing Saddles” (1974) Played by former Detroit Lion Alex Karras. And – he was “humongous”

3 3 DOCUMENTS INSTEAD OF SQL ROWS { “greeting” : “Hello world”} An ordered set of keys with values. Thus, fits in with how Hadoop works, for example! Most documents have multiple keys & values: { “greeting” : “Hello world”, “foo” : 3} The “values” can be lots of different types! But the keys are strings! With a few restrictions (see p 8) MongoDB is type and case sensitive. Can’t duplicate keys in a single document. The ordering is important. This is “BSON”, like “JSON”.

6 6 COLLECTIONS INSTEAD OF TABLES With a dynamic schema. Different kinds of documents can go in a single collection. So why have multiple collections? (See p 9.) The name of a collection is also a valid string. You can make subcollections, like: blog.post But to MongoDB, these are all separate collections. To create a new collection, do something like: > db.createCollection("mycollection")

7 7 DATABASES Like in relational systems, A single instance of a DBMS can have many DB’s in it. MongoDB databases also have string names. And a max of 64 bytes long. Databases also are used to save system stuff: admin is the “root” database. local puts things on a single server. config saves info about “shards” in a shared server setup.

8 8 HOW TO GET & STARTUP MONGODB pp Widely considered to be “easy”. Comes with a shell (p 13): After starting mongoDB: $ mongo … > It’s a javascript interpreter.

9 9 TYPICAL SHELL USE Pick your db: > use foobar Pick your collection: > db.baz Do something to it, like CRUD: > post = {“title” : “My Blog Post”, … “content” : “Here’s my blog post”, … “date” : new Date()} - at which point the shell repeats the data, filling in the date - Then, to insert it, > db.blog.insert(post)

10 MORE TYPICAL CRUD OPS > db.blog.find() or > db.blog.find(query) > db.blog.findOne() > db.blog.remove({title : “My Blog Post”}) > post.comments = [] > db.blog.update({title : “My Blog Post”}, post) Adds a key for “comments” to this document. Lots more on this in Ch 3. More on querying in Ch 4

11 BASIC DATA TYPES All the JSON types, plus a few more: Null Boolean Number (floating or integer) String Date Regular expression Array Embedded document Object id – every document has a 12-byte “_id” key. Unique within a collection. Binary data Code (arbitrary JavaScript)

12 EXAMPLES Arrays {“things” : [“pie”, 3.14]) Embedded documents – see slide 4 ObjectIds Created by the machine. The 12 bytes are: | | 7 8 | Timestamp Machine PID Increment Created client-side with a document.

13 MORE ON THE SHELL Can connect to other mongod’s Help – includes typing functions to see how they work. (JavaScript) Can pass.js scripts to the shell. Shortcuts built-in, like: show collections - for db.getCollectionNames() Startup file –.mongorc.js Customized prompts Can only edit current line! For more complex entries – use an editor.

14 PRETTY GOOD WAYS TO START From Mohamed Zahran, NYU – See Moodle Talks about how to get started with apps From Susan B. Davidson, Univ of Pennsylvania – See Moodle Positions MongoDB in the DBMS panoply

15 ADDITIONAL INTERESTING INFO There are interfaces for using R with MongoDB! See, for example, ME.html ME.html tes/rmongodb_introduction.html tes/rmongodb_introduction.html tes/rmongodb_cheat_sheet.pdf tes/rmongodb_cheat_sheet.pdf