• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

sql

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
can anyone pls tell me about static embedded sql, dynamic embedded sql and embedded sql....thanks in advance...
 
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"embedded" in java programming usually refers to the SQLJ standard as opposed to JDBC.
all the information is here:
http://otn.oracle.com/tech/java/sqlj_jdbc/htdocs/buswhpaper.html
dynamic vs static:
"SQL can be used in two different ways: static SQL and dynamic SQL. Most OLTP applications are built in a fashion where SQL statements and the database schema against which they are to be run are known at application development time (static SQL). Static SQL can be written directly in Java using the standard SQLJ syntax. At compile time, the SQLJ translator recognizes these SQL statements and performs syntax checking, semantic checking, type checking, and schema checking on these statements. The SQLJ translator converts these embedded SQL statements into Java and generates a pure Java program. Oracle�s SQLJ translator converts embedded SQL statements into JDBC calls, the standard way to access databases from Java programs.
However, in other applications, like ad-hoc query tools, the SQL statements are not known until run-time (dynamic SQL). Dynamic SQL provides greater flexibility than static SQL since a calling program has the ability to construct and process SQL strings created at run-time. This capability comes at a greater programming cost due to the increased complexity of code necessary to support flexible, dynamic operations. Many applications do not require this level of complexity as the SQL commands that they use are pre-determined. SQLJ allows programmers the flexibility to mix JDBC calls in SQLJ programs thereby leveraging the benefits of both SQLJ and JDBC. However, Oracle recommends that application developers use SQLJ for developing applications that use static SQL and JDBC for applications that use dynamic SQL. "
Jamie
 
They worship nothing. They say it's because nothing is worth fighting for. Like this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic