What are PostgreSQL, MariaDB and MongoDB databases?
Relational and non-relational databases each have advantages and are used for different applications. However, some are very popular because they perform better.
PostgreSQL
PostgreSQL is an object-relational database management system available for various operating systems, including Linux, Freeware, Windows, and Mac OS X. Postgraduate is developed by the Postgraduate Global Development Group, which includes many 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 different languages are commonly referred to as procedural languages. Procedural languages are not part of PostSecurity’s built-in parts and are used as downloadable modules.
Four standard languages are 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, another database, or a web service. This means that queries can use these data sources like regular tables 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 database written in the C ++ programming language without an initial layout. Mangoodi aimed to bridge the gap between fast and scalable key/value storage and traditional relational database management systems with rich requests and profound 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), thus integrating 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 can be written and read. A function copies data from the subject and is used for readings or support only. Functions can select a new subscriber if the current subscriber fails.
Load balancing: Mangodibi can be scaled horizontally using sharding. The developer selects the segmentation key to determine how the data will be distributed. Based on the segmentation key, the data is fragmented into different sections 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 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 it is stored in collections. Each set may contain any number of documents.
Compared to relational databases, 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 MySQL programs should be able to run smoothly and, in specific scenarios, with better performance in MariaBi. In addition to improving performance over MySQL, MariaDie is offered under the GPL Free License, which is essential 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 Mariadbybye, founding 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 primary 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, 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, the percentage of time the database has been locked and the amount of memory consumed by the database Data.
Mongotop: This is used to track how much time a mongodY 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 back up and restore backups.