Question

10.1. What is ODBC? How is it related to SQL/CLI? 10.2. What is JDBC? Is it...

10.1. What is ODBC? How is it related to SQL/CLI?
10.2. What is JDBC? Is it an example of embedded SQL or of using function calls?
10.3. List the three main approaches to database programming. What are the
advantages and disadvantages of each approach?
10.4. What is the impedance mismatch problem? Which of the three programming
approaches minimizes this problem?
10.5. Describe the concept of a cursor and how it is used in embedded SQL.
10.6. What is SQLJ used for? Describe the two types of iterators available in SQLJ.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer:10.1------- Open Database Connectivity (ODBC) is an open standard application programming interface (API) that allows application programmers to access any database.The main proponent and supplier of ODBC programming support is Microsoft, but ODBC is based on and closely aligned with The Open Group standard Structured Query Language (SQL) Call-Level Interface (CLI).
Open Database Connectivity (ODBC) is a Microsoft specification for an API that constitutes an implementation of the international standards for the SQL CLI. ODBC is a superset of the SQL API because it defines many functions that the international standards for the SQL API do not define. The term ODBC is a more commonly used term than SQL CLI, and the two terms are often used interchangeably, especially in the C and C++ programming environments. Unless otherwise noted, the terms SQL CLI and ODBC mean the same thing in this document.


Answer:10.2------ JDBC stand for Java database connectivity. ... That is specified in the JDBCapplication programming interface. It is designed for allow a single java program to connect several different databases.

Answer:10.3-------
1. Embedding database commands into a general-purpose programming language

  • Advantages: Easy to use (for static queries); query syntax can be checked at compile time
  • Disadvantages: No dynamic queries; requires language specific pre-compiler; needs specific IDE support.

2.Designing a brand-new language

  • Advantages: No impedance mismatch; possibly performance advantages due to DB integration; syntax check at compile time
  • Disadvantages: It is hard to reuse existing code written in more popular languages; DB programming languages often don’t “feel” like a “real” programming language; lack of IDEs

3. Using a library of database function

  • Advantages: Mostly independent of the programming language used; allows dynamic querying, even using multiple database connections; good tool support (use of libraries is already covered by standard functionalities of IDEs)
  • Disadvantages: Query syntax cannot be checked at compile time; possibly inferior performance


Answer:10.4------- Impedance mismatch means that data types and structures (e.g. sets) often cannot be aligned with the data types available in most programming languages.
• Null values, tuples, sets of tuples, VARCHAR, ...

This problem is minimized by using a specialized DB programming language since it is designed to match
the database’s data types and structures.

Answer:10.5-------

  • A cursor is a mechanism to iterate over the rows of a result set and access the individual attribute values of each row.
  • At every point in time, the cursor points to some position in the result set: Either at the place before the first row, at some row, or at the place after the last row.
  • A cursor is created by deriving it from some query result. It initially points at the place before the first result row
  • The cursor can be instructed to move/point to the next row (if there is any).
  • If the cursor points at some row, the corresponding attributes values can be accessed.

In embedded SQL:

  • Create cursor with DECLARE CURSOR
  • Open it with OPEN
  • Go to next row and copy attribute values into variables with FETCH INTO
  • Close cursor with CLOSE

Answer:10.6-------

SQLJ is a language extension used for database transactions in Java™ EE applications. It produces static, embedded SQLJ. The term is made up of SQL which stands for Structured Query Language and J which stands for Java EE.SQLJ is static because the SQL statements that will be executed at runtime are known when the program is assembled. Contrast this to JDBC, where the queries that are executed can be changed at any time. SQLJ is embedded because during binding, a serialized form of the programs SQL statements is given to the database.

named iterator :-- Specifies a list of Java data types and Java identifiers, which are the data types and names of the columns in the named iterator. Pairs of data types and names must be separated by commas. The name of a column in the iterator must match, except for case, the name of a column in the result table. For online checking during serialized profile customization to succeed, the data types of the columns in the iterator must be compatible with the data types of the columns in the result table. See "Java, JDBC, and SQL data types" for a list of compatible data types.

positioned iterator :-- Specifies a list of Java data types, which are the data types of the columns in the positioned iterator. The data types in the list must be separated by commas. The order of the data types in the positioned iterator declaration is the same as the order of the columns in the result table. For online checking during serialized profile customization to succeed, the data types of the columns in the iterator must be compatible with the data types of the columns in the result table. See "Java, JDBC, and SQL data types" for a list of compatible data types.

Add a comment
Know the answer?
Add Answer to:
10.1. What is ODBC? How is it related to SQL/CLI? 10.2. What is JDBC? Is it...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 3080/5080 Materials Science and Engineering: Spring 2019 ead Ch. 10.1, 10.2, 10.3, 10.4, 10.5, 10...

    3080/5080 Materials Science and Engineering: Spring 2019 ead Ch. 10.1, 10.2, 10.3, 10.4, 10.5, 10.9, 10.10, 10.11 CHEN Home Work 19 due Tue, Apr 16 Review olved Problems 10.1, 10.2, 10.3, 10.4, 10.6, 10.7,10.8, 10.9, 10.1o 1. Distinguish between the i) structure, ii) processing and ili) properties of a) thermoplastic b) th eric material has a relaxation time of 25 days at 27°C when a stress of 7.0 MPa is applied. days will be required to decrease the stress to...

  • 10.3 Show that for the geometries of Figures 10.1 and 10.2, n = R/a, which leads...

    10.3 Show that for the geometries of Figures 10.1 and 10.2, n = R/a, which leads to the following important approximate relation: Radius of particles Adhesion or binding energy of particles Binding energy of atoms x * Radius of atoms (10.23) Dispersed state (b) Associated state Wo O 00 AW = Wom - Weg --(A - BỈ (c) Dispersed Associated AW -A-B) (d) Dispersed Associated OORON A nA a oao Og AW -NA-B) FIGURE 10.1 (a) Two central molecules A...

  • based on this assignment: For this assignment, you will undertake an analysis based on a self-designed...

    based on this assignment: For this assignment, you will undertake an analysis based on a self-designed fictitious study that utilizes statistical methodologies. You will first develop a fictitious problem to examine - it can be anything. For example, maybe you want to look at whether scores on a standardized college placement test (like the SAT) are related to the level of income a person makes 10 years after college; Or, whether those who participate in a Leadership Training program rated...

  • Please read the opening vignette about Community Medical Center in Missoula. How have they used lean...

    Please read the opening vignette about Community Medical Center in Missoula. How have they used lean management approaches to efficiently utilize resources (human resources and processes), eliminate waste, incorporate Total Quality Management, and also motivated the Respect for People I have uploaded the figures from 10.1 to 10.6 to give you more details. Please use them when explaining the question. Thank you! Orthopedic surgeon Doug Woolley was frustrated. A bottleneck in the recovery room at the Community Medical Center in...

  • Please read the opening vignette about Community Medical Center in Missoula. How have they used lean...

    Please read the opening vignette about Community Medical Center in Missoula. How have they used lean management approaches to efficiently utilize resources (human resources and processes), eliminate waste, incorporate Total Quality Management, and also motivated the Respect for People I have uploaded the figures from 10.1 to 10.6 to give you more details. Please use them when explaining the question. Thank you! Orthopedic surgeon Doug Woolley was frustrated. A bottleneck in the recovery room at the Community Medical Center in...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT