Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 1.93 KB

README.md

File metadata and controls

31 lines (24 loc) · 1.93 KB

#SQLite a Relational Database

To begin you will want to fork a copy of this repository and pull it down to your local machine.

This lab may be completed individually, in pairs, or in groups.

###Put Your Knowledge to Practice

Relational Database Schemas

If needed review the Module One stack from the previous Immersion session. You have been tasked with cloning Twitter.

  1. Think about the many types of objects/ tables and their relationships.
  1. Draw a schema for these relationships.
  • Label the Primary Keys & Foreign Keys
  • Label the relationship between each table.
  • You an complete this using Google Drawings, on a whiteboard, or with pencil and paper.
  • Be sure to save a picture within this repository. Tip: snap a picture with your phone.
  1. Commit your changes with a brief and meaningful message.

Create a SQLite Database

Now use your schema to create a SQLite database within this repository.

  1. Initialize a SQLite database.
  1. Create the tables from your schema.
  2. Populate the tables with data.
  • Try to challenge yours SQL commands and populate the data with the appropriate joins.
  1. Every so often, between table creations perhaps, make sure to commit your changes with a brief and meaningful message.
  2. Push up the changes to your forked version of the repository.

An Important Note

Creating a SQL database from scratch is meant to be challenging. You may not complete this entire lab. This is okay, as we will review in the debriefing Rails has a powerful tool called ActiveRecord. Understanding the underling pinnings of a database will help you to appreciate the benefits of ActiveRecord and Rails scaffolding.

Don’t be discouraged. It is more important you practice with the resources from SQL Course, Codecademy, and Learn SQL the Hard Way.