Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Node Web Development - Second Edition
  • Table Of Contents Toc
Node Web Development - Second Edition

Node Web Development - Second Edition

By : David Herron
4 (1)
close
close
Node Web Development - Second Edition

Node Web Development - Second Edition

4 (1)
By: David Herron

Overview of this book

Table of Contents (17 chapters)
close
close
Node Web Development Second Edition
Credits
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface
1
Index

Chapter 6. Data Storage and Retrieval

In the previous chapter, we built a small and somewhat useful application for storing notes. While the application works reasonably well, it doesn't store those notes anywhere for long term storage. Further, if you run multiple instances of Notes each instance has its own set of notes, making it difficult to scale the application to serve lots of users.

The typical next step in such an application is to introduce a database tier. Databases provide long-term reliable storage, while enabling easy sharing of data between multiple application instances.

In this chapter we will be looking at database support in Node in order to solve these user stories:

  • The user must see the same set of notes for any Notes instance accessed

  • Reliably store notes for long term retrieval

We'll be starting with the Notes application code used in the previous chapter. We used a simple in-memory data model using an array to store the notes. In this chapter we'll add additional model...

Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Node Web Development - Second Edition
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon