DEV Community

Exploring Advanced and Modern Concepts in SQL with Practical Examples.

Mwenda Harun Mbaabu on May 19, 2023

SQL (Structured Query Language) is a powerful and widely used language for managing and manipulating relational databases. While SQL has been ar...
Collapse
 
bias profile image
Tobias Nickel

I have a question for better understanding recursive queries. Do you think they can replace graph databases? or at least delay or avoid the introduction of such in many cases when already using a Postgres?

Collapse
 
grayhat profile image
Mwenda Harun Mbaabu

Hello @bias

Graph databases offer a number of advantages over relational databases for storing and querying graph-like data, including:

  • Performance: Graph databases are typically much faster than relational databases for queries that involve traversing relationships between nodes.

  • Scalability: Graph databases are more scalable than relational databases for large graphs.

  • Expressiveness: Graph databases offer a more expressive language for querying graph-like data.

For these reasons, i think recursive queries are not a complete replacement for graph databases.

Note:
The decision of whether to use recursive queries or a graph database depends on the specific needs of your application. If you have a small, simple graph, recursive queries may be a good option. However, if you have a large, complex graph, you may need to introduce a graph database to improve performance and scalability.

Collapse
 
yet_anotherdev profile image
Lucas Barret

It seems that Graph database are highly specific, do you think we should always shoot for simplicity first ?

Thread Thread
 
grayhat profile image
Mwenda Harun Mbaabu

Yeah (personal opinion), for me i always shoot for simplicity first. What about you?

Thread Thread
 
yet_anotherdev profile image
Lucas Barret

Yep totally, I think being pragmatic and listen to business requirements is the best way to deliver something : useful, powerful, resilient and scalable.

Collapse
 
rickdelpo1 profile image
Rick Delpo

I like to extend our SQL commands to the Javascript environment by mentioning Javascript equivalents of SQL - CRUD. I wrote a Dev article on this at
dev.to/rickdelpo1/crud-4-sql-comma...

Collapse
 
grayhat profile image
Mwenda Harun Mbaabu

Great, thank you for sharing @rickdelp

Collapse
 
patriciavillela profile image
PatrΓ­cia Villela

Good reference list, but it would be good to have not only more detailed examples and explanations, but also information about which RDMSs versions support each of the features.

Collapse
 
grayhat profile image
Mwenda Harun Mbaabu

Thank you for the input @patriciavillela, I will update the article with the information.

Collapse
 
reganmu profile image
regan_mu

Great work

Collapse
 
grayhat profile image
Mwenda Harun Mbaabu

Thank you Regan for the feedback.

Collapse
 
yet_anotherdev profile image
Lucas Barret

I knew some of them for sure but Temporal tables are quite new for me. Thanks for sharing :)

Collapse
 
grayhat profile image
Mwenda Harun Mbaabu

Welcome @yet_anotherdev, we keep learning each day.