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.
- 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.
- 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
- 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.
- 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.
- 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.
- 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.
- 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:
- 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.
- 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.
- 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.
- 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.
- MongoDB. The database engine is very versatile, and it works by connecting databases to applications via MongoDB database drivers.
- 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.
- DB2. DB2 is a database engine that has NoSQL capabilities, and it can read JSON and XML files.
- 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.