Book Image

Learning Dart

Book Image

Learning Dart

Overview of this book

Table of Contents (19 chapters)
Learning Dart
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 12. Data-driven Web Applications with MySQL and MongoDB

Data is usually stored on a server in a database; in order to do that, our Dart app needs a middle layer called a database driver. We'll review which drivers are already available and then see how you can store and access your data on the server with MySQL and MongoDB. These are two of the most popular databases: MySQL is a typical relational database, and MongoDB is a NoSQL database (according to the following link, http://db-engines.com/en/ranking, MySQL is second in popularity after Oracle, and MongoDB occupies the sixth place). The following are the topics covered in this chapter:

  • Database drivers for Dart

  • Storing the todo data in MySQL

  • Dartlero tasks: a many-to-many model in MySQL and JSON

  • MongoDB: a NoSQL database

  • Using the mongo_dart driver to store the todo data in MongoDB