Information technology — Programming languages — SQL/Ada Module Description Language (SAMeDL)

Specifies the syntax and semantics of a database programming language, the SQL/Ada Module Description Language, SAMeDL. Does not define the Programming Language Ada nor the Database Language SQL. The SAMeDL is defined with respect to entry level SQL.

Technologies de l'information — Langages de programmation — Langage de description de modules SQL/Ada (SAMeDL)

General Information

Status
Withdrawn
Publication Date
22-Feb-1995
Withdrawal Date
22-Feb-1995
Current Stage
9599 - Withdrawal of International Standard
Completion Date
09-Aug-2001
Ref Project

Buy Standard

Standard
ISO/IEC 12227:1995 - Information technology -- Programming languages -- SQL/Ada Module Description Language (SAMeDL)
English language
120 pages
sale 15% off
Preview
sale 15% off
Preview

Standards Content (Sample)

INTERNATIONAL
ISO/IEC
STANDARD
12227
First edition
1995-02-15
Information technology - Programming
languages - SQL/Ada Module Description
Language (SAMeDL)
Technologies de I ’informa tion - Langages de programmation - Langage
de description de modules SQUAda (SAMeDL)
Reference number
ISO/1 EC 12227: 1995(E)

---------------------- Page: 1 ----------------------
ISO/IEC 12227:1995(E)
Page
1
1 Scope
1
2 Normative references
3 Notations and Structures
3.1 Syntax Notation
3.2 Semantic Notation
3.3 Structure
3.4 Examples, Notes and Index Entries
3
4 Design Goals and Language Summary
3
4.1 Design Goals
4
4.2 Language Summary
4
4.2.1 Overview
4
4.2.2 Compilation Units
5
4.2.3 Modules
5
4.2.4 Procedures and Cursors
5
4.25 Domain and Base Domain Declarations
6
4.2.6 Other Declarations
6
4.2.7 Value Expressions and Typing
6
4.2.8 Standard Post Processing
6
4.2.9 Extensions
6
4.2.10 Default Values in Grammar
7
4.3 Entry Level SQL
7
5 Lexical Elements
7
5.1 Character Set
7
5.2 Lexical Elements, Separators, and Delimiters
8
5.3 Identifiers
9
5.4 Literals and Data Classes
10
5.5 Comments
10
5.6 Reserved Words
0 ISO/IEC 1995
All rights reserved. Unless otherwrse specified, no part of this publication may be reproduced
or utilized in any form or by any means, electronie or mechanical, including photocopytng and
microfilm, without Permission in writing from the publisher.
I SO/I EC Copyright Office l Case Postale 56 l CH-l 211 Geneve 20 l Switzerland
Printed in Switzerland
ii

---------------------- Page: 2 ----------------------
o lSO/IEC
ISO/IEC 12227: 1995(E)
10
6 Common Elements
11
6.1 Compilation Units
11
6.2 Context Clause
12
6.3 Table Names and the From Clause
12
6.4 References
17
6.5 Assignment Contexts and Conformance of an Expression to a Domain
18
6.6 Standard Post Processing
18
6.7 Extensions
19
7 Data Description Language and Data Semantics
19
7.1 Definitional Modules
20
7.1.1 Base Domain Declarations
20
7.1 .l .l Base Domain Parameters
21
7.1 .1.2 Base Domain Patterns
22
7.1 J.3 Base Domain Options
23
7.1.2 The SAME Standard Base Domains
24
7.1.3 Domain and Subdomain Declarations
28
7.1.4 Constant Declarations
29
7.1.5 Record Declarations
31
7.1.6 Enumeration Declarations
32
7.1.7 Exception Declarations
32
7.1.8 Status Map Declarations
34
7.2 Schema Modules
34
7.2.1 Table Definitions
36
7.2.2 View Definitions
37
7.3 Data Conversions
38
8 Abstract Module Description Language
38
8.1 Abstract Modules
39
8.2 Procedures
43
8.3 Statements
45
8.4 Cursor Declarations
49
8.5 Cursor Procedures
52
8.6 Input Parameter Lists
54
8.7 Select Parameter Lists
56
8.8 Value Lists and Column Lists
58
- -
8.9 Into - Clause and Insert From Clause
60
8.10 Value Expressions
66
8.11 Search Conditions
68
8.12 Subqueries
68
8.13 Status Clauses
69
9 Conformance
69
9.1 Introduction
69
9.2 Claims of Conformance
69
9.2.1 Introduction
69
9.2.2 Conformance via mapping.
69
9.2.2.1 Conformance via SQL module.
69
9.2.2.2 Conformance via embedded SQL Syntax.
. . .
Ill

