Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does this symbol mean ::=?

Tags:

sql

I'm reading Joe Celko's book SQL for Smarties, and he uses some notation that's unfamiliar to me. After an internet search, I found some small bits of info about it on Oracle's site.

The symbol he's using that I don't understand is this ::=

My searches turned up very little info, but what I did find was part of a railroad diagram. Here's a link to the one document I found that contains the symbol:

https://docs.oracle.com/cd/E17236_01/epm.1112/esb_tech_ref_1112100/frameset.htm?maxl_bnf_help_symbols.html

Here is one example from the book to describe what I'm talking about:

< schema element > ::=
< domain definition > | < table definition > | < view definition > 
| < grant statement > | < assertion definition > | < character set definition >
| < collation definition > | < translation definition >

What does the ::= mean?

like image 233
Jay Rohrssen Avatar asked Feb 06 '23 01:02

Jay Rohrssen


1 Answers

This symbol is from Backus-Naur Form (BNF) which is used for syntax description. It is used to separate the name of non-terminal symbol on the left from its definition on the right.

You can read ::= as "is defined as":

schema element is defined as a domain definition or a table definition or a view definition or ...

like image 50
Sergey Kalinichenko Avatar answered Feb 08 '23 15:02

Sergey Kalinichenko