Database Languages and Interfaces
Database Languages and Interfaces
A Database Management System (DBMS) must support different kinds of users—designers, administrators, programmers, and end users. To meet these varied needs, the DBMS provides specialized languages for defining and manipulating the database, as well as multiple interfaces to simplify interaction for different user groups.
DBMS Languages
Once the database design is finalized, the DBMS uses several types of languages to define the database structure and to manipulate its contents.
1. Data Definition Language (DDL)
-
Used by database designers and DBAs to define:
-
The conceptual schema (logical structure of the entire database)
-
Sometimes also the internal schema and external schemas (views)
-
-
A DDL compiler processes these statements and stores schema definitions in the DBMS catalog (metadata).
In strict three-schema DBMSs:
-
DDL defines the conceptual schema.
-
Storage Definition Language (SDL) defines the internal schema.
-
View Definition Language (VDL) defines user views.
In modern relational DBMSs:
-
SQL serves as DDL and VDL.
-
There is no separate SDL; storage details are controlled through physical parameters, index definitions, etc.
2. Storage Definition Language (SDL)
-
Used in DBMSs that strictly separate the internal schema.
-
Defines how the data is stored physically.
-
Not commonly a separate language today; instead, storage is controlled through DBMS utilities and parameters.
3. View Definition Language (VDL)
-
Used to define external schemas or user views.
-
In modern relational systems, SQL is used for view creation (
CREATE VIEW).
4. Data Manipulation Language (DML)
DML is used to retrieve, insert, delete, and update data once the database is populated.
Two types of DML:
A. High-Level (Nonprocedural) DML
-
Operates on sets of records at once → set-at-a-time or set-oriented DML.
-
User specifies what to retrieve, not how.
-
SQL is the most common example.
-
Can be:
-
Interactive (ad hoc queries)
-
Embedded in a host language (SQL inside Java, Python, C, etc.)
-
B. Low-Level (Procedural) DML
-
Retrieves records one at a time → record-at-a-time DML.
-
Requires looping and control structures.
-
Always embedded in a programming language.
When embedded in a host language:
-
The host language is called the host language.
-
The DML component is called the data sublanguage.
Query Languages
DBMS Interfaces
Different categories of users need different interfaces. Modern DBMSs support a wide range of user-friendly options.
1. Menu-Based Interfaces (Web or GUI)
-
Provide lists of choices to users.
-
Useful for naive users who should not learn query syntax.
-
Common in web-based applications (e.g., airline booking).
2. Mobile Apps
-
Provide simplified operations for mobile device users.
-
Common in banking, e-commerce, reservations, and insurance apps.
-
Include login screens, menus, and guided workflows.
3. Forms-Based Interfaces
-
Users fill out forms to insert or retrieve data.
-
Used for canned transactions (e.g., hotel reservations, order entry).
-
Support specialized form design tools such as Oracle Forms, SQL*Forms.
4. Graphical User Interfaces (GUI)
-
Provide a diagrammatic representation of schema.
-
Users create queries by visually manipulating objects.
-
Often include menu and form elements.
5. Natural Language Interfaces
-
Accept English (or other human language) queries.
-
Use:
-
A dictionary,
-
A natural language schema,
-
Parsing and interpretation techniques.
-
-
If the system cannot interpret the query, it asks clarifying questions.
6. Keyword-Based Database Search
-
Similar to web search engines.
-
Users type in a set of keywords.
-
The system searches predefined indexes and ranks results.
-
Research area: keyword-based querying for relational databases.
7. Speech Input and Output
-
Used in systems with limited vocabularies (e.g., phone-based banking or airline info).
-
Converts spoken input into parameters for queries.
-
Converts query results back into speech.
8. Interfaces for Parametric Users
-
Used by clerks, bank tellers, reservation agents.
-
Limited operations performed repeatedly.
-
Designed to minimize keystrokes and simplify routine tasks.
-
Contain function keys or simplified menus.
9. Interfaces for the DBA
Provide privileged access to system-level commands:
-
Creating user accounts
-
Granting permissions
-
Setting system parameters
-
Defining schemas
-
Reorganizing storage
-
Monitoring performance
These are not available to regular users.
Summary
DBMS Languages
-
DDL → Defines schemas
-
SDL → Defines internal storage (rare today)
-
VDL → Defines views
-
DML → Manipulates data
-
High-level (SQL)
-
Low-level (record-at-a-time)
-
Interfaces
-
Menu-based
-
Mobile apps
-
Forms-based
-
GUI
-
Natural language
-
Keyword-based search
-
Speech interfaces
-
Parametric user interfaces
-
DBA command interfaces
Comments
Post a Comment