Information technology — Database languages SQL — Part 1: Framework (SQL/Framework)

Technologies de l'information — Langages de base de données SQL — Partie 1: Charpente (SQL/Charpente)

General Information

Status
Published
Publication Date
31-May-2023
Current Stage
6060 - International Standard published
Start Date
01-Jun-2023
Due Date
30-Apr-2023
Completion Date
01-Jun-2023
Ref Project

Relations

Buy Standard

Standard
ISO/IEC 9075-1:2023 - Information technology — Database languages SQL — Part 1: Framework (SQL/Framework) Released:1. 06. 2023
English language
74 pages
sale 15% off
Preview
sale 15% off
Preview

Standards Content (Sample)

INTERNATIONAL ISO/IEC
STANDARD 9075-1
Sixth edition
2023-06
Information technology — Database
languages — SQL —
Part 1:
Framework (SQL/Framework)
Technologies de l'information — Langages de base de données —
SQL —
Partie 1: Charpente (SQL/Charpente)
Reference number
ISO/IEC 9075-1:2023(E)
© ISO/IEC 2023

---------------------- Page: 1 ----------------------
ISO/IEC 9075-1:2023(E)
COPYRIGHT PROTECTED DOCUMENT
© ISO/IEC 2023
All rights reserved. Unless otherwise specified, or required in the context of its implementation, no part of this publication may
be reproduced or utilized otherwise in any form or by any means, electronic or mechanical, including photocopying, or posting on
the internet or an intranet, without prior written permission. Permission can be requested from either ISO at the address below
or ISO’s member body in the country of the requester.
ISO copyright office
CP 401 • Ch. de Blandonnet 8
CH-1214 Vernier, Geneva
Phone: +41 22 749 01 11
Email: copyright@iso.org
Website: www.iso.org
Published in Switzerland
ii
© ISO/IEC 2023 – All rights reserved

---------------------- Page: 2 ----------------------
ISO/IEC9075-1:2023(E)
Contents Page
Foreword.x
Introduction.xii
1 Scope.1
2 Normativereferences.2
3 Termsanddefinitions.3
3.1 DefinitionstakenfromISO/IEC10646:2020.3
3.2 Definitionsprovidedinthisdocument.3
4 Concepts.6
4.1 WhatisSQL?.6
4.2 Useofterms.6
4.3 Caveat.7
4.4 SQL-environmentsandtheircomponents.7
4.4.1 SQL-environments.7
4.4.2 SQL-agents.7
4.4.3 SQL-implementations.7
4.4.3.1 IntroductiontoSQL-implementations.7
4.4.3.2 SQL-clients.7
4.4.3.3 SQL-servers.8
4.4.4 SQL-clientmodules.8
4.4.5 User identifiers.8
4.4.6 Roles.8
4.4.7 Usermappingconcepts.8
4.4.8 Routinemappingconcepts.8
4.4.9 Catalogsandschemas.9
4.4.9.1 Catalogs.9
4.4.9.2 SQL-schemas.9
4.4.9.3 InformationSchema.9
4.4.9.4 DefinitionSchema.9
4.4.10 Foreignserversanddescriptors.9
4.4.11 Foreign-datawrappersanddescriptors.9
4.4.12 SQL-data.10
4.5 Tables.10
4.6 SQLdatatypes.11
4.6.1 Generaldatatypeinformation.11
4.6.2 Nullvalue.11
4.6.3 Predefinedtypes.11
4.6.3.1 Numerictypes.11
4.6.3.2 Characterstringtypes.12
©ISO/IEC2023–Allrightsreserved iii

