All About Postgrass (POSTGRESQL)

Postgresql is an open source database that is one of the most powerful databases. This database is RDBMS and Relational, which in tables can use one to one/one to many/many relationships.
The open source of postgrass has added a lot of functions to it, which makes this database stronger day by day than before and adds new features to it. The important thing is that postgrass on MacOs Server is not known as the default database.

What is Mysql?

There is an RDBMS and Relational database that can be replaced by Sql Server (Microsoft). Mysql is an open source database developed by a Swedish company called Mysql AB and bought Oracle Mysql in 2010. Many believe that Oracle Data Base is very powerful and there was no reason to buy Mysql, and many believe that Oracle’s goal of buying Mysql was to buy its competitor and remove it from the market because after buying Oracle, Mysql lost its hobby and other databases such as Postgrass and ….. They became popular.

Difference between Postgress and Mysql

Postgrass speeds are much higher than Mysql’s, and for example, if we have a site like Facebook and check its performance, it’s going to be a lot of speed. For sites like WordPress sites Mysql can be a good option and is one of the best options. Keep in mind that Mysql is much older. Of course, in the new versions i.e. 10, 11, 12 and 13 postgrass is better speed and if we want to compare the old versions, Mysql has better speed.
The design of the postgrass is a fabric, but Mysql is two layers and in the first layer, the layer is Sql and in the second layer is Storage Layer.
Postgrass is mostly made for professional user use, but mysql can be easily and easily used by everyone, and phPmyadmin is an incredibly simple user environment with great access available to all users.

Finally, postgrass is much safer and more reliable than mysql due to the use of acid structure and is highly recommended.

A few examples for postgrass:

  • Apple
  • BioPharm
  • Etsy
  • IMDB
  • Macworld
  • Debian
  • Fujitsu
  • Red Hat
  • Sun Microsystem
  • Cisco
  • Skype

A few examples of Mysql:

  • Github
  • US Navy
  • NASA
  • Tesla
  • Netflix
  • WeChat
  • Facebook
  • Zendesk
  • Twitter
  • Zappos
  • Youtube
  • Spotify

Examples for querying in Mysql and Postgres:

Postgrass queries are sometimes similar to Mysql.

Selecting records from the mirbozorgi table

:PostgreSQL query
; SELECT * FROM mirbozorgi

MySQL query
; SELECT * FROM mirbozorgi

Inserting records into the  mirbozorgi table

:PostgreSQL query
;INSERT INTO mirbozorgi (name_id, branch, status) VALUES (‘arsalan’, ‘main1’, ‘done’)

:MySQL query
;INSERT INTO mirbozorgi (name_id, branch, status) VALUES (‘arsalan’, ‘main1’, ‘done’)

Updating records in the product table

:PostgreSQL query
; UPDATE product SET branch=”main1″ WHERE custages

:MySQL query
; UPDATE product SET branch=”main1″ WHERE custages > 2

What are Postgresql features compared to Mongo DB and why should this database be used more often?

MongoDB MongoDB is very famous for its ability to store Json files and is Document Oriented. This causes a lot of intermediate tables to be lost, but the problem for programmers is that they have to keep an eye on relations when working and using because there is no Relation.
PostGrass is an Rdbms that can create a column that is made of Jason and has the ability to work for MongoDB, except that it has both a table and supports railing and makes it easy for programmers to work.
Other features of this database are that it supports JsonB in the new version and has the ability to binary and remove white and empty parts, which makes our database size up to 10 times lower and higher in return for speed of operation. It can also eliminate duplicated values.
Another interesting feature is that Postgresql has more information.

JSON compared to JSONB:

PostgreSQL follows two types of json and jsonB.

Json

It holds exactly one copy of the imported data, so it takes a while to process the data.

JsonB

It keeps data binaryally, so there is no need for time and processing for processing. This type also supports Indexing, which speeds up the operation of queries.

And in the end,

Because our focus is on Java and Work Spring frames, I have prepared a project that is kept in a column with arrays and used postgrass database.I have put this project in GitHubum for you dear friends. If you have any questions, suggestions or criticisms you can email me, I will be held accountable immediately.

To check the project and Semple PostgresQL, you can connect to my GitHub via the link below:

https://github.com/arsalanmrz/postgresql-json-spring-boot

Sample store code with postgrass:

https://github.com/mirbozorgi-com/mirbozorgi.com-shop-sample

To download mailgrass to the link below and choose binary.

https://www.postgresql.org/download

And do the installation as usual, and the password that is announced is for the locking section of the dashboard.

Mastering-postgresql 13 fourth edition I gave you to read if needed:

https://mirbozorgi.com/books/postgresql13-mastering.pdf