Server-Side Coding with JavaScript:
State: Databases

Description

Databases are very powerful, but they can also be very simple. For this lesson we will explore using a database to save a 'blob' of JavaScript data by name, then using that name to retrieve the blob later. We'll be using a 'NoSQL' document database (MongoDB or Firebase) but you can use these techniques with a relational (SQL) database as well.



 Slides

Databases Overview

  • Server vs. Server vs. Server

CRUD

The four basic database operations:

  • Create
  • Read
  • Update
  • Delete

We can also add

  • Index by field for fast lookup and search
  • Search by field or "free text"
  • maintain Transactional integrity (making sure multiple simultaneous actions don't corrupt the data)
  • Join several documents (records) into one in response to a single query



Comments

comments powered by Disqus