---------------------- Page: 3 ----------------------
ISO/IEC9075-1:2023(E)
4.6.3.3 Binarystringtypes.12
4.6.3.4 Booleantype.12
4.6.3.5 Datetime types.12
4.6.3.6 Interval types.12
4.6.3.7 XMLtype.12
4.6.3.8 JSONtype.13
4.6.4 Constructedatomictypes:referencetypes.13
4.6.5 Constructedcompositetypes.13
4.6.5.1 Collection types.13
4.6.5.2 Row types.13
4.7 Sitesandoperationsonsites.13
4.7.1 Sites.13
4.7.2 Assignment.13
4.7.3 Nullability.14
4.8 SQL-schema objects.14
4.8.1 GeneralSQL-schemaobjectinformation.14
4.8.2 Descriptorsrelatingtocharactersets.14
4.8.2.1 Charactersets.14
4.8.2.2 Collations.15
4.8.2.3 Transliterations.15
4.8.3 Domainsandtheircomponents.15
4.8.3.1 Domains.15
4.8.3.2 Domain constraints.15
4.8.4 User-defined types.15
4.8.4.1 Introductiontouser-definedtypes.15
4.8.4.2 Distinct types.15
4.8.4.3 Structuredtypes.16
4.8.5 Basetablesandtheircomponents.16
4.8.5.1 Base tables.16
4.8.5.2 Columns.16
4.8.5.3 Periods.16
4.8.5.4 Table constraints.16
4.8.5.5 Triggers.17
4.8.6 View definitions.17
4.8.7 Assertions.17
4.8.8 SQL-servermodules(definedinISO/IEC9075-4).17
4.8.9 Schema routines.17
4.8.10 Sequence generators.17
4.8.11 Privileges.17
4.9 Integrityconstraintsandconstraintchecking.18
4.9.1 Constraint checking.18
4.9.2 Determinismandconstraints.18
4.9.3 Consistencywhendeletingandupdatingmultiplerows.19
4.10 CommunicationbetweenanSQL-agentandanSQL-server.19
4.10.1 Host languages.19
4.10.2 Sourcelanguagecharacterset.20
4.10.3 Parameterpassinganddatatypecorrespondences.20
iv ©ISO/IEC2023–Allrightsreserved

---------------------- Page: 4 ----------------------
ISO/IEC9075-1:2023(E)
4.10.3.1 Generalparameterpassinganddatatypecorrespondenceinformation.20
4.10.3.2 Datatypecorrespondences.20
4.10.3.3 Locators.21
4.10.3.4 Statusparameters.21
4.10.3.5 Indicatorparameters.21
4.10.4 Descriptor areas.21
4.10.5 Diagnosticinformation.21
4.10.6 SQL-transactions.21
4.11 Modules.22
4.12 Routines.22
4.12.1 Generalroutineinformation.22
4.12.2 Typepreservingfunctions.23
4.13 SQL-statements.23
4.13.1 ClassesofSQL-statements.23
4.13.2 SQL-statementsclassifiedbyfunction.24
5 PartsoftheISO/IEC9075series.25
5.1 Overview.25
5.2 ISO/IEC9075-1:Framework(SQL/Framework).25
5.3 ISO/IEC9075-2Foundation(SQL/Foundation).26
5.3.1 IntroductiontoISO/IEC9075-2Foundation(SQL/Foundation).26
5.3.2 Bindingsmethods.26
5.3.2.1 Introductiontobindingsmethods.26
5.3.2.2 Embedded SQL.26
5.3.2.3 DynamicSQL.26
5.3.2.4 DirectinvocationofSQL.26
5.3.3 SQL-statementsspecifiedinISO/IEC9075-2.26
5.4 ISO/IEC9075-3:Call-LevelInterface(SQL/CLI).27
5.5 ISO/IEC9075-4:PersistentStoredModules(SQL/PSM).28
5.5.1 IntroductiontoSQL/PSM.28
5.5.2 SQL-statementsspecifiedinISO/IEC9075-4.28
5.6 ISO/IEC9075-9:ManagementofExternalData(SQL/MED).28
5.7 ISO/IEC9075-10:ObjectLanguageBindings(SQL/OLB).28
5.8 ISO/IEC9075-11:InformationandDefinitionSchemas(SQL/Schemata).28
5.9 ISO/IEC9075-13:SQLRoutinesandTypesUsingtheJava™ProgrammingLanguage(SQL/JRT).29
5.10 ISO/IEC9075-14:XML-RelatedSpecifications(SQL/XML).29
5.11 ISO/IEC9075-15:MultidimensionalArrays(SQL/MDA).29
5.12 ISO/IEC9075-16:PropertyGraphQueries(SQL/PGQ).29
6 NotationandconventionsusedinotherpartsoftheISO/IEC9075series.31
6.1 NotationtakenfromISO/IEC10646:2020.31
6.2 NotationprovidedintheISO/IEC9075series.31
6.3 Conventions.32
6.3.1 Specificationofsyntacticelements.32
6.3.2 SpecificationoftheInformationandDefinitionSchemata.33
6.3.3 Useofterms.33
6.3.3.1 Syntactic containment.33
6.3.3.2 Termsdenotingrulerequirements.34
6.3.3.3 Ruleevaluationorder.35
©ISO/IEC2023–Allrightsreserved v

