Search code examples
notation

What's the name of notation?


Could anyone tell me what's the name of this notation? I mean all those () [] {} brackets? Where can I find theirs meaning?

CREATE TABLE Nazwa_relacji
({nazwa_atrybutu typ_atrybutu [{NOT NULL} | NULL]
[DEFAULT wartość_domyślna]
[{ograniczenie_atrybutu [ ...]}] [, ...]}
[,{ograniczenie_relacji [, ...]}]);

Solution

  • It's a simplified use of Backus–Naur Form notation. BNF is very common in technical documentation, because it's an efficient way of describing most programming language syntax. The symbols in your example mean:

    • [] optional items
    • {} a group of items, normally used in conjunction with ...
    • ... marks where the preceding items in the group repeat
    • | either/or

    Any symbols not defined in BNF are taken literally, e.g. ().