Coder Social home page Coder Social logo

wbleonard / mongodb_ageneralpurposedb Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rwaltersma/mongodb_ageneralpurposedb

0.0 1.0 1.0 3.21 MB

A website that demonstrates that MongoDB is a general purpose database

JavaScript 23.32% HTML 75.40% CSS 1.28%

mongodb_ageneralpurposedb's Introduction

MongoDB - A General Purpose DB

The code behind a website that demonstrates MongoDB is a general purpose database: http://www.mygiantidea.com

Introduction

Getting Started

To install locally run npm install

You should have a MongoDB instance available and the Yelp database loaded. This demo database is not included in this repository due to the size.

Create a .env file which contains the connection credentials to your local MongoDB instance (see dotenv). The contents of the file should be similar to the following:

    DB_HOST=127.0.0.1
    DB_PORT=27017
    DB_NAME=yelp
    DB_USERNAME=webuser
    DB_PASSWORD=webpassword

To run node app.js

Creating Indexes and Other Setup Tasks

Text Search example requires an index. Create one from the shell using:

db.business.createIndex({name:'text'})

GraphLookup benefits greatly from a single field index. Create one from the shell using:

db.users.createIndex({user_id:1})

For Geospatial queries to work, a schema change is needed. A special 2dsphere index needs an object that adheres to the GeoJSON standard. For this you will need to execute our helper script that will copy the longitude and latitude fields into an object called location. Inside location we will have a type: "Point" and an array called coordinates with the longitude and latitude as the only 2 elements.

node config/yelp_prep.js

This will run against all 174K docs under the business collection. Once this completes you can now create the 2dsphere index. Create one from the shell using:

db.business.createIndex({location:'2dsphere'})

Known Issues & Limitations

List of issues, Limitations, and to-dos.

All issues and limitations have moved to the Issues part of this repo.

Contacts

For technical questions, issues or just comments please post in the Issues section on GitHub.

Disclaimer

This software is not supported by MongoDB, Inc. under any of their commercial support subscriptions or otherwise. Any usage of MongoDB_AGeneralPurposeDB is at your own risk. Bug reports, feature requests and questions can be posted in the Issues section on GitHub.

mongodb_ageneralpurposedb's People

Contributors

rwaltersma avatar wbleonard avatar fullaware avatar mchinnasamy avatar

Watchers

James Cloos avatar

Forkers

jchenj

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.