Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,151,507 members, 7,812,559 topics. Date: Monday, 29 April 2024 at 03:25 PM

Relational Database Vs Nosql Database. - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Relational Database Vs Nosql Database. (1133 Views)

Nosql Expert Needed: Mongodb, Neo4j, Cassandra / Please How Do I Print This Data From MY Database. MYSQL, PHP (2) (3) (4)

(1) (Reply) (Go Down)

Relational Database Vs Nosql Database. by Nobody: 5:12pm On May 22, 2017
Hello guys,
I created this trend for newbies to understand when to use Relational and nosql database.

Relational database involves creating tables and usually joining these tables in your database to extract information from a certain query .
The advantages of Relational databases includes,

1. Atomic by design: Each column must have only one record. usually every row contains data of the same type (ie if a column is of type String, then every row will have data that matches that type for that particular column, except when null values are permitted )

2. Schema Designs: In relational database designs, you define how tables interact with each other, and the constrains, indexes etc are predefined,

There are other advantages of using Relational databases but for the sake of beginners I only want to focus on the few I mentioned.

Now the big question, why or when should I use Nosql?

NoSQL examples spans from MongoDB , Firebase etc its the newest type of DBMS systems, I recommend using NoSQL database when you wish to build apps that

1. Changes in features frequently,
Unlike Relational databases, Nosql are scalable that means you can easily expand your application but in relational databases you usually need to redesign your databases especially when your application is complex by default.
Adding a new feature to your existing application is easy in NoSQL as all rows must not have the same column, all you need to do is adjust your "rules" (you can read more about this).

2. Transactional Application
Using Nosql for transactional application is not recommended, Relational database are used mostly for transactional applications because they have built in rules that handle this.

for beginners, let's demonstrate an example of transaction al applications

Perfect example is Banking Application

Let's assume User A needs to send 20k naira to User B accounts.

the following steps must occur for the transaction to be successful.

1. User A current account balance is checked,
2. if user A account is greater than or equal to 20k then
3. 20k is deducted from User A,
4. User B gets 20k added to his account
5 transaction is complete....


now imaging a power failure happens at stage 3, and 4 wasn't executed this is a problem.

The truth is relational databases are built to handle this, with a " all or nothing approach..." unlike NoSQL .

1 Like

Re: Relational Database Vs Nosql Database. by gilloway(m): 5:22pm On May 22, 2017
Not all data is relational. For those situations, NoSQL can be helpful.
With that said, NoSQL stands for "Not Only SQL". It's not intended to knock SQL or supplant it.
SQL has several very big advantages:
1. Strong mathematical basis.
2. Declarative syntax.
3. A well-known language in Structured Query Language (SQL).
Those haven't gone away.
It's a mistake to think about this as an either/or argument. NoSQL is an alternative that people need to consider when it fits, that's all.
Documents can be stored in non-relational databases, like CouchDB.

1 Like

Re: Relational Database Vs Nosql Database. by blackstreak: 8:51am On Dec 10, 2019
This post has been extremely helpful
Re: Relational Database Vs Nosql Database. by IceColdVeins(m): 12:02pm On Dec 10, 2019
Very helpful
Re: Relational Database Vs Nosql Database. by Twirelex: 4:18pm On Dec 11, 2019
Cloud spanner is a SQL data base and it can scale horizontally to petabytes of data..

(1) (Reply)

Error 502 : What's The Cause? / Coding Competition / E-commerce Startup Company (interested Programmers Only)

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 14
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.