---------------------- Page: 5 ----------------------
ISO/IEC9075-1:2023(E)
6.3.3.4 Conditional rules.36
6.3.3.5 Syntacticsubstitution.36
6.3.3.6 Otherterms.37
6.3.3.7 Exceptions.37
6.3.4 Descriptors.38
6.3.5 Applicationoftechnicalcorrigenda.39
6.3.6 RelationshipsofpartswithintheISO/IEC9075series.39
6.3.6.1 Introductiontorelationshipsamongparts.39
6.3.6.2 Clauses1,2,and3.40
6.3.6.3 NewandmodifiedClausesandSubclauses.40
6.3.6.4 NewandmodifiedTables,Figures,Examples,andEquations.41
6.3.6.5 Functions.41
6.3.6.6 NewandmodifiedFormatItems.41
6.3.6.7 Newandmodifiedparagraphsandrules.42
6.3.6.8 ModifiedSubclauseSignatures.44
6.3.6.9 NewandmodifiedAnnexes.44
6.3.6.10 Orderofmerginganincrementalpart.45
6.3.7 Subclausesusedassubroutines.45
6.3.8 Document typography.46
6.3.9 Index typography.46
6.3.10 FeatureIDandFeatureName.46
6.3.11 Implementation-definedandimplementation-dependent.47
6.4 Digital artifacts.48
6.4.1 Introductiontodigitalartifacts.48
6.4.2 Languagesyntax.48
6.4.3 Conditioncodes.48
6.4.4 Feature codes.49
6.4.5 Implementation-defined items.50
6.4.6 Implementation-dependentitems.50
6.4.7 Header files.51
6.4.8 Adainterface.51
6.4.9 Schemadefinition.51
6.4.10 XMLSchemata.52
7 AnnexestothepartsoftheISO/IEC9075series.53
7.1 Annexesareinformative.53
7.2 SQLconformancesummary.53
7.3 Implementation-defined elements.53
7.4 Implementation-dependent elements.53
7.5 Deprecated features.53
7.6 Incompatibilitieswithpreviousversions.53
7.7 SQLfeaturetaxonomy.53
7.8 DefectReports.53
8 Statuscodes.54
8.1 SQLSTATE.54
9 Conformance.55
9.1 Kindsofconformanceclaims.55
vi ©ISO/IEC2023–Allrightsreserved

---------------------- Page: 6 ----------------------
ISO/IEC9075-1:2023(E)
9.2 Minimum conformance.55
9.3 Conformancetoparts.55
9.4 Conformancetofeatures.55
9.5 Extensionsandoptions.56
9.6 SQLflagger.56
9.7 Claimsofconformance.57
9.7.1 Howconformanceisclaimed.57
9.7.2 RequirementsforSQLapplications.58
9.7.3 RequirementsforSQL-implementations.58
AnnexA(informative) SQLconformancesummary.59
AnnexB(informative) Implementation-definedelements.60
AnnexC(informative) Implementation-dependent elements.63
AnnexD(informative) SQLoptionalfeaturetaxonomy.65
AnnexE(informative) Deprecatedfeatures.66
AnnexF(informative) IncompatibilitieswithISO/IEC9075:2016.67
AnnexG(informative) DefectReportsnotaddressedinthiseditionofthisdocument.68
AnnexH(informative) MaintenanceandinterpretationofSQL.69
AnnexI(informative) Supportfortheuseofinter-documentlinksintheISO/IEC9075series.70
Bibliography.71
Index.72
©ISO/IEC2023–Allrightsreserved vii

---------------------- Page: 7 ----------------------
ISO/IEC9075-1:2023(E)
Tables
Table Page
1 Relationshipsbetweenexternally-invokedandSQL-invokedroutines.22
2 SymbolsusedinBNF.31
3 Examplesandexplanationsofparagraphandrulemergers.43
4 SQLSTATEclassandsubclasscodes.54
A.1 FeaturedefinitionsoutsideofConformanceRules.59
D.1 Featuretaxonomyforoptionalfeatures.65
I.1 Filename conventions.70
viii ©ISO/IEC2023–Allrightsreserved

---------------------- Page: 8 ----------------------
ISO/IEC9075-1:2023(E)
Figures
Figure Page
1 RelationshipsbetweenthepartsoftheISO/IEC9075series.40
©ISO/IEC2023–Allrightsreserved ix

