My curiosity is answered :) The changes you have made are way beyond of what one could have hoped for. Thanks for this important contribution to the Db2 documentation.
Original Message:
Sent: Thu June 06, 2024 12:31 AM
From: Paul McWilliams
Subject: Db2 Z SQL terms
Hi all,
Here's a Db2 documentation update, just published today:
- Spelled-out forms of DDL, DML, and DCL, plus "see also" entries for their abbreviations can now be found in the Db2 glossary.
- SQL: The language of Db2 now has three bullets (versus the two bullets and a paragraph that were there before), and they each indicate that they are examples of DDL, DML, or DCL.
- Statements now also includes that same three-bullet list.
- Categories of SQL statements is a new topic. It features a table of all supported SQL statements organized by formal category in the left column, with text that identifies which statements are considered DDL, DML, and DCL, and mentions of some other commonly used categories, in the right column.
- As always, the current edition of the PDF format Db2 for z/OS SQL Reference has also been updated with the applicable changes.
Thanks again!
------------------------------
Paul McWilliams
Original Message:
Sent: Mon June 03, 2024 11:15 PM
From: Paul McWilliams
Subject: Db2 Z SQL terms
Hi Craig,
I'm looking into making some changes in the Db2 product documentation based on your feedback.
The SQL statement categories, like DDL, DML, and DCL have a bit of a complicated history and relationship with the Db2 product documentation.
For one thing, although commonly known and widely used, they are informal categories (Wikipedia even says so), in that they are not defined in the SQL Standard. The standard actual sets forth its own list of statement categories, and they don't completely match with the three categories that you mentioned. For example, the GRANT and REVOKE statements appear to be grouped in with the SQL schema category, which is mainly the DDL statements.
Another complication is that many SQL statements do not fit neatly into DDL, DML, or DCL. Some online resources suggest that queries belong in DQL (data query language), although we'll likely consider them as DML. Others mention TCL (for transaction control language) for statements like COMMIT and ROLLBACK and SET. The SQL standard actually sets forth eight categories of SQL statements: SQL-schema, SQL-Data, SQL-control, SQL-connection, SQL-session, SQL-diagnostics, and SQL-dynamic statements.
Yet another consideration as that the Db2 product documentation generally tries to avoid sweeping generalizations where these terms would be useful, so it didn't seem to make much sense to define them.
However, it's also true that they have gotten into various Db2 for z/OS externals over the years, especially DDL and DML. So it probably is worthwhile for the documentation to mention their meaning.
I also found that both DDL and DML are defined in the Db2 (for Linux, UNIX, and Windows) glossary, so we'll likely add those to the Db2 for z/OS glossary too using the same words, which use the approved IBM-wide terminology definitions. I am also already trying to work these terms into the section that you cited above, so I will take your posting it as an indication that I am on the right track.
Thanks for the suggestion, and stay tuned!
------------------------------
Paul McWilliams
Original Message:
Sent: Mon June 03, 2024 09:43 PM
From: CRAIG MCKELLAR
Subject: Db2 Z SQL terms
I guess the point I am highlighting here is that we are well aware of these terms but they are not actually used or referenced in the Knowledge centre and probably should be since they are well used elsewhere.
If you look at the heading of SQL reference:
SQL: The language of Db2
Last Updated: 2024-05-21
The language that you use to access the data in Db2 tables is the structured query language (SQL). SQL is a standardized language for defining and manipulating data in a relational database.
The language consists of SQL statements. You can issue SQL statements to accomplish the following actions:
- Define, modify, or drop data objects, such as tables.
- Retrieve, insert, update, or delete data in tables.
You can use other SQL statements to authorize users to access specific resources, such as tables or views.
Note here the terms DDL or DML are not used and likewise in the Glossary of terms they are missing.
------------------------------
CRAIG MCKELLAR
Original Message:
Sent: Mon June 03, 2024 09:15 PM
From: Antonio Couto
Subject: Db2 Z SQL terms
Hi Craig,
The terms DDL, DML and DCL refers to groups of SQL commands or statements, related to their main function.
DDL - Data Definition Language: which are the set of SQL statements used to define (create), alter and delete SQL objects, like databases, table spaces, tables, indexes, views, etc.
For example: CREATE TABLE, DROP, etc...
DML - Data Manipulation Language: which are the set of SQL statements used to manipulate data within the SQL objects, particularly in tables.
For example: SELECT, INSERT, UPDATE, DELETE, etc...
DCL - Data Control Language: which are the set of SQL statements used to control access to the SQL objects and database management functions, like the SYSADM, SYSCTL, DBADM, etc.
For example: GRANT, REVOKE, etc...
This link contains an alphabetical list of the SQL statements that Db2 for z/OS® supports.
Best regards,
------------------------------
Antonio Couto
Sr. Technical Consultant
Broadcom
Sao Paulo
11940683438
Original Message:
Sent: Thu May 30, 2024 10:21 PM
From: CRAIG MCKELLAR
Subject: Db2 Z SQL terms
I am curious about the use of the SQL terms DDL,DML,DCL. These terms are widely used but if you look in the IBM Knowledge centre they are not included in the Glossary of terms or in reference to SQL. There are catalog tables and error messages that include DDL.
Are these old school terms now or have they just been omitted from the Knowledge Centre and it should be updated? So if I asked what is DDL the KC is not going to tell me.
------------------------------
CRAIG MCKELLAR
------------------------------