Well guy I am a french SQL expert and recently became a MVP...
I now pretty well ISO standard SQL Language.
The state of art in the normative process is actually SQL:1992.
SQL:1999 wich has got relational object feature is not yet a ISO standard...
Let me say that, SQL Server is the RDBMS closest to the standard !
Do you know RDBMS wich allows database object names to be long to 128 chars ?
Do you know RDBMS wich use INFORMATION_SCHEMA views to meta data the data base ?
Do you know RDBMS wich use COALESCE and NULLIF function ?
Do you know RDBMS wich have the two structured CASE ?
Do you know RDBMS wich allow you to subqueries in the FROM clause of a SELECT ?
....
The thing you want will be a mix of Java, C, Excel, Ada but not a RDBMS !
Jeager a écrit:[color=blue]
> Why is it, Microsoft manage to write operating systems and office
> applications with every bell and whistle facility known to man. Yet,
> even after years and years of development they still cannot produce a
> decent version of MS SQL Server, one without a plethora of flaws and
> limitations? Personally I'd sack the MS SQL Server Chief Architect,
> start addressing some fundementals and do what MS do best - copy the
> best functionality of their competitors.
>
> Here's a few reasons why I feel MS SQL Server is still a load of crap,
> and will never be many developers RDBMS of choice :
>
> 1. Can't use domains in Multi-statement table-valued function table
> definition[/color]
DOMAINs can be simulated by a combination of rules and UserType.
[color=blue]
>
> 2. No concept of table.column.datatype MYTABLE.MYCOLUMN%TYPE for
> function / proc parameters, variables. Schema evolution will require
> changes to dep functions / procs.[/color]
Not OK for that ! We are not in a Ada ou C++ dev !
[color=blue]
>
> 3. Cannot call non extended user defined procedure from within stored
> proc - prevents code re-use
>
> 4. No create or replace for functions / procs. Changes to procs
> require either a change from create to alter, or drop then create[/color]
Don't you use a tool ? Don't you use the script auto create of Enterprise Manager to get the SQL equivalent code ???
[color=blue]
>
> 5. Functions must return result on final statement - requires
> excessive use of local variables. Why!!!???[/color]
This does not appear to be so stupid ![color=blue]
>
> 6. No user specifiable date format routines - must use convert with
> limited options[/color]
Wrong... use SET DATEFORMAT.
[color=blue]
>
> 7. No treewalk mechanism, not easy to traverse hierarchical structure[/color]
Don't need. Every recursive process can be write without recursive code by use of a "pile" structure.
For instance, trees in SQL can be modelate by intervals.
Read me for that :
http://sqlpro.developpez.com/Tree/SQL_tree.html
[color=blue]
>
> 8. Calling procedures with out parameters require user to also
> specifiy which are out params[/color]
Is it really a problem ?[color=blue]
>
> 9. Stored Proc recursion limitations to only 32 nested levels, rather
> than monitoring by stack size.[/color]
Recursion processes in RDBMS should never exists. See answer 7.
[color=blue]
>
> 10. No on delete set null referential integrity, this is fundemental
> in relational databases, has to be done by trigger. Yuk.[/color]
This is really a point !
[color=blue]
>
> 11. No partitioning on db table
>[/color]
Manually !
[color=blue]
> 12. Cannot raiseerror in stored functions. No way to inform user of
> incorrect parameters etc.[/color]
Yes this is the second point, the error manager of SQL Server must be improve ![color=blue]
>
> 13. No facility for sub - procs / funcs - for localised code
> normalisation.
>
> 14. No function overloading[/color]
SQL is not an OO language and must not be one ! The future of the standard does not goes in this way ![color=blue]
>
> 15. No concept of grouping similar procs / functions into a collective
> package - can mean 1000s of procs rather than a handful of packages.
>[/color]
Yes, but with a use of a 128 char name, you can group by prefix ! This is not the cas in Oracle wich cannot accept more
than 28 chars... And the real interest of package for this "poor" naming object database !
[color=blue]
> 16. Non standard func / proc calling - proc non parenthesised but,
> function defined and called with parenthesis[/color]
The weight of the past... Procs was developped before the standard came, functions, after the standard and close to the
standar ...[color=blue]
>
> 17. Limited column name length in table variables / Multi-statement
> table-valued function table definitions[/color]
128 characters is not enough for you ? This is the SQL:1992 standard !
[color=blue]
>
> 18. No intersect, minus operators to complement union and union all[/color]
Wich can be represented by two equivalents... But I agree, I would prefer they exists ![color=blue]
>
> 19. No exception handling - need I say more about this fundemental
> requirement?[/color]
"déjà dit"[color=blue]
>
> 20. No handling for select statements using proc parameters passed in
> as null e.g.
> create procedure sp_test.......
> .....
>
> select @MyID = ID
> from mytable
> where parent_id = @parent_id.
>
> If @parent_id is null, select will not return anything even if values
> for null parent_id exist.[/color]
depend on the parameters fixed for normative NULL treatment
[color=blue]
>
> 21 No boolean type for use in stored procs / funcs. SQL standards do
> allow booleans (null, FALSE, TRUE)[/color]
Wrong, the type is BIT, wich allow 1, 0, NULL. SQL does not have any standard about boolean. This is planed in SQL:199
wich is not yet a ISO standard !
[color=blue]
>
> 22 No repeat until - (post predicate loops), while loops can perform
> this but one extra check often has to be performed[/color]
not really a problem WHILE is a general loop that can replace all.[color=blue]
>
> 23 No equivalent to cursor or table %ROWTYPE, when fetching from a
> many column cursor, all bind variables have to be declared
> individually[/color]
A lack, I agree
[color=blue]
>
> 24. Declarative Delete cascade in SQL Server is at best rubbish - e.g.
> No table can appear more than once in the list of all cascading
> referential actions that result from the DELETE or UPDATE. Almost all
> other RDBMS I've tried seems to manage it.[/color]
The use of CASCADED delete or update is always a performance problem. This limitation has a good intention... The use of
a trigger is better ![color=blue]
>
> Create Table ForKey
> (
> MyID int not null identity primary key,
> MyText varchar(30)
> )
> go
>
> Create Table Refs
> (
> SomeID int not null primary key,
> RefID1 int not null foreign key references ForKey(MyID) on delete
> cascade,
> RefID2 int not null foreign key references ForKey(MyID) on delete
> cascade
> )
>
> Server: Msg 1785, Level 16, State 1, Line 2
> Introducing FOREIGN KEY constraint 'FK__Refs__RefID2__1BFD2C07' on
> table 'Refs' may cause cycles or multiple
> cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or
> modify other FOREIGN KEY constraints.
> Server: Msg 1750, Level 16, State 1, Line 2
> Could not create constraint. See previous errors.
>
> 25. Domains cannot be altered without dropping all dependencies
> (stored procs / funcs) even if type isn't changed but say scale and
> precision- this is ridiculous. What is the point of domains?
>
>
> 26. No "for loop", while loops can perform this, but resultant code is
> not as clear or tidy[/color]
Redondant with 22[color=blue]
>
> 27. Can't use CURDATE() inside stored procs / funcs. How crap is
> that?
>[/color]
In Stored Proc Yes, In Function not. Because of DETERMINISTIC limitation.
You can use a view instaed :
CREATE VIEW GIVE_ME_CURRENT_DATETIME
AS
SELECT CURRENT_TIMESTAMP AS DT
CREATE FUNCTION dbo.FN_GETDATETIME
RETURNS DATETIME
BEGIN
RETURN (SELECT DT FROM GIVE_ME_CURRENT_DATETIME)
END
By the way, CURRENT_TIMESTAMP is the SQL:1992 standard of datetime function !
[color=blue]
>
> Don't try and make excuses for MS as I have hundreds, anyone else have
> any?[/color]
For me the most important lack is the deferability of constraint...
wich is a SQL:1992 standard
One important point, wich is not a SQL standard, but planned for SQL:1999 is that SQL Server does not allow BEFORE trigger.
And some point I will be enjoy to have is :
ROW VALUE CONSTRUCTOR
MATCH predicate
and some other standard stuff like EXTRACT, OVERLAPS and INTERVAL data type (time process)
[color=blue]
>
> Jeager[/color]
--
Frédéric BROUARD, MVP SQL Server. Expert SQL / spécialiste Delphi, web
Livre SQL - col. Référence :
http://sqlpro.developpez.com/bookSQL.html
Le site du SQL, pour débutants et pros :
http://sqlpro.developpez.com
************************
www.datasapiens.com *************************