---------------------- Page: 9 ----------------------
ISO/IEC 9075-1:2023(E)
Foreword
ISO (the International Organization for Standardization) and IEC (the International Electrotechnical
Commission) form the specialized system for worldwide standardization. National bodies that are
members of ISO or IEC participate in the development of International Standards through technical
committees established by the respective organization to deal with particular fields of technical activity.
ISO and IEC technical committees collaborate in fields of mutual interest. Other international
organizations, governmental and non-governmental, in liaison with ISO and IEC, also take part in the
work.
The procedures used to develop this document and those intended for its further maintenance are
described in the ISO/IEC Directives, Part 1. In particular, the different approval criteria needed for the
different types of document should be noted. This document was drafted in accordance with the editorial
rules of the ISO/IEC Directives, Part 2 (see www.iso.org/directives or
www.iec.ch/members_experts/refdocs).
ISO and IEC draw attention to the possibility that the implementation of this document may involve the
use of (a) patent(s). ISO and IEC take no position concerning the evidence, validity or applicability of any
claimed patent rights in respect thereof. As of the date of publication of this document, ISO and IEC have
not received notice of (a) patent(s) which may be required to implement this document. However,
implementers are cautioned that this may not represent the latest information, which may be obtained
from the patent database available at www.iso.org/patents and https://patents.iec.ch. ISO and IEC shall
not be held responsible for identifying any or all such patent rights.
Any trade name used in this document is information given for the convenience of users and does not
constitute an endorsement.
For an explanation of the voluntary nature of standards, the meaning of ISO specific terms and
expressions related to conformity assessment, as well as information about ISO's adherence to the World
Trade Organization (WTO) principles in the Technical Barriers to Trade (TBT) see
www.iso.org/iso/foreword.html. In the IEC, see www.iec.ch/understanding-standards.
This document was prepared by Joint Technical Committee ISO/IEC JTC 1, Information technology,
Subcommittee SC 32, Data management and interchange.
This sixth edition cancels and replaces the fifth edition (ISO/IEC 9075-1:2016), which has been
technically revised. It also incorporates the Technical Corrigendum ISO/IEC 9075-1:2016/Cor.1:2022.
The main changes are as follows:
— addition and refinement of the terms and concepts to support new data types required by
incremental parts;
— clarification and correction of the merge instructions for Technical Corrigenda and incremental
parts;
— improve the presentation and accuracy of the summaries of implementation-defined and
implementation-dependent aspects of this document;
— introduction of several digital artifacts;
— alignment with updated ISO house style and other guidelines for creating standards.
x © ISO/IEC 2023 – All rights reserved

---------------------- Page: 10 ----------------------
ISO/IEC 9075-1:2023(E)
This sixth edition of ISO/IEC 9075-1 is designed to be used in conjunction with the following editions of
other parts of the ISO/IEC 9075 series, all published 2023:
— ISO/IEC 9075-2, sixth edition;
— ISO/IEC 9075-3, sixth edition;
— ISO/IEC 9075-4, seventh edition;
— ISO/IEC 9075-9, fifth edition;
— ISO/IEC 9075-10, fifth edition;
— ISO/IEC 9075-11, fifth edition;
— ISO/IEC 9075-13, fifth edition;
— ISO/IEC 9075-14, sixth edition;
— ISO/IEC 9075-15, second edition;
— ISO/IEC 9075-16, first edition.
A list of all parts in the ISO/IEC 9075 series can be found on the ISO and IEC websites.
Any feedback or questions on this document should be directed to the user’s national standards body. A
complete listing of these bodies can be found at www.iso.org/members.html and www.iec.ch/national-
committees.
© ISO/IEC 2023 – All rights reserved xi

