Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reasons for SQL differences

Why are SQL distributions so non-standard despite an ANSI standard existing for SQL? Are there really that many meaningful differences in the way SQL databases work or is it just the two databases with which I have been working: MS-SQL and PostgreSQL? Why do these differences arise?

like image 772
Jason Baker Avatar asked Sep 01 '08 04:09

Jason Baker


People also ask

What makes SQL Server different?

The SQL queries remain the same irrespective of different platforms. Hence, SQL is a platform-independent query language. On the other hand, SQL Server is proprietary software and the same software can not be used for all the platforms. Hence, SQL Server is a platform-dependent RDBMS.

How do you differentiate in SQL?

SQL Server DIFFERENCE() FunctionThe DIFFERENCE() function compares two SOUNDEX values, and returns an integer. The integer value indicates the match for the two SOUNDEX values, from 0 to 4. 0 indicates weak or no similarity between the SOUNDEX values. 4 indicates strong similarity or identically SOUNDEX values.

What is the use of difference SQL?

DIFFERENCE compares two different SOUNDEX values, and returns an integer value. This value measures the degree that the SOUNDEX values match, on a scale of 0 to 4. A value of 0 indicates weak or no similarity between the SOUNDEX values; 4 indicates strongly similar, or even identically matching, SOUNDEX values.

What is the major problem with SQL?

Missing indexes, wrong indexes, too many indexes, outdated statistics, or a lack of index maintenance are all common issues for users with little to no experience (what we lovingly call 'accidental DBAs').


2 Answers

The ANSI standard specifies only a limited set of commands and data types. Once you go beyond those, the implementors are on their own. And some very important concepts aren't specified at all, such as auto-incrementing columns. SQLite just picks the first non-null integer, MySQL requires AUTO INCREMENT, PostgreSQL uses sequences, etc. It's a mess, and that's only among the OSS databases! Try getting Oracle, Microsoft, and IBM to collectively decide on a tricky bit of functionality.

like image 190
John Millikin Avatar answered Oct 01 '22 09:10

John Millikin


It's a form of "Stealth lock-in". Joel goes into great detail here:

  • http://www.joelonsoftware.com/articles/fog0000000056.html
  • http://www.joelonsoftware.com/articles/fog0000000052.html

Companies end up tying their business functionality to non-standard or weird unsupported functionality in their implementation, this restricts their ability to move away from their vendor to a competitor.

On the other hand, it's pretty short-sighted because anyone with half a brain will tend to abstract away the proprietary pieces, or avoid the lock-in altogether, if it gets too egregious.

like image 21
1800 INFORMATION Avatar answered Oct 01 '22 08:10

1800 INFORMATION