Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the purpose of SQL language? [closed]

After discovered HandlerSocket and messed with many ORM, one thing that troubles me is:

Why SQL exists? At all?

Why can't database drivers provide a direct way to e.g. InnoDB, and wrap various operations inside the ORM library itself?

Why ORM -> SQL -> DB parse SQL -> Db engine operations?

Why can't ORM -> Db engine operations ?

like image 603
est Avatar asked Nov 13 '22 16:11

est


1 Answers

Well, SQL was first, before any kind of ORM existed. A brief history

  • First you stored your data in sequential files
  • Later you used direct files (clients.dat)
  • Later first non relational DBs appeared (Check this)

And then someone has an idea of relational databases with a query language. Luckily we have an standard called SQL (even there are some small differences between different dialects of SQL in sql server, oracle, etc.)

And long time after (SQL is pretty old) someone invented ORM that uses sql to communicate with dbs.

There are also some efforts to have ORM->DB like no-sql dbs, object oriented dbs (OODBMS) and document

like image 123
Oscar Foley Avatar answered Nov 15 '22 05:11

Oscar Foley