---------------------- Page: 11 ----------------------
ISO/IEC9075-1:2023(E)
Introduction
Theorganizationofthisdocumentisasfollows:
1) Clause1,“Scope”,specifiesthescopeofthisdocument.
2) Clause2,“Normativereferences”,identifiesadditionalstandardsthat,throughreferenceinthis
document,constituteprovisionsoftheISO/IEC9075series.
3) Clause3,“Termsanddefinitions”,definestermsanddefinitionsusedinthisdocumentandinother
partsoftheISO/IEC9075series.
4) Clause4,“Concepts”,describestheconceptsusedintheISO/IEC9075series.
5) Clause5,“PartsoftheISO/IEC9075series”,summarizesthecontentofeachofthepartsofthe
ISO/IEC9075series,intermsoftheconceptsdescribedinClause4,“Concepts”.
6) Clause6,“NotationandconventionsusedinotherpartsoftheISO/IEC9075series”,definesnotation
andconventionsusedinotherpartsoftheISO/IEC9075series.
7) Clause7,“AnnexestothepartsoftheISO/IEC9075series”,describesthecontentofannexesof
otherpartsoftheISO/IEC9075series.
8) Clause8,“Statuscodes”,definesvaluesthatidentifythestatusoftheexecutionofSQL-statements
andthemechanismsbywhichthosevaluesarereturned.
9) Clause9,“Conformance”,specifiesrequirementsthatapplytoclaimsofconformancetoallorsome
ofthepartsoftheISO/IEC9075series.
10) AnnexA,“SQLconformancesummary”,isaninformativeAnnex.Itsummarizestheconformance
requirementsoftheSQLlanguage.
11) AnnexB,“Implementation-definedelements”,isaninformativeAnnex.Itliststhosefeaturesfor
whichthebodyofthisdocumentstatesthatthesyntax,themeaning,thereturnedresults,theeffect
onSQL-dataand/orschemas,orotheraspectispartlyorwhollyimplementation-defined.
12) AnnexC,“Implementation-dependentelements”,isaninformativeAnnex.Itliststhosefeaturesfor
whichthebodyofthisdocumentstatesthatthesyntax,themeaning,thereturnedresults,theeffect
onSQL-dataand/orschemas,orotheraspectispartlyorwhollyimplementation-dependent.
13) AnnexD,“SQLoptionalfeaturetaxonomy”,isaninformativeAnnex.ItidentifiesfeaturesoftheSQL
languagespecifiedinthisdocumentbyanidentifierandashortdescriptivename.Thistaxonomy
isusedtospecifyconformance.
14) AnnexE,“Deprecatedfeatures”,isaninformativeAnnex.Itlistsfeaturesthattheresponsible
TechnicalCommitteeintendsnottoincludeinafutureeditionofthisdocument.
15) AnnexF,“IncompatibilitieswithISO/IEC9075:2016”,isaninformativeAnnex.Itlistsincompatibil-
itieswiththepreviouseditionofthisdocument.
16) AnnexG,“DefectReportsnotaddressedinthiseditionofthisdocument”,isaninformativeAnnex.
ItdescribestheDefectReportsthatwereknownatthetimeofpublicationofthisdocument.Each
oftheseproblemsisaproblemcarriedforwardfromthepreviouseditionofthisdocument.Nonew
problemshavebeencreatedinthedraftingofthiseditionofthisdocument.
17) AnnexH,“MaintenanceandinterpretationofSQL”,isaninformativeAnnex.Itdescribestheformal
proceduresformaintenanceandinterpretationoftheISO/IEC9075series.
xii ©ISO/IEC2023–Allrightsreserved

---------------------- Page: 12 ----------------------
ISO/IEC9075-1:2023(E)
18) AnnexI,“Supportfortheuseofinter-documentlinksintheISO/IEC9075series”,isaninformative
Annex.ItdescribesconventionsthatusersoftheISO/IEC9075seriesuseinordertomaximizethe
facilitiesprovidedinthepartsoftheISO/IEC9075series.
©ISO/IEC2023–Allrightsreserved xiii

---------------------- Page: 13 ----------------------
INTERNATIONAL STANDARD ISO/IEC 9075-1:2023(E)
Informationtechnology—DatabaselanguageSQL—
Part1:
Framework(SQL/Framework)
1 Scope
ThisdocumentdescribestheconceptualframeworkusedinotherpartsoftheISO/IEC9075seriesto
specifythegrammarofSQLandtheresultofprocessingstatementsinthatlanguagebyanSQL-imple-
mentation.
ThisdocumentalsodefinestermsandnotationusedintheotherpartsoftheISO/IEC9075series.
©ISO/IEC2023–Allrightsreserved 1

---------------------- Page: 14 ----------------------
ISO/IEC9075-1:2023(E)
2 Normativereferences
Thefollowingdocumentsarereferredtointhetextinsuchawaythatsomeoralloftheircontentconsti-
tutesrequirementsofthisdocument.Fordatedreferences,onlytheeditioncitedapplies.Forundated
references,thelatesteditionofthereferenceddocument(includinganyamendments)applies.
ISO/IEC646,Informationtechnology—ISO7-bitcodedcharactersetforinformationinterchange
ISO/IEC9075-2,Informationtechnology—Databaselanguages—SQL—Part2:Foundation
(SQL/Foundation)
ISO/IEC9075-3,Informationtechnology—Databaselanguages—SQL—Part3:Call-LevelInterface
(SQL/CLI)
ISO/IEC9075-4,Informationtechnology—Databaselanguages—SQL—Part4:PersistentStored
Modules(SQL/PSM)
ISO/IEC9075-9,Informationtechnology—Databaselanguages—SQL—Part9:Managementof
ExternalData(SQL/MED)
ISO/IEC9075-10,Informationtechnology—Dat
...

Questions, Comments and Discussion

Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.