Week 4 Backend - Plous01/ProjectTech GitHub Wiki

Storage

This week, I will store the user input in a MongoDB database.

Databases

What databases are there? How do databases compare to each other in features, type (SQL, NoSQL, or something else?), popularity, funding, ease of use, or other factors?

There are multiple types of database management systems such as relational database management system, object databases, graph databases, network databases, and document db.

There are several types of database management systems.

  1. Hierarchical databases. In a hierarchical database management systems (hierarchical DBMSs) model, data is stored in a parent-children relationship nodes. In a hierarchical database, besides actual data, records also contain information about their groups of parent/child relationships.
  2. Network databases. Network database management systems (Network DBMSs) use a network structure to create relationship between entities. Network databases are mainly used on a large digital computers. Network databases are hierarchical databases but unlike hierarchical databases where one node can have one parent only, a network node can have relationship with multiple entities. A network database looks more like a cobweb or interconnected network of records
  3. Relational databases. In relational database management systems (RDBMS), the relationship between data is relational and data is stored in tabular form of columns and rows. Each column if a table represents an attribute and each row in a table represents a record. Each field in a table represents a data value.
  4. Object-oriented databases. The object-oriented database derivation is the integrity of object-oriented programming language systems and consistent systems. The power of the object-oriented databases comes from the cyclical treatment of both consistent data, as found in databases, and transient data, as found in executing programs.
  5. Graph databases. Graph Databases are NoSQL databases and use a graph structure for sematic queries. The data is stored in form of nodes, edges, and properties. In a graph database, a Node represent an entity or instance such as customer, person, or a car. A node is equivalent to a record in a relational database system. An Edge in a graph database represents a relationship that connects nodes. Properties are additional information added to the nodes.
  6. ER model databases. An ER model is typically implemented as a database. In a simple relational database implementation, each row of a table represents one instance of an entity type, and each field in a table represents an attribute type. In a relational database a relationship between entities is implemented by storing the primary key of one entity as a pointer or "foreign key" in the table of another entity.
  7. Document databases. Document databases (Document DB) are also NoSQL database that store data in form of documents. Each document represents the data, its relationship between other data elements, and attributes of data. Document database store data in a key value form.

8 popular databases:

  1. Oracle 12c. The newest version of Oracle, 12c, is designed for the cloud and can be hosted on a single server or multiple servers, and it enables the management of databases holding billions of records. Ideal for Large organizations that handle enormous databases and need a variety of features.
  2. MySQL. This database engine allows you to select from a variety of storage engines that enable you to change the functionality of the tool and handle data from different table types. It also has an easy to use interface, and batch commands let you process enormous amounts of data. The system is also incredibly reliable and doesn’t tend to hog resources.
  3. Microsoft SQL Server. This database management engine works on cloud-based servers as well as local servers, and it can be set up to work on both at the same time.
  4. PostgreSQL. It was one of the first database management systems to be developed, and it allows users to manage both structured and unstructured data. It can also be used on most major platforms, including Linux-based ones, and it’s fairly simple to import information from other database types using the tool.
  5. MongoDB. The database engine is very versatile, and it works by connecting databases to applications via MongoDB database drivers.
  6. MariaDB. The database engine allows you to choose from a variety of storage engines, and it makes great use of resources via an optimizer that increases query performance and processing.
  7. DB2. DB2 is a database engine that has NoSQL capabilities, and it can read JSON and XML files.
  8. SAP HANA. SAP HANA is a database engine that is column-oriented and can handle SAP and non-SAP data. The engine is designed to save and retrieve data from applications and other sources across multiple tiers of storage.

MongoDB

MongoDB is a document database with the scalability and flexibility that you want with the querying and indexing that you need.

Mongoos

Mongoose provides a straight-forward, schema-based solution to model your application data. It includes built-in type casting, validation, query building, business logic hooks and more, out of the box.

Diagram of how my database works

Resources