Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RDBMS without SQL [closed]

Tags:

rdbms

Is there an RDBMS in existence that does not have SQL. I am not talking of NoSQL and all that XML and Javascript object type of data.

I mean like the database that is not instructed via SQL, but plainly via some API. There should not be an SQL at all.

I mean like how MS had its ADO objects in past and those objects had methods to do all the stuff that SQL does currently.

And I am not asking for an ORM framework. The frameworks just internally make and call SQL code. I dont want that. I want direct function or method calls that directly speak to the database.


I am into the windows platform. The languages I want the RDBMS to support is PHP and Python; and maybe C# too.

The data that I want to manage is everything an everyday SQL-RDBMS handles.

And yes I want the DBMS to manage entity relationships. But I do not want SQL to be in the picture.

I am not doing a project for anyone. Its just a matter of taste or preference to avoid jumping from one level/language to another.

I tried searching on google, but it only results into NoSQL which I dont like.

like image 548
Jazz Avatar asked May 26 '16 08:05

Jazz


People also ask

Are there relational databases that don't use SQL?

Instead of the Structure Query Language (SQL) used by relational databases, the NoSQL database uses Object-relational-mapping (ORM). The concept of ORM is the ability to write queries using your preferred programming language. Some of the more popular ORMs are Java, Javascript, .

Do all RDBMS use SQL?

RDBMSes store data in the form of tables, with most commercial relational database management systems using Structured Query Language (SQL) to access the database. However, since SQL was invented after the initial development of the relational model, it is not necessary for RDBMS use.

Can we query or use RDBMS without SQL?

There is no standard that says that an RDBMS has to have SQL.

Which databases do not use SQL?

NoSQL databases store data in documents rather than relational tables. Accordingly, we classify them as “not only SQL” and subdivide them by a variety of flexible data models. Types of NoSQL databases include pure document databases, key-value stores, wide-column databases, and graph databases.


2 Answers

I think this is a perfectly reasonable question. Why should you have to use SQL to query a database rather than some low level API? I think there are several reasons - not exactly answers:

  • SQL attempts to provide a standard interface for any database implementation.

  • The cost of parsing SQL is mitigated using prepared statements.

  • Also some developers are strongly database and SQL oriented while others are strongly programming language oriented. Though frequently in opposition these are in many ways complementary skills.

The emergence of "nosql" has revitalised attempts to improve on SQL as in interface at the same time as trying different data layouts on the implementation side. Many of the "nosql" generation are inventing their own query languages. And then you have projects like apache drill trying to make all databases accessible again from a single universal API.

But why not provide a low level interface to avoid the cost of parsing SQL? One answer is that the database's nowadays mitigate that cost by providing prepared statements. The SQL is parsed once and thereafter you have a parameterised query object that more or less represents the low-level API.

You can beat the performance by using a library or hand crafted data structure with hand coded queries for specific use cases. For example if you only need a key/value store you can use a hash map or REDIS or whatever.

There are dangers with parsing SQL at all, such as sql injection. These tend to be avoided by creating an API which translates to SQL in a safe way. For example an ORM or something like LINQ. In theory they could decompose to a low-level API instead and bypass creating SQL all together. This would have to be done on a database by database basis and as you've noticed most databases focus on providing an SQL interface and often don't expose a low level API at all. In my opinion a good database library should be trying to provide an API that would make this possible in principle (i.e. abstract away from SQL) and which could then a candidate for standardising in a given language. Most just wrap SQL and don't try to abstract too far beyond it as it is an uphill struggle.

There is a good quote about SQL in the Berkley DB book in the section "what's so bad about SQL". If you google that you might also hit pages such as this

That's more or less just justifying the question rather than answering it. The closest thing to an answer is probably prepared statements as I said above.

You may end up needing to be database specific in order to optimise a query plan (which is perhaps why you wish for a lower level API in the first place?).

like image 132
Bruce Adams Avatar answered Dec 11 '22 08:12

Bruce Adams


I don't have an answer but maybe I can clarify the question. A lot of people are talking about SQL as though it is the language that queries the database itself. However, SQL gets translated into a form of relational algebra which then results in processes on the database structure. Relational algebra (at least in theory) is the base level of querying a relational object structure. I too would love to see a relational database completely devoid of SQL. SQL is structured to be written by a keyboard not by code. It's very difficult to write generic SQL writers that deals with things the same way relational algebra is. Relational algebra is orthogonal and can be rearranged without affecting the outcome (only the performance). Things like appending where clauses throughout a codebase at different times and for different reasons is really difficult with a language like SQL but trivial with orthogonal operations like relational algebra.

In fact as I understand it. Relational databases translate SQL into some form of relational algebra so it can be performance optimized. Why not skip the middle man and create relational algebra on the client side and send it directly to the database?

I definitely get that some people are just explaining the landscape and I don't mean to argue against where we are.

I believe there are several language alternatives for databases like postgres but they are VERY non standard and unfortunately using them is risky because they are often not well maintained and they also are not well known so adding developers into your org is challenging.

Hopefully one day someone will make an easy to deploy database that uses something more closely related to relational algebra.

Here is an example of a language you can install on postgres that is closer to relational algebra. http://www.andl.org/

This project (the web page at least) was actually most recently updated 07/2020

like image 29
Jordan Davidson Avatar answered Dec 11 '22 08:12

Jordan Davidson