Read these instructions carefully. Understand exactly what is expected before starting this Sprint Challenge.
This challenge allows you to practice the concepts and techniques learned over the past sprint and apply them in a concrete project. This sprint explored Data Persistence. During this sprint, you studied RDBMS, including SQL, multi-table queries, and data modeling. In your challenge this week, you will demonstrate your mastery of these skills by creating a database based on given specifications.
This is an individual assessment. All work must be your own. Your challenge score is a measure of your ability to work independently using the material covered through this sprint. You need to demonstrate proficiency in the concepts and objectives introduced and practiced in preceding days.
You are not allowed to collaborate during the sprint challenge. However, you are encouraged to follow the twenty-minute rule and seek support from your TL if you need direction.
You have three hours to complete this challenge. Plan your time accordingly.
In this project you will be given a set of requirements and must design a database to satisfy them. As a part of this process you'll also build an API with endpoints to access the data.
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 is required, 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.
A task
is 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
.
Commit your code regularly and meaningfully. This helps both you (in case you ever need to return to old code for any number of reasons) and your team lead as the evaluate your solution.
Be prepared to demonstrate your understanding of this week's concepts by answering questions on the following topics. You might prepare by writing down your own answers before hand.
-
Explain the difference between
Relational Databases
andSQL
. -
Why do tables need a
primary key
? -
What is the name given to a table column that references the primary key on another table.
-
What do we need in order to have a many to many relationship between two tables.
You are expected to be able to answer questions in these areas. Your responses contribute to your Sprint Challenge grade.
- Create a forked copy of this project
- Add your team lead as collaborator on Github
- Clone your OWN version of the repository (Not Lambda's by mistake!)
- Create a new branch: git checkout -b
<firstName-lastName>
. - Implement the project on your newly created
<firstName-lastName>
branch, committing changes regularly - Push commits: git push origin
<firstName-lastName>
Your finished project must include all of the following requirements:
- Design the data model and use knex migrations to create the database and tables needed to satisfy the following business rules:
- a
project
can have multipletasks
. - a
task
belongs to only oneproject
. - a
project
can use multipleresources
. Example ofresources
are: computer, conference room, microphone, delivery van. - the same
resource
can be used in multipleprojects
. - 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 theid
of an existing project. - for
projects
andtasks
if no value is provided for thecompleted
property, the API should provide a default value offalse
.
- a
- 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.
In your solution, it is essential that you follow best practices and produce clean and professional results. You will be scored on your adherence to proper code style and good organization. Schedule time to review, refine, and assess your work and perform basic professional polishing including spell-checking and grammar-checking on your work. It is better to submit a challenge that meets MVP than one that attempts too much and does not.
After finishing your required elements, you can push your work further. These goals may or may not be things you have learned in this module but they build on the material you just studied. Time allowing, stretch your limits and see if you can deliver on the following optional goals:
- Add an endpoint to get a list of project resources.
- Add an endpoint to get a list of project tasks.
- Add an endpoint to see all projects using a particular resource.
- Add support for assigning
resources
directly totasks
in addition to adding them toprojects
Follow these steps for completing your project.
- Submit a Pull-Request to merge Branch into master (student's Repo). 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 project as complete after receiving your pull-request