Coder Social home page Coder Social logo

cse5335-rxd0807-2's Introduction

                            CSE 5335
                        WEB DATA MANAGEMENT

                            PROJECT 2

NAME: REHANA DEVANI ID: 1001100807 NET ID: rxd0807

  1. What is your external data source used to populate your Heroku data sources?

I downloaded CSV file which has the attributes ID, first name, last name, company name, address, city, county, state and zip. I stored it in the folder along with all the Node.js scripts for creating, inserting and retrieving records. Later I gave the path of my csv file (for Postgres) and JSON file (for Mongodb and Redis).

  1. What are the Heroku toolbelt commands to execute the scripts?

Run the following commands to create,insert and retrieve data from Postgres database:

node createPostgres.js

node postgres-insert.js

node postgres-retrieve-pk.js

node postgres-retrieve-city.js

npm install prompt

node prompt-postgres-pk.js

node prompt-postgres-city.js (Enter city as New York)

Run the following commands to create,insert and retrieve data from MongoDB database:

npm install mongodb

node mongodb-insert.js

node mongodb-retrieve-pkey.js

node mongodb-retrieve-city.js

npm install prompt

node mongodb-prompt-pkey.js

node mongodb-prompt-city.js (Enter city as New York)

Run the following commands to create,insert and retrieve data from Redis database:

npm install redis

npm install prompt

npm install redis-scanstreams

npm install stream-to-array

node redis-insert.js

node redis-retrieve-pkey.js

node redis-retrieve-city.js

node redis-prompt-pkey.js

node redis-prompt-city.js (Enter city as New York)

Following commands were used to commit, push the code to heroku and to push to an existing repository on command line

// Manages the set of repositories ("remote") whose branches you track - $ git remote -v

// Adds file's content to the index - $ git add .

// It commits or saves the changes made - $ git commit -m β€œDemo”

// It pushes the code to Heroku after committing - $ git push heroku master

// Pushing an existing repository to github from command line - git remote add origin https://github.com/DevaniRehana/cse5335-rxd0807-2.git

  • git push -u origin master
  1. What aspect of the implementation did you find easy, if any, and why?

I found inserting data in all the three databases (i.e PostgreSQL, mongoDB and Redis) quite easy. Retrieving data from PostgreSQL and mongoDB using primary key and non-primary key was easy to implement once I understood about how it works for one database.

  1. What aspect of the implementation did you find hard, if any, and why?

Retrieving data from Redis database using primary and non-primary key was time-consuming because redis stores data in the form of key and value pairs.

I was able to retrieve it later by using a scan function which retrieves all the elements and then I looped through it to find the key value pair which matched the output I desired and retrieved those key value pairs. desired output.

cse5335-rxd0807-2's People

Contributors

zeke avatar hunterloftis avatar jonmountjoy avatar raul avatar samccone avatar theneva avatar friism avatar r0mdau avatar

Watchers

James Cloos avatar  avatar Steve Emmons avatar

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.