Relational and non-relational databases each have their own advantages and are used for different applications. However, some of them are very popular compared to others because they perform better.
PostgreSQL
PostgreSQL is an object-relational database management system available for a variety of operating systems, including Linux, Freeware, Windows, and Mac OS X. Postgraduate is developed by the Postgraduate Global Development Group, which includes a large number of volunteers.
PostSecival implements much of the Standard :Squeal: 2008, is ACID compliant, fully transactional (including data definition descriptions), has data types, operators, indexing methods, functions, summation functions, extensible procedure languages, and has many add-ons created by others.
PostSquival supports most of the SQUAL language and offers many modern features including complex queries, external keys, triggers, views, transaction integrity, and multicast synchronization control.
Procedural languages
Postscript allows user-defined functions to be written in languages other than SQ and C. These other languages are commonly referred to as procedural languages. Procedural languages are not part of the built-in parts of PostSecurity and are used as downloadable modules.
There are currently four standard language languages associated with the standard postgraduate distribution: PayPalSQL, PL / TCL, PL / Perl, and Python. For example, to create a function using Python Cup that calculates at least two numbers, we can do the following:
CREATE EXTENSION IF NOT EXISTS plpythonu;
CREATE FUNCTION pymin (an integer, b integer)
RETURNS integer
AS $$
if a <b:
return a
return b
$$ LANGUAGE plpythonu;
External data wrappers
From version 9.1 onwards, PostSecure can use data from other systems using Foreign Data Wrappers. Using this feature, a table can be created whose source of information is an external source, such as a file in a file system, or another database, or a web service. This means that queries can use these data sources like a regular table, and even link these tables to regular tables.
A list of external data wrappers is available on WikiPostService.
For example, suppose you have a file with one record per line and field values with the character “|” Separated, and each record contains three fields: Name, City, and Age. The following table can be created whose data source is this file:
CREATE FOREIGN TABLE person {
name text,
city text,
age int4
} SERVER file_server
OPTIONS (format ‘text’, filename ‘/ path / to / file’, delimiter ‘|’, null ”);
To do the above definition, you must first create the file_fdw plugin and the file_server server:
CREATE EXTENSION IF NOT EXISTS file_fdw;
CREATE SERVER file_server FOREIGN DATA WRAPPER file_fdw;
MongoDB
MongoDB is an open, efficient, scalable document-oriented document-based database written without the need for an initial layout written in the C ++ programming language. Mangoodi’s goal was to bridge the gap between key/value storages that are fast and scalable, and traditional relational database management systems that have rich requests and deep performance.
Mangodibi is designed to solve problems that are not easily solved with relational databases; For example, if the database contains many servers. Instead of storing data in tables like classical relational databases, Mangodibi now stores structured data in documents in a Jason-like format (Mangodibi calls this format Bison), and thus integrates the data into some formats. Makes application easier and faster. The following is a summary of some of the key features:
Single-query queries: Mangodibi supports field-based queries, interval queries, and regular phrase searches.
Cataloging: Any field in Mangodibi can be indexed. Secondary menus are also available.
Reflection: Mangodibi supports master-slave reflection. Anything is capable of writing and reading. A function copies data from the subject and is used for readings or support only. Functions have the ability to select a new subscriber if the current subscriber fails.
Load balancing: Mangodibi can be scaled horizontally using sharding. The developer selects the segmentation key that determines how the data will be distributed in a set. The data is fragmented into different sections based on the segmentation key and distributed in different sections. (Each section is a function with one or more functions).
File storage: Mangodibi can be used as a file system and the benefits of load balancing and data reflection in multiple machines can be used to store files.
Aggregation: Reduction mapping can be used to process batch data and aggregation operations.
Run server-side JavaScript
Closed collections
For more information on the above, see the Mangudi Developer Booklet.
Uses and deployment
According to the “Uses” article on the Mangodibi website, Mangodibi is suitable for the following:
Archiving and recording events
Content and document management systems
e-commerce
game development
High volume issues
Mobile
Maintain data on a website
Projects that use agile development methods
Immediate statistics and analysis
AngodiBay stores structured data in documents in a JSON-like format called Bison (BSON). In Mangodibi, the data does not have a predefined design.
A data element is called a document, and documents are stored in collections. Each set may contain any number of documents.
Compared to relational databases, it can be said that collections are like tables, and documents are like records; But there is a big difference: all records in a table must have the same fields in the same order, but each document in a set may have different fields from other documents. The only requirement for document designs (in addition to size restrictions) is that each document must have a ‘_id’ field with a unique, non-array value.
MariaDB
MariaDB is a data management system that is considered a branch of MySQL.
Existing programs for MySQL should be able to run smoothly and in certain scenarios with better performance in MariaBi. In addition to improving performance over MySQL, MariaDie is offered under the GPL Free License, which is important given the ambiguities surrounding future MySQL licenses.
After acquiring Sunmusquival, Monty Vindenius, one of the co-founders of Maysquival, left Sun after disagreeing over the development process of Sunsquival and began developing Mariadby with the founding of the eBay Program manti.
According to Wendnius, one of the main goals of creating marijuana is to create an open environment for the user community to participate in the development process.
Mariadie B uses the Maria Storage Engine as its main storage engine.
Archiving and recording events
Content and document management systems
e-commerce
game development
High volume issues
Mobile
Maintain data on a website
Projects that use agile development methods
Immediate statistics and analysis
Mangodi Tools
After installing MangodiBi, the following commands are available:
ong mongo: An interactive shell used to view, add, modify, and delete data in databases, as well as view reflection information, set segmentation, shut down servers, run JavaScript,…
mongostat: Used to view a summary list of sample status statistics running mangodibi: how many insert, modify, delete, query operations have been performed, as well as the percentage of time the database has been locked and the amount of memory consumed by the database Data.
mongotop: Used to track the amount of time a mangody spends reading and writing data.
mongoimport, mango export: Used to convert collections to and retrieve collections from JSON, CSV, or TSV formats.
mongodump, mongorestore: Used to backup and restore backups.
For more information, visit https://www.21twelveinteractive.com/mysql-vs-mongodb-vs-postgresql-vs-mariadb/.