GithubHelp home page GithubHelp logo

jeffbutlerspringdale / node-db-challenge Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bloominstituteoftechnology/node-db-challenge

0.0 1.0 0.0 44 KB

Sprint Challenge for Adding Persistence to Web APIs Sprint

JavaScript 100.00%

node-db-challenge's Introduction

Sprint Challenge: Node DB Sprint

Description

In this challenge, you design and build a Data Model and a RESTful API that stores data into a Relational Database.

Instructions

Read these instructions carefully. Understand exactly what is expected before starting this Sprint Challenge.

This is an individual assessment, please work on it alone. It is an opportunity to demonstrate proficiency in the concepts and objectives introduced and practiced in preceding days.

If the instructions are not clear, please seek support from your TL and Instructor on Slack.

The Minimum Viable Product must be completed in three hours.

Follow these steps to set up and work on your project:

  • Create a forked copy of this project.
  • Add your Team Lead as collaborator on Github.
  • Clone your forked version of the Repository.
  • Create a new Branch on the clone: git checkout -b firstName-lastName.
  • Implement the project on this Branch, committing changes regularly.
  • Push commits: git push origin firstName-lastName.

Follow these steps for completing your project.

  • Submit a Pull-Request to merge firstName-lastName Branch into master on your fork, don't make Pull Requests against Lambda's repository.
  • Please don't merge your own pull request.
  • Add your Team Lead as a Reviewer on the Pull-request
  • Your Team Lead will count the challenge as done by merging the branch into master.

Commits

Commit your code regularly and use descriptive messages. This helps both you (in case you ever need to return to old code) and your Team Lead.

Self-Study/Essay Questions

Demonstrate your understanding of this week's concepts by answering the following free-form questions. Edit this document to include your answers after each question. Make sure to leave a blank line above and below your answer so it is clear and easy to read by your project manager.

  • Explain the difference between Relational Databases and SQL. SQL is the laungauge that you use to parse data bases, relational databases are just databases with multiple tables refereing to one another
  • Why do tables need a primary key? To have a key that can be used to find things in the table its self.
  • What is the name given to a table column that references the primary key on another table. foreign key
  • What do we need in order to have a many to many relationship between two tables. an entire table responsible to bringing together the ID's

Minimum Viable Product

Take the steps necessary to complete the project from scratch. Start by initializing your project with a package.json and go from there.

Complete the following tasks:

  • Design the data model and use knex migrations to create the database and tables.
  • Build an API with endpoints for:
    • adding resources.
    • retrieving a list of resources.
    • adding projects.
    • retrieving a list of projects.
    • adding tasks.
    • retrieving a list of tasks. The list of tasks should include the project name and project description.
  • When returning project or task information, the completed property should be true or false.

For example, instead of returning a task that looks like this:

{
  id: 1,
  name: 'convert to boolean',
  completed: 1 // the database stores a 1 to represent true values on a boolean field
}

The API should return:

{
  id: 1,
  name: 'convert to boolean',
  completed: true // write code to convert the 1 to true and 0 to false
}

Business Rules

  • a project can have multiple tasks.
  • a task belongs to only one project.
  • a project can use multiple resources.
  • the same resource can be used in multiple projects.
  • when adding projects the client must provide a name, the description is optional.
  • when adding resources the client must provide a name, the description is optional.
  • when adding a task the client must provide a description, the notes are optional.
  • when adding a task the client must provide the id of an existing project.
  • for projects and tasks if no value is provided for the completed property, the API should provide a default value of false.

Entities

A project is what needs to be done. We want to store the following data about a project:

  • a unique Id.
  • a name. This column is required.
  • a description.
  • a boolean that indicates if the project has been completed. This column cannot be NULL, the default value should be false.

A resource is anything needed to complete a project, some examples are: a person, a tool, a meeting room or a software license. We want to store the following data about a resource:

  • a unique Id.
  • a name. This column is required.
  • a description.

The database should not allow resources with duplicate names.

An task one of the steps needed to complete the project. We want to store the following data about an task.

  • a unique id.
  • a description of what needs to be done. This column is required.
  • a notes column to add additional information.
  • a boolean that indicates if the task has been completed. This column cannot be NULL, the default value should be false.

node-db-challenge's People

Contributors

jeff-butler-dev avatar adetunjishennaike avatar luishrd 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.