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 MySQLDartlero tasks: a many-to-many model in MySQL and JSON
MongoDB: a NoSQL database
Using the
mongo_dart
driver to store thetodo
data in MongoDB