GithubHelp home page GithubHelp logo

aliciav-texas / databasehelpers Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jackpronske/databasehelpers

0.0 0.0 0.0 655 KB

A Practice Repo meant for helping engineers work through different query calls within both relational and non-relational databases.

HTML 2.58% JavaScript 93.72% CSS 3.70%

databasehelpers's Introduction

DataBaseHelpers

A Practice Repo meant for helping engineers work through different CRUD within both relational and non-relational databases.

Tech-Stack :

  • React
  • Webpack / Babel
  • Jquery / Axios
  • Node / Express
  • MySQL DBMS
  • Mongo DBMS

 

Getting Started

  • npm install to install all our dependencies for the application.
  • npm run build to bundle our files with Webpack
  • npm start to start the node/express server

 

This application is a simple Address Book that has CRUD functionality to view, post, edit and delete new contacts. Clicking on a name will load that contact's information, with options to delete or edit. Feel free to play around with this front end, specifically checking out the console logs and methods on App.js to really see what is happening underneath the hood. Front end code is important, but you'll be focusing mainly on the back end, with some slight changes in front end as needed (re-rendering state in the success of an http request). All the http requests are currently functioning and will send the appopriate information to the server to then be manipulated by you.

You have Dummy data provided for you via the dummyContacts.js file, it is advised that you base your database schemas/tables off of this template.

 

Setting up your connection

  • You have a choice from the get go to start with either MongoDB or MySQL, however you'll need to fill in some information to get these databases running on your local machine. The CRUD functionality is simple enough to work with both relational and non-relational databases.

  • Make sure to import the correct database directory into your server so you have access to the correct database query methods.

    • MySQL:

      • fill out the schema.sql with the correct information to create a Database and Table with the appropriate column names.
      • feel free to also write some INSERT statements in that file to populate your table with some data to manipulate.
      • terminal command to run the schema file is: mysql -u /username/ -p < schema.sql
    • MongoDB:

      • make sure you're connecting to the correct database, then fill out the Contact schema with the appropraite information based on your dummy data.

 

Writing your queries

  • On both mysql and mongo, you have the getContacts method written out for you, it is your job to write out the post, delete and update requests using the getContacts as a soft guide, as well as diving into the documentation for the specific technology you're using.

  • Don't delete code when refactoring to the next DBMS! There are two DB directories, so you can refactor without having to delete code. The only place where you may need to comment out code is in your server index when you're changing the DB method names. This will be useful for later, when you can have a quick reminder of setting up both types of dbs in one repo.

databasehelpers's People

Contributors

jackpronske 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.