db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dimple Bhatia" <dim...@gmail.com>
Subject Re: Static SQl in Derby
Date Fri, 03 Aug 2007 17:28:29 GMT
Dynamic SQL versus static SQL

In general, dynamic SQL is more flexible than static SQL, because it does
not require SQL statements to be created in advance. Static SQL is more
efficient, because the database has done much of the work required to run
the SQL statements before run time.

Dynamic SQL provides the ability to query and update tables when, for
example, you do not know the number and types of the columns until run time.
Using dynamic SQL in JDBC, a Java program can create SQL statements at run
time.

With dynamic SQL, database access and authorization are determined at run
time. The user of the application must have all required database
privileges, and the database must determine the best way to access the
required data at run time. However, with static SQL, access and
authorization are determined at customization and bind time. The privileges
of the user who performs the bind process determine what the application can
do. The database determines the best way to access data during customization
and bind time, which improves run-time performance.

Many applications do not need to dynamically create SQL statements because
the database metadata (such as table and column names) does not change at
run time. Such applications can use static SQL, which provides better
performance than dynamic SQL.


On 8/3/07, Bryan Pendleton <bpendleton@amberpoint.com> wrote:
>
> > Can we use static SQL in Derby? Does it support it?
>
> What is static SQL? Can you provide a pointer to a
> definition, or examples of static SQL?
>
> thanks,
>
> bryan
>
>
>

Mime
View raw message