DBMS MySQL Chapter7
DBMS MySQL Chapter7
Prof. Sivaselvan B
Professor, Dept. of CSE
IIITDM Kancheepuram
January, 2024
1 Database Programming
2 Function Calls
Database Programming
Impedance Mismatch
Function Calls
EXEC SQL
Prefix
Preprocessor separates embedded SQL statements from host language
code
Terminated by a matching END-EXEC or by a semicolon (;)
Shared Variables
Used in both the C program and the embedded SQL statements
Prefixed by a colon (:) in SQL statement
Environment record
Track one or more database connections
Set environment information
Connection record - Keeps track of information needed for a
particular database connection
Statement record - Keeps track of the information needed for one
SQL statement
Description record - Keeps track of information about tuples or
parameters
Handle to the record - C pointer variable makes record accessible to
program
Stored procedures
Program modules stored by the DBMS at the database server
Can be functions or procedures
SQL/PSM (SQL/Persistent Stored Modules)
Extensions to SQL
Include general-purpose programming constructs in SQL
Thank you!