Subject | RE: [IB-Conversions] We are not alone |
---|---|
Author | Fabricio Araujo |
Post date | 2000-06-29T04:25:17Z |
On Tue, 27 Jun 2000 04:50:12 -0400, Claudio Valderrama C. wrote:
to start/commit/rollback a transaction. Because of this, they need this control.
IB don't let it in SP or triggers. Only a client can start/commit/rollback txns.
But these things of putting "signs" often makes the code appeat to be
a spaghetti...
provided, since these X-SPs are more powerful and (obviously) can represent
a new danger to metadata and data if bad writen.
At my viewpoint is a DOUBLE risk: result sets means that you manypulate
SQL in them. So, what type of SQL interface will be used?
BDE? (I think that will be tempted to do these crazy act) IBO? IBX? Raw API?
Jim's JDBC-style API?
If it can manipulate result sets, means also it can modiy/insert/delete, no?
So, a bad written baby can corrupt your DB file (as usual in bad behaved
UDFs) more it can drive your data crazy...
a host variable for their returns, even if you aren't interested in their results.
If enabled, you can use your functions as normal procedures (between other things).
in future.
ugly Quickreports act like they are a much more than decent report writer... ;-)
<snip some Mickey$oft IB plagium> ;-))))
hassles...?
different projects).
(sometimes always appear some one cursing it's graphical tools...) ;-)))
IB is light and cute. At least, more cute than the monster... :-)
Thank you, Claudio, to help me to remember this.
[]s Fabricio
[]s Fabricio
Delphi C/S Developer
> Ok, Mom, I'm sure there are others that deal better with MsSql. I've beenOr a dataset directly, if the code of the procedure is only a SELECT.
>doing some consultancy on MsSql for the last 5 years but I'm not an expert
>on procedures... in fact, this is the part I've touch less:
>
>- CASE statement. Do I need to explain? Hope that not. In compiled languages
>like Delphi, CASE allows for compiler optimizations. Also, it can be easier
>to code for developers when facing several decisions based on the same
>expression.
>
>- There's no selectable sprocs, but a sproc can return a CURSOR.
>Interesting.
>- That's interesting, it resembles our discussion about db-wide triggers:
>«
>Automatic Execution of Stored Procedures:
>When you mark stored procedures for automatic execution, these stored
>procedures are executed every time Microsoft® SQL Server starts.
>»
>- At least IB detects these issues that in MsSql are left to theIB is cool.
>developer... umh, I will include it among the IB abilities:
>«
>Note Changing the name or definition of a stored procedure can cause any
>dependent objects to fail when executed if those dependent objects are not
>also updated to reflect the changes made to the stored procedure.
>Note Renaming a stored procedure does not change the name of the stored
>procedure in the text of the procedure s definition. To change the name of
>the stored procedure in the definition, modify the stored procedure
>directly.
>[snip and this is worse than VB] This process is called deferred name
>resolution because objects referenced by the stored procedure need not exist
>when the stored procedure is created, but only when it is executed.
>»
>Good point.
>- @@ROWCOUNT (T-SQL)
>Returns the number of rows affected by the last statement.
> Currently, IB only provides these values for the Embedded SQL or DSQL
>interfaces.
>@@TRANCOUNT is there because these M$ beast allows a stored proc
>- @@TRANCOUNT (T-SQL)
>Returns the number of active transactions for the current connection.
> Maybe a solution looking for a problem? Not sure.
to start/commit/rollback a transaction. Because of this, they need this control.
IB don't let it in SP or triggers. Only a client can start/commit/rollback txns.
>- We already have USER variable. This is standard, I think. We need ROLE orGood for identifying users....
>ROLE_NAME, too.
>It would be useful if in the case new non-standard systemGeez... MSSQL SPs aren't unreadable enough? Anyway, it make sense.
>vars are included, they are preceded by some sign (MsSql uses @), so we
>don't forbid new plain words. Making "#version" a reserved word inside
>sprocs causes less problems than making "version" a reserved word.
But these things of putting "signs" often makes the code appeat to be
a spaghetti...
>Interesting, but used with care. A thread safe way of writing this must be
>- Extended Stored Procs are allowed. They are procedures written in an
>external language and compiled in a DLL. Don't confuse them with UDFs,
>because Extended Procs can return several parameters or result sets... maybe
>this is the Java-inside-IB idea of Jim.
provided, since these X-SPs are more powerful and (obviously) can represent
a new danger to metadata and data if bad writen.
At my viewpoint is a DOUBLE risk: result sets means that you manypulate
SQL in them. So, what type of SQL interface will be used?
BDE? (I think that will be tempted to do these crazy act) IBO? IBX? Raw API?
Jim's JDBC-style API?
If it can manipulate result sets, means also it can modiy/insert/delete, no?
So, a bad written baby can corrupt your DB file (as usual in bad behaved
UDFs) more it can drive your data crazy...
>Good!
>- Identifiers, including variables' names, parameters' names and procs and
>tables' names can go up to 128 characters. IB limit of 31 chars is annoying
>for people that come from Access and other databases.
>Something like the Extended Syntax in Delphi. If it is disabled, functions must have
>- Stored procedures can have optional parameters if one defines a default
>for those parameters. The default can be NULL, too. The default allows for
>wilcards that can be used by the LIKE operator.
> There's no counterpart in IB yet. Either you pass all parameters or fail in
>compilation time. Also, a procedure calling another NEEDS to include the
>RETUTRNING_VALUES part if the other proc returns values, even if the caller
>is interested only in the side effect of the called proc.
a host variable for their returns, even if you aren't interested in their results.
If enabled, you can use your functions as normal procedures (between other things).
>I think that at least 256K give us the best breathing we need and space to grow
>- Depending on available memory, the maximum size of a stored procedure is
>128 MB.
> IB only allows for 32K. I don't need 128 MB to match MsSql, but at least
>128 KB, in case of emergencies...a few times I've hit the current IB
>maximum.
in future.
>- If you create a private temporary table inside a stored procedure, theThese always loved temp tables... ;-) In my MSSQL times it make some
>temporary table exists only for the purposes of the stored procedure; it
>disappears when you exit the stored procedure.
ugly Quickreports act like they are a much more than decent report writer... ;-)
> In IB, it can't be done. However, it's needed for complex task whereTemp tables are powerful. Let go for it.
>selectable procedures fall short, for example multi-passes over a recordset
>before returning it. Also, this facility can help with server-side crosstab
>queries (matrix transposition).
<snip some Mickey$oft IB plagium> ;-))))
>Ressurect GDML? Increased power SQL interface?
>- MsSql's procedures can alter data on tables on other databases. Triggers
>can make references to other databases. FK relationships can target other
>databases on the same server. Procedures can connect even to remote servers.
> Apart from QLI, this is science fiction in IB still.
>Hmmm? I miss the magic here: how it can help us, independent of the documentation
>- You can group stored procedures of the same name. The syntax to call one
>of these is really clumsy, example taken from the help file:
>EXECUTE my_proc;2
>but at least there's some support. IB doesn't know anything about
>overloading on procedures.
hassles...?
>Guy, that exist even in MSSQL 6.5 (I looked into it from Jan/98 to May/99, in
>- Helen's trick with IB5.1 works on MsSql: you can issue a complex SQL's
>SELECT statement and the resultset is returned to the client that executed
>the stored proc.
different projects).
>OK.
>- Modulo and bitwise operators. Only available in IB through UDFs, I think
>at least modulo should be built-in.
>- Trimming of chars longer than expected. In IB, this generates the dreadedHmmmm
>"arithmetic overflow or string truncation" error msg.
>THIS will help much guys around the world...
>- Coalesce to deal with NULLs. Limited counterpart with UDFs. Also, UDFs
>need an official way to signal NULLs.
>MSSQL is a very ugly monster: fat, bad humoured and have emotionally unstable companions
>OT but IB uses system var USER... is USER or CURRENT_USER the standard?
>
> Excuse me for writing Interbase without the capitalized "b", this is the
>reason I prefer to write IB and avoid problems.
>;-)
>
> I'm preparing an extensive comparison of types between Monster-Server (aka
>SqlServer) and flea-Server (aka Interbase). I didn't wanted to offend IB, I
>only wanted to mean it's lightweight.
(sometimes always appear some one cursing it's graphical tools...) ;-)))
IB is light and cute. At least, more cute than the monster... :-)
Thank you, Claudio, to help me to remember this.
[]s Fabricio
[]s Fabricio
Delphi C/S Developer