---------------------- Page: 3 ----------------------
o lSO/IEC
lSO/IEC 12227:1995(E)
70
9.2.3 Conformance via effects.
70
9.2.4 Multiple Claims of conformance.
70
9.3 Extensions
71
Annex A. SAMeDL Standard
-
84
Annex B. SAMeDL System
-
85
Annex C. Standard Support Operations and Specifications
85
C.l Standard Base Domain Operations
85
C.l .l All Domains
86
Cl .2 Numeric Domains
86
C.1.3 Int and Smallint Domains
87
C. 1.4 Character Domains
87
C.1.5 Enumeration Domains
88
C.1.6 Boolean Functions
88
C.1.7 Operations Available to the Application
90
C.2 Standard Support Package Specifications
90
C.2.1 SQL Standard
91
C.2.2 SQLIBoolean-Pkg
92
C.2.3 SQL-lnt-Pkg
95
C.2.4 SQL-Smallint-Pkg
98
C.2.5 SQL-Real-Pkg
101
C.2.6 SQL-Double-Precision-Pkg
104
C.2.7 SQL-Char-Pkg
107
C.2.8 SQL-Enumeration-Pkg
109
Annex D. Transform Chart
114
Annex E. Glossary
117
Annex F. References
118
Index

---------------------- Page: 4 ----------------------
o lSO/IEC
ISO/IEC 12227:1995(E)
Foreword
ISO (the International Organization for Standardization) and IEC (the Inter-
national 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 com-
mittees collaborate in fields of mutual interest. Other international organ-
izations, governmental and non-governmental, in liaison with ISO and IEC,
also take part in the work.
In the field of information technology, ISO and IEC have established a joint
technical committee, lSO/IEC JTC 1. Draft International Standards adopted
by the joint technical committee are circulated to national bodies for vot-
ing. Publication as an International Standard requires approval by at least
75 % of the national bodies casting a vote.
International Standard lSO/lEC 12227 was prepared by Joint Technical
Committee lSO/IEC JTC 1, Information technology, Subcommittee SC 22,
Programming languages, their environments and System Software inter-
faces.
Annexes A to C form an integral part of this International Standard. An-
nexes D to F are for information only.
V

---------------------- Page: 5 ----------------------
This page intentionally left blank

---------------------- Page: 6 ----------------------
INTERNATIONAL STANDARD o ISO/IEC
ISO/IEC 12227:1995(E)
Information technology - Programming languages - SQUAda
Module Description Language (SAMeDL)
1 Scope
This International Standard specifies the Syntax and semantics of a database programming language, the SQL
Ada Module Description Language, SAMeDL. Texts written in the SAMeDL describe database interactions which
are to be performed by database management Systems (DBMS) implementing Database Language SQL. The
interactions so described and so implemented are to be petformed on behalf of application programs written in
Programming Language Ada.
The SAMeDL is not a Programming Language; it may be used solely to specify application program database
interactions and solely when those interactions are to occur between an Ada application program and an SQL
DBMS.
The SAMeDL is defined with respect to Entry Level SQL. Therefore, all inclusions by reference of text from
ISO/IEC 90751992 include all applicable Leveling Rules for Entry Level SQL.
This International Standard does not define the Programming Language Ada nor the Database Language SQL.
Therefore, ISO 8652:1987 takes precedence in all matters dealing with the Syntax and semantics of any Ada
construct contained, referred or described within this International Standard; similarly, ISO/1 EC 9075: 1992 takes
precedence in all matters dealing with the Syntax and semantics of any SQL construct contained, referred or
described within this International Standard.
Note: The SAMeDL is an example of an Abstract Modular Interface. A reference model for programming lan-
guage intetfaces to database management Systems, which includes a description of Abstract Modular interfaces,
tan be found in reference [2].
2 Normative references
The following International Standards contain provisions which, through reference in this text, constitute provi-
sions of this International Standard. At the time of publication, the editions indicated were valid. All International
Standards are subject to revision, and Parties to agreements based on this International Standard are en-
couraged to investigate the possibility of applying the most recent editions of the International Standards in-
dicated below. Members of IEC and ISO maintain registers of currently valid International Standards.
ISO/1 EC 9075: 1992, Information technology -- Database languages -- SQL.
ISO/IEC 8652: 1995, Information technology -- Programming languages -- Ada.
Scope 1

---------------------- Page: 7 ----------------------
ISO/IEC 12227: 1995(E)
o lSO, ‘IEC
3 Notations and Structures
3.1 Syntax Notation
The tontext-free Syntax of the language is described using a simple variant of the variant of BNF used in the
description of Ada, (1.5 in ISO 8652:1987). The Variation is:
-- Underscores are preserved when using the name of a syntactic category outside of a Syntax rule (1.5(6) of
ISO 8652:1987).
-- The italicized prefixes Ada and SQL, when appearing in the names of syntactic categories, indicate that an
Ada or SQL syntactic category has been incorporated into this document. For example, the category
Ada identifier is identical to the category identifier as described in 2.3 of ISO 8652:1987; whereas the
category SQL identifier is identical to the category identifier as described in 5.4 of ISO/lEC 9075:1992.
-
-- Numerital suffixe s attac hed to the names of syntactic categories are used to distinguish appearances of the
category within a rule or set of rules. An exa mple of this usage is given below.
3.2 Semantic Notation
The meaning of a SAMeDL compilation unit (except where specified as implementation-defined) is given by:
-- An Ada compilation unit, conforming to ISO 8652:1987.
-- A module conforming to clause 12 of ISO/IEC 9075:1992.
-- Interface rules, concerning the relationship between the SQL and Ada texts.
The semantics of SAMeDL constructs are given in part by collections of string transformers that produce Ada
and SQL texts from SAMeDL input.
Note: A quick reference to these transformers appears in Annex D.
The effects of these transformers are described through the use of Sample input strings. Those strings are
written in a variant of the Syntax notation. For example, the Syntax of an input-Parameter (see 8.6) is given by:
identifier- 1 [namedshrase] : domain-reference [notnull]
A representative input Parameter declaration is given by
Id 1 [named Id 21 : Id 3 [not null]
- - -
lt is then possible to discuss the four variants of input Parameters (the variants described by the presence or
Single piece of text.
absence of optional phrases) in a
2 Database Programming Language - SAMeDL

---------------------- Page: 8 ----------------------
o lSO/IEC
ISO/IEC 12227:1995(E)
3.3 Structure
The remainder of this International Standard is structured in the following way. Clause 4 contains a descriptive
overview of the goals and concepts of the SAMeDL. Clause 5 defines the lexical structure of the SAMeDL
including the rules for identifier and Iiteral formation and the list of reserved words. Clauses 6, 7 and 8 define 2he
Syntax and semantics of the SAMeDL. Esch subclause of those clauses adheres to the following general format.
-- The purpose of the item being defined by the subclause is introduced.
-- The Syntax of the item being defined is given in the notation described earlier.
-- Abstract (non-context free) syntactical rules governing formation of instances of the item being defined are
given, if applicable.
-- The semantics of the item being defined are given. These semantics are given under the headings Ada
Semantics, SQL Semantics and Interface Semantics, as appropriate.
3.4 Examples, Notes and Index Entries
Many of the subclauses of this International Standard are illustrated with examples. These examples are intro-
duced by the words: “Note: Examples” on a line by themselves and are terminated by the words “End Ex-
amples,” likewise appearing on a line by themselves.
Note: Examples
This is an example of an example.
End Examples
Other notes also appear in this International Standard, introduced by the word Note. Both kinds of note are
informative only and do not form part of the definition of the SAMeDL.
Items in the grammar that contain underscores are represented in the Index by a corresponding entry without
underscores. For example, the “Ada identifier” entry in the index contains the page numbers of occurrences of
both “Ada identifier” and “Ada identifier ”.
-
4 Design Goals and Language Summary
4.1 Design Goals
The SQL Ada Module Description Language (SAMeDL) is a Database Programming Language designed to
automate the construction of Software conformant to the SQL Ada Module Extensions (SAME) application ar-
chitecture. This architecture is described in the document, Guidelines for the Use of the SAME [l].
The SAME is a modular architecture. lt uses the concept of a Module as defined in 4.16 and 12 of ISO/IEC
9075:1992. As a consequence, a SAME-conformant Ada application does not contain embedded SQL state-
ments and is not an embedded SQL Ada program as defined in 19.3 of ISO/IEC 90751992. Such a SAME-
conformant application treats SQL in the manner in which Ada treats all other languages: it imports complete
functional modules, not language fragments.
Notations and Structures 3

---------------------- Page: 9 ----------------------
ISO/IEC 12227:1995(E) 0
ISO/IEC
Modular architectures treat the interaction of the application program and the database as a design Object. This
results in a further isolation of the application program from details of the database design and implementation
and improves the potential for increased specialization of Software development staff.
Ada and SQL are vastly different languages: Ada is a Programming Language designed to express algorithms,
while SQL is a Database Language designed to describe desired results. Text containing both Ada and SQL is
therefore confusing and difficult to maintain. SAMeDL is a Database Programming Language designed to sup-
port the goals and exploit the capabilities of Ada with a language whose Syntax and semantics is based firmly in
SQL. Beyond modularity, the SAMeDL provides the application programmer the following Services:
-- An abstract treatment of null values. Using Ada typing facilities, a safe treatment of missing information
based on SQL is introduced into Ada database programming. The treatment is safe in that it prevents an
application from mistaking missing information (null values) for present information (non-null values).
-- Robust Status code processing. SAMeDL ’s Standard Post Processing provides a structured mechanism for
the processing of SQL Status Parameters.
-- Strong typing. SAMeDL ’s typing rules are based on the strong typing of Ada, not the permissive typing of
SQL.
-- Extensibility. The SAMeDL supports a class of user extensions. Further, it controls, but does not restritt,
implementation defined extensions.
4.2 Language Summary
4.2.1 Overview
The SAMeDL is designed to facilitate the construction of Ada database applications that conform to the SAME
architecture as described in [l]. The SAME method involves the use of an abstract interface, an abstract module,
a concrete interface, and a concrete module. The abstract interface is a set of Ada package specifications
containing the type and procedure declarations to be used by the Ada application program. The abstract module
is a set of bodies for the abstract interface. These bodies are responsible for invoking the routines of the
concrete interface, and converting between the Ada and the SQL data and error representations. The concrete
interface is a set of Ada specifications that define the SQL procedures needed by the abstract module. The
concrete module is a set of SQL procedures that implement the concrete interface.
Within this International Standard, the concrete module of [l] is called an SQL module and its contents are given
under the headings SQL Semantics within the clauses of this specification. The abstract modules of [l] are
given under the heading Ada Semantics within the clauses of this specification.
4.2.2 Compilation Units
A compilation unif consists of one or more modules. A module may be either a definitional module containing
shared definitions, a Schema module containing table, view, and privilege definitions, or an abstract module
containing local definitions and procedure and cursor declarations.
4 Database Programming Language - SAMeDL

---------------------- Page: 10 ----------------------
o lSO/IEC ISO/IEC 12227:1995(E)
4.2.3 Modules
A definifional module contains the definitions of base domains, domains, constants, records, enumerations,
exceptions, and Status maps. Definitions in definitional modules may be seen by other modules.
A Schema module contains the definitions of tables, views, and Privileges.
An abstrac~ module defines (a portion of) an application ’s interface to the database: it defines SQL Services
needed by an Ada application program. An abstract module may contain procedure declarations, cursor
declarations, and definitions such as those that may appear in a definitional module. Definitions in an abstract
module, however, may not be seen by other modules.
4.2.4 Procedures and Cursors
A procedure declaration defines a basic database Operation. The declaration defines an Ada procedure decla-
ration and a corresponding SQL procedure. A SAMeDL procedure consists of a Single Statement along with an
optional input Parameter list and an optional Status clause. The input Parameter list provides the mechanism for
passing information to the database at runtime. A Statement in a SAMeDL procedure may be a commit state-
ment, rollback Statement, insert Statement query, insert Statement values, update Statement, select Statement or
an implementation-defined extended Statement. The semantics of a SAMeDL Statement directly parallel that of
its corresponding SQL Statement.
SAMeDL cu~sor declarations directly parallel SQL cursor declarations. In contrast to the language of ISO/IEC
90751992, the procedures that operate on cursors, procedures containing either an open, fetch, close, update
positioned or delete positioned Statement, are packaged with the declaration of the cursor upon which they
operate, thereby improving readability. Further, if no procedure containing an open, fetch or close Statement is
explicitly given in a cursor declaration, the language provides such procedures implicitly, thereby improving
writeability (ease of use).
4.2.5 Domain and Base Domain Declarations
Objects in the language have an associated domain, which characterizes the set of values and applicable
operations for that Object. In this sense, a domain is similar to an Ada type.
A base domain is a template for defining domains. A base domain declaration consists of a set of Parameters, a
set of Patterns and a set of Options. The Parameters are used to supply information needed to declare a domain
or subdomain derived from the base domain. Patterns contain templates for the generation of Ada code to
support the domain in Ada applications. This code generally contains type declarations and package instan-
tiations. Options contain information needed by the Compiler. Parameters may be used in the Patterns and
Options and their values may be referenced in other Statements.
Base domains are classified according to their associated data class. A data class is either integer, fixed, float,
enumeration, or Character. A numeric base domain has a data class of either integer, fixed, or float. An
enumeration base domain has a data class of enumeration, and defines both an ordered set of distinct enumera-
tion Iiterals and a bijection between the enumeration literals and their associated database values. A Character
base domain has a data class of Character.
Design Goals and Language Summary 5

---------------------- Page: 11 ----------------------
ISO/IEC 12227: 1995(E) o lSO/IEC
4.2.6 Other Declarations
Certain SAMeDL declarations are provided as a convenience for the User. For example, constant declarations
name and associate a domain with a static expression. Record declarations allow distinct procedures to share
types. An exception declaration defines an Ada exception declaration with the same name.
4.2.7 Value Expressions and Typing
Value expressions are formed and evaluated according to the rules of SQL, with the exception that the strong
typing rules are based on those of Ada. In the typing rules of the SAMeDL, the domain acts as an Ada type in a
System without user defined operations. Strong typing necessitates the introduction of domain conversions.
These conversions are modeled after Ada type conversions; the operational semantics of the SAMeDL domain
conversion is the null Operation or identity mapping. The language rules specify that an informational message
be displayed under circumstances in which this departure from the Ada model has visible effect.
4.2.8 Standard Post Processing
Standardpostprocessing is performed after the execution of an SQL procedure but before control is returned to
the calling application procedure. The Status clause from a SAMeDL procedure declaration attaches a Status
mapping to the application procedure. That Status mapping is used to process SQL Status data in a uniform way
for all procedures and to present SQL Status Codes to the application in an application-defined manner, either as
a value of an enumerated type, or as a user defined exception. SQL Status Codes not specified by the Status
map result in a call to a Standard database error processing procedure and the raising of the predefined
SAMeDL exception, SQL Database Error. This prevents a database error from being ignored by the applica-
- -
tion.
4.2.9 Extensions
The data semantics of the SAMeDL may be extended without modification to the language by the addition of
user-defined base domains. For example, a user-defined base domain of DATE may be included without
modification to the SAMeDL.
DBMS specific (i.e., non-Standard) operations and features that require Compiler modification (e.g., dynamic
SQL) may also be included into the SAMeDL. Such additions to the SAMeDL are referred to as extensions.
Schema elements, table elements, Statements, query expressions, query specifications, and cursor Statements
may be extended. The modules, tables, views, cursors, and procedures that contain these extensions are
marked (with the keyword extended) to indicate that they go outside the Standard.
4.2.10 Default Values in Grammar
Obvious but overridable defaults are provided in the grammar. For example, open, close, and fetch Statements
are essential for a cursor, but their form may be deduced from the cursor declaration. The SAMeDL will therefore
supply the needed open, close, and fetch procedure declarations if they are not supplied by the User.
6 Database Programming Language - SAMeDL

---------------------- Page: 12 ----------------------
o lSO/IEC ISO/IEC 12227: 1995(E)
4.3 Entry Level SQL
Within the text of this specification, the name SQL references the language known as Entry Level SQL in
ISO/IEC 9075:1992. Features and capabilities of ISO/IEC 9075:1992 that do not lie within Entry Level SQL may
be implemented via the extension facility defined in this International Standard. See 6.7 of this specification.
5 Lexical Elements
The text of a compilation is a sequence of lexical elements, each composed of characters from the basic charac-
ter set. The rules of composition are given in this chapter.
5.1 Character Set
The only characters allowed in the text of a compilation are the basic characters and the characters that make
up Character Iiterals (described in 5.4 of this specification). Esch Character in the basic Character set is
represented by a graphical Symbol.
basic Character ::=
ubper-case-letter 1 lower-case-letter 1 digit 1
special-Character 1 space-Character
The characters included in each of the above categories of the basic characters are defined as follows:
1. upper case letter
ÄBC~EFGH~JKLMN~PQRSTUVWXYZ
2. lower case letter
abcdefgh ijklmnopqrstuvwxyz
3. digit
0123456789
4. special Character
-
9
()*+,-./:;<=>-I
Character
5. space
-
5.2 Lexical Elements, Separators, and Delimiters
The text of each compilation is a sequence of separate lexical elements. Esch lexical element is either an
identifier (which may be a reserved word), a literal, a comment, or a delimiter. The effect of a compilation
depends only on the particular sequences of lexical elements excluding the comments, if any, as described in
this chapter. Identifiers, literals, and comments are discussed in the following clauses. The remainder of this
clause discusses delimiters and separators.
An explicit separator is required to separate adjacent lexical elements when, without Separation, interpretation as
a Single lexical element is possible. A separator is any of a space Character, a format effector, or the end of a
Design Goals and Language Summary 7

---------------------- Page: 13 ----------------------
ISO/IEC 12227:1995(E) o lSO/IEC
line. A space Character is a separator except within a comment or a Character Iiteral. Format effectors other
than horizontal tabulation are always separators. Horizontal tabulation is a separator except within a comment.
The end of a line is always a separator. The language does not define what Causes the end of a line.
One or more separators are allowed between any two adjacent lexical elements, before the first lexical element
of each compilation, or after the last lexical element of each compilation.
At least one separator is required
between an identifier or a numeric literal and an adjacent identifier or numeric Iiteral.
A delimiter is one of the following special characters
()*+,-./:;c=>I
or one of the following compound delimiters each composed of two adjacent special characters
:= <> >= <=
=> . .
Esch of the special characters listed for Single Character delimiters is a Single delimiter except if that Character is
used as a Character of a compound delimiter, a comment, or a literal.
Esch lexical element shall fit on one line, since the end of a line is a separator. The Single quote and underscore
characters, as weil as two adjacent hyphens, are not delimiters, but may form part of other lexical elements.
5.3 Identifiers
identifier ::= SQL-actual identifier
-
The length restrictions that apply to SQL identifiers (see 5.2, Syntax rules 8, 9 and 5.5 Syntax rule 3 of ISO/IEC
-
9075:1992) do not apply to SAMeDL identifiers. Whenever two identifiers are deemed equivalent, it is in the
sense of the rules of SQL (see 5.2, Syntax rules 10 through 14 of ISO/IEC 9075:1992).
Note. An SQL_actual-identifier is either a delimited-identifier or a regularjdentifier. The form of an SQL regular-identifier is
essentially the same as the Ada identifier, except that a regular-identifier may end in an underscore. A delimited-identifier is any
Character string within a pair of doublequote characters ( “). Delimited identifiers provide a means of using tokens that would otherwise
be reserved words (see 5.6 of this specification) as identifiers. Thus fetch is a resetved word, but the construct
procedure "fetch" is fetch;
defines a procedure named “fetch” that contains a fetch Statement.
Identifier equivalence in SQL is similar to Ada identifier equivalence for regular identifiers. Equivalence for delimited identifiers is case
sensitive. Equivalence of regular identifiers with delimited identifiers proceeds by considering the regular identifier to be all upper case
and then doing a case sensitive comparison to the delimited identifier. So a column named Status is not identified by the delimited
identifier “Status” but is identified by the delimited identifier “STATUS ”. end Note
Ada Semantics
Let ident be an identifier. Define AdalD(ident) by
AdaID(ident) = ident if ident is a regular identifier
id if ident is the delimited identifier "id"
Note: If ident is an identifier, AdalD(ident) is not necessarily an Ada_identifier.
8 Database Programming Language - SAMeDL

---------------------- Page: 14 ----------------------
o lSO/IEC
ISO/IEC 12227: 1995(E)
SQL Semantics
Let SQL,,,, be a function on identifiers into the set of SQL identifiers with the property that SQ&,,&d 1)
- -
and SQL NAME(Idb2) shall be equivalent if and only if Id-1 and ld-2 are equivalent (see above).
Note: Entry level SQL identifiers are limited to eighteen characters in length (see 5.2, leveling rule 2.a of ISO/IEC 90751992) but
SAMeDL identifiers are not. SQL,,,, deals with this discrepancy. SQL,,,, is not applied to externally visible names, i.e., Schema,
table, view and column names, but only to names within SQL modules, e.g., cursor, procedure and Parameter names.
5.4 Literals and Data Classes
Literals follow the SQL Iiteral Syntax (5.3 of ISO/IEC 9075:1992). There are five classes into which literals are
placed based on their lexical properties: Character, integer, fixed, float, and enumeration.
literal ::=
database literal 1 enumeration-literal
-
database literal ::=
-
1 1 [+ 1 -1 numeric-literal
Character-litera
numeric-literal ::=
integer-literal 1 fixed-literal 1 float-literal
Character-literal ::=
' {Character} '
Character ::=
implernen ta tion defined
integer-literal ::=
digit {digit}
fixed literal ::=
Gteger-literal integer-literal 1
integer-literai 1
integer-literal .
float literal ::=
f?xed-literal exp [+ 1 -1 integer-literal
exp ::=
e I E
.
enumeration-literal . . l = identifier
1. Esch literal has an associated data class, denoted DATACLASS(L). In particular:
if L is a Character-literal then DATACLASS(L) is Character
integer Iiteral integer
fixed likral f ixed
float literal f loat
enumeration literal enumeration
-
(see data-class in 7.1 .l .l of this specification).
2. If Id is an enumeration Iiteral, than AdalD(id) shall be an Ada identifier. In particular, an enumeration Iiteral
-
shall not be an Ada Character Iiteral.
Lexical Elements 9

-----------------
...

Questions, Comments and Discussion

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