Course Code: Comp 324 Course Name: Database Management System II Lecture 1: Introduction To DBMS II
Course Code: Comp 324 Course Name: Database Management System II Lecture 1: Introduction To DBMS II
Psalm 23:1
The LORD is my shepherd, I shall not be in want.
Lecture Outline
1. Course Outline Overview
2. Introduction
3. Database applications
4. Functions of database applications
5. Access to Databases
6. Embedded SQL
7. Cursors
8. Class Activity (Moodle)
Recap from DBMS I
Recap from DBMS I
Database Applications
• Database applications are separate programs that invoke or are
connected to the DBMS e.g grading system, timetabling system,
examination system etc.
• These applications can be online/web-based applications or
stand-alone applications.
• Applications that rely on the DBMS to manage data run on as
separate processes that connect to the DBMS to interact with it.
• Once a connection has been established, SQL commands can
be used to insert, delete and modify data and SQL queries can
be used to retrieve data from database.
Functions of Database Applications
• To process views of data i.e. to create, read, update and delete
(CRUD)- Four basic processing functions.
• To format or materialize the views that are being processed.
Formats such as reports, forms etc
• Enforcing constraints e.g. requiring data values to fit domain
specifications, ensuring uniqueness, and enforcing relationship
constraints
• To provide mechanisms for security and control
• To execute business logic.
Applications Accessing Databases
Applications can access databases via:
• Dynamic SQL – This is where a query is allowed to be constructed and executed at
runtime.
• Embedded SQL
• Cursors
• API (Application Programming Interface) – for instance ODBC (Open Database
Connectivity) and JDBC (Java Database Connectivity) enable the integration of SQL with
general purpose programming language
NB: There is a difference between how database system views data and how applications
view data i.e. the results of a database query is a set (multiset) of records, but for instance,
Java has no set or multiset data type.
How SQL can be used
SQL can be used in two ways:
• As an interactive query language and database
programming language.
• Including both DDL and DML statements, SQL can be
embedded in an application program.