SQL or NoSQL ?

Sam Chen
3 min readAug 23, 2020

What is SQL? Most people know and view SQL as a tool that connects a programming language to a database. While it is true that the main purpose of SQL is a database that stores information, however, it is not the only database that serves this purpose. Let us take a look at the concept of SQL and NoSQL (Not only SQL).

image from www.upwork.com

In the world of database technology, there are two kinds of databases, SQL and NoSQL. The main difference between these two databases is the structure and relation. SQL follows a rigid and very specific way of storing data, therefore considered a relational database. For example: in order for us to store any type of data, we have to first declare a database, SQL file and create a table that has columns and rows. Each row represents an entry while the column will define what kind of data it is storing, whether it is integer, float, string or BLOB. the relationship between tables and field types is defined as schema. In a SQL database, schema must be defined very clear before any information can be added. Popular SQL databases include but not limited to : MySQL, Oracle, Microsoft Azure, IMB DB2, PostgreSQL and etc.

The other type of database is considered NoSQL(Not only SQL). They are considered non-relational databases where the database is document oriented with no clear defined schema. This allows much greater flexibility than traditional SQL databases. Given above mentioned example: given a blog post, its comments, likes, tags, text, photos and links are all stored into the same document file. In nowadays society, the increase amount of data has become a problem for SQL database management system, since organized and well structured data can cause problems and slow down the performance process when the data sizes gets bigger, SQL will not be capable to meet the needs of big data. This is where NoSQL enters into the industry, it creates a faster and unstructured database system, capable of storing data without giving a well defined schema, handles larger amount of information at a higher performance rate. Popular NoSQL databases include but not limited to: MongoDB, Apache’s CouchDB, Oracle NoSQL, RIAK, Apache’s Cassandra DB and etc.

There are limitations to NoSQL database system. Alternatives and solutions are still under pre-production stage where many key features are yet to be implemented. Customer support is also better in SQL database systems, vendors provide a higher level of enterprise support. In contrast, NoSQL system support is provided by small start-up companies without the global scale resources like Oracle, Microsoft, or IBM, the big names associated with SQL.

In conclusion, there are both benefits and limitations of SQL and NoSQL, you have to choose the database based on your needs and there is no one sized fits all solution. For more detail information, please check out the following articles.

--

--

Sam Chen

Yesterday I was clever, so I wanted to change the world. Today I am wise, so I am changing myself.