Giter Club home page Giter Club logo

pg-walkthrough's Introduction

Author: @shiryz

Maintainer: TBC

Getting Started

Clone this repo: git clone https://github.com/foundersandcoders/pg-walkthrough.git

Learning Outcomes

Building a database

  • Creating a build script in an .sql file
  • Using the DROP and IF EXISTS commands, for use on a test database
  • What cascade is for and when to use it
  • Execute a transaction using BEGIN & COMMIT

Connecting to a database

  • Connecting to a PostgreSQL server from a node server, including the setup of environment variables (heroku)

Running queries in Node

  • Understanding what a connection pool is and how to initialise and configure one using pg
  • Using pool.query with callbacks, to execute single queries to the database
  • Using parameterised queries (to prevent SQL injection)
  • Serving the query results to the front end

Postgres Connection Walkthrough

This exercise is designed to get you familiar with connecting to a database, querying it and viewing that information. We'll be using the npm module pg to connect our node server to a locally-hosted Postgres database.

Inspired by Matthew Glover and his awesome pg-app

pg-walkthrough's People

Contributors

macintoshhelper avatar shiryz avatar alice-carr avatar susanx avatar jsms90 avatar emilyb7 avatar lucyewright avatar mattlub avatar eliasmalik avatar teenie-quaggard avatar marwa7med avatar m4v15 avatar zooeymiller avatar tloth avatar

Watchers

James Cloos 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.