Impedance mismatch is the term used to refer to the problems that occurs due to differences between the database model and the programming language model. The practical relational model has 3 components these are:
- Attributes and their data types
Following problems may occur due to the impedance mismatch:
- The first problem that may occur is that is data type mismatch means the programming language attribute data type may differ from the attribute data type in the data model.
Hence it is quite necessary to have a binding for each host programming language that specifies for each attribute type the compatible programming language types. It is necessary to have different data types, for example, we have different data types available in different programming languages such as data types in C are different from Java and both differ from SQL data types.
- The second problem that may occur is because the results of most queries are sets or multisets of tuples and each tuple is formed of a sequence of attribute values. In the program, it is necessary to access the individual data values within individual tuples for printing or processing.
Hence there is a need for binding to map the query result data structure which is a table to an appropriate data structure in the programming language. A mechanism is needed to loop over the tuples in a query result in order to access a single tuple at a time and to extract individual values from the tuple.
The extracted values are typically copied to appropriate program variables for further processing by the program.
A cursor or iterator is a variable which is used for looping over the tuples in a query result. Individual values within each tuple are extracted into different or unique program variables of the appropriate datatype.
Impedance mismatch is less of a problem when a special database programming language is designed that uses the same data model and data type as a database model for example Oracles’sPL/SQL.
Example – UGC NET CS 2016 Aug – III | Question 7
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.
- Lossless Decomposition in DBMS
- Introduction of Relational Algebra in DBMS
- Need for DBMS
- Commonly asked DBMS interview questions | Set 1
- Normal Forms in DBMS
- View Serializability in DBMS Transactions
- Relational Model in DBMS
- Commonly asked DBMS interview questions | Set 2
- Concurrency Control in DBMS
- Recoverability in DBMS
- Last Minute Notes - DBMS
- ACID Properties in DBMS
- DBMS Architecture 2-Level, 3-Level
- Introduction of DBMS (Database Management System) | Set 1
- Introduction of 3-Tier Architecture in DBMS | Set 2
- Introduction of Relational Model and Codd Rules in DBMS
- Precedence Graph For Testing Conflict Serializability in DBMS
- Canonical Cover of Functional Dependencies in DBMS
- Thomas Write Rule in DBMS
- Armstrong's Axioms in Functional Dependency in DBMS
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.
Improved By : klassegeljakt