Skip to content

Commit

Permalink
inital commit
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesLove1 committed May 14, 2024
0 parents commit 4614248
Show file tree
Hide file tree
Showing 73 changed files with 7,378 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
target/
85 changes: 85 additions & 0 deletions database/BNF.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@

<Command> ::= <CommandType> ";"

<CommandType> ::= <Use> | <Create> | <Drop> | <Alter> | <Insert> | <Select> | <Update> | <Delete> | <Join>

<Use> ::= "USE " [DatabaseName]

<Create> ::= <CreateDatabase> | <CreateTable>

<CreateDatabase> ::= "CREATE " "DATABASE " [DatabaseName]

<CreateTable> ::= "CREATE " "TABLE " [TableName] | "CREATE " "TABLE " [TableName] "(" <AttributeList> ")"

<Drop> ::= "DROP " "DATABASE " [DatabaseName] | "DROP " "TABLE " [TableName]

<Alter> ::= "ALTER " "TABLE " [TableName] " " <AlterationType> " " [AttributeName]

<Insert> ::= "INSERT " "INTO " [TableName] " VALUES" "(" <ValueList> ")"

<Select> ::= "SELECT " <WildAttribList> " FROM " [TableName] | "SELECT " <WildAttribList> " FROM " [TableName] " WHERE " <Condition>

<Update> ::= "UPDATE " [TableName] " SET " <NameValueList> " WHERE " <Condition>

<Delete> ::= "DELETE " "FROM " [TableName] " WHERE " <Condition>

<Join> ::= "JOIN " [TableName] " AND " [TableName] " ON " [AttributeName] " AND " [AttributeName]

[Digit] ::= "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"

[Uppercase] ::= "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J" | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" | "S" | "T" | "U" | "V" | "W" | "X" | "Y" | "Z"

[Lowercase] ::= "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z"

[Letter] ::= [Uppercase] | [Lowercase]

[PlainText] ::= [Letter] | [Digit] | [PlainText] [Letter] | [PlainText] [Digit]

[Symbol] ::= "!" | "#" | "$" | "%" | "&" | "(" | ")" | "*" | "+" | "," | "-" | "." | "/" | ":" | ";" | ">" | "=" | "<" | "?" | "@" | "[" | "\" | "]" | "^" | "_" | "`" | "{" | "}" | "~"

[Space] ::= " "

<NameValueList> ::= <NameValuePair> | <NameValuePair> "," <NameValueList>

<NameValuePair> ::= [AttributeName] "=" [Value]

<AlterationType> ::= "ADD" | "DROP"

<ValueList> ::= [Value] | [Value] "," <ValueList>

[DigitSequence] ::= [Digit] | [Digit] [DigitSequence]

[IntegerLiteral] ::= [DigitSequence] | "-" [DigitSequence] | "+" [DigitSequence]

[FloatLiteral] ::= [DigitSequence] "." [DigitSequence] | "-" [DigitSequence] "." [DigitSequence] | "+" [DigitSequence] "." [DigitSequence]

[BooleanLiteral] ::= "TRUE" | "FALSE"

[CharLiteral] ::= [Space] | [Letter] | [Symbol] | [Digit]

[StringLiteral] ::= "" | [CharLiteral] | [StringLiteral] [CharLiteral]

[Value] ::= "'" [StringLiteral] "'" | [BooleanLiteral] | [FloatLiteral] | [IntegerLiteral] | "NULL"

[TableName] ::= [PlainText]

[AttributeName] ::= [PlainText]

[DatabaseName] ::= [PlainText]

<WildAttribList> ::= <AttributeList> | "*"

<AttributeList> ::= [AttributeName] | [AttributeName] "," <AttributeList>

<Condition> ::= "(" <Condition> <BoolOperator> <Condition> ")" | <Condition> <BoolOperator> <Condition> | "(" [AttributeName] <Comparator> [Value] ")" | [AttributeName] <Comparator> [Value]

<BoolOperator> ::= "AND" | "OR"

<Comparator> ::= "==" | ">" | "<" | ">=" | "<=" | "!=" | " LIKE "


Note:
<name> denotes a rule which may contain arbitrary additional whitespace within the symbol, where as [name] indicates a rule that cannot contain additional whitespace.
For rules where additional whitespace is permitted, this can only occur before/after/between tokens and NOT _inside_ the tokens themselves...
For example, the following is valid: CREATE DATABASE marks;
Whereas the following is not valid: CRE ATE DATA BASE marks;
Binary file added database/example-transcript.docx
Binary file not shown.
Binary file added database/new-repo-settings.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions database/people.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
id Name Age Email
1 Bob 21 bob@bob.net
2 Harry 32 harry@harry.com
3 Chris 42 chris@chris.ac.uk

4 changes: 4 additions & 0 deletions database/sheds.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
id Name Height PurchaserID
1 Dorchester 1800 3
2 Plaza 1200 1
3 Excelsior 1000 2
5 changes: 5 additions & 0 deletions databases/bnqqqcdcos/bnqqqcdcos.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
id a b c
1 435 45 876
2 54 453 87
3 435 45 768
4 2 7 8
5 changes: 5 additions & 0 deletions databases/cbnduaycwx/marks.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
id name mark pass
1 'Simon' 65 TRUE
2 'Sion' 55 TRUE
3 'Rob' 35 FALSE
4 'Chris' 20 FALSE
5 changes: 5 additions & 0 deletions databases/cgcbbkukij/marks.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
id name mark pass
1 'Simon' 65 TRUE
2 'Sion' 55 TRUE
3 'Rob' 35 FALSE
4 'Chris' 20 FALSE
2 changes: 2 additions & 0 deletions databases/djrmowyklq/marks.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
id name mark pass
1 'Simon' 65 TRUE
1 change: 1 addition & 0 deletions databases/djwiwvemmg/djwiwvemmg.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
id test test1
3 changes: 3 additions & 0 deletions databases/dmjeuytcxk/dmjeuytcxk.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
id a b c
1 a b c
2 abc def ghi
5 changes: 5 additions & 0 deletions databases/dngrfanjgx/dngrfanjgx.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
id a b c
1 435 45 876
2 54 453 87
3 435 45 768
4 2 7 8
2 changes: 2 additions & 0 deletions databases/drooiimein/marks.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
id name mark pass
1 'Simon' 65 TRUE
5 changes: 5 additions & 0 deletions databases/epvfkumwwv/marks.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
id name mark pass
1 'Simon' 65 TRUE
2 'Sion' 55 TRUE
3 'Rob' 35 FALSE
4 'Chris' 20 FALSE
2 changes: 2 additions & 0 deletions databases/etggbbfmkp/marks.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
id name mark pass
1 'Simon' 65 TRUE
3 changes: 3 additions & 0 deletions databases/fnscsrcxqg/fnscsrcxqg.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
id a b c
1 a b c
2 abc def ghi
1 change: 1 addition & 0 deletions databases/fnypiusxee/fnypiusxee.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
id test test1
3 changes: 3 additions & 0 deletions databases/glmupgooix/glmupgooix.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
id a b c
1 a b c
2 abc def ghi
3 changes: 3 additions & 0 deletions databases/ickxdfcwww/ickxdfcwww.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
id a b c
1 a b c
2 abc def ghi
1 change: 1 addition & 0 deletions databases/iyllqfpjti/iyllqfpjti.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
id test test1
5 changes: 5 additions & 0 deletions databases/khxkkwqxjs/khxkkwqxjs.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
id a b c
1 435 45 876
2 54 453 87
3 435 45 768
4 2 7 8
1 change: 1 addition & 0 deletions databases/kpqwlisfco/kpqwlisfco.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
id test test1
2 changes: 2 additions & 0 deletions databases/lvnpbbqqxq/marks.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
id name mark pass
1 'Simon' 65 TRUE
2 changes: 2 additions & 0 deletions databases/mqesxdpmcg/marks.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
id name mark pass
1 'Simon' 65 TRUE
3 changes: 3 additions & 0 deletions databases/ofceasrdcr/ofceasrdcr.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
id a b c
1 a b c
2 abc def ghi
2 changes: 2 additions & 0 deletions databases/ofrodfvxlg/marks.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
id name mark pass
1 'Simon' 65 TRUE
2 changes: 2 additions & 0 deletions databases/okbufhhteq/marks.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
id name mark pass
1 'Simon' 65 TRUE
5 changes: 5 additions & 0 deletions databases/otdymarxuq/marks.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
id name mark pass
1 'Simon' 65 TRUE
2 'Sion' 55 TRUE
3 'Rob' 35 FALSE
4 'Chris' 20 FALSE
5 changes: 5 additions & 0 deletions databases/ovclcjbmbq/ovclcjbmbq.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
id a b c
1 435 45 876
2 54 453 87
3 435 45 768
4 2 7 8
2 changes: 2 additions & 0 deletions databases/qdcvqughwb/marks.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
id name mark pass
1 'Simon' 65 TRUE
2 changes: 2 additions & 0 deletions databases/qvpcyugsme/marks.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
id name mark pass
1 'Simon' 65 TRUE
5 changes: 5 additions & 0 deletions databases/qvykkqftms/marks.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
id name mark pass
1 'Simon' 65 TRUE
2 'Sion' 55 TRUE
3 'Rob' 35 FALSE
4 'Chris' 20 FALSE
2 changes: 2 additions & 0 deletions databases/ruicsrracx/marks.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
id name mark pass
1 'Simon' 65 TRUE
2 changes: 2 additions & 0 deletions databases/svxdopqibc/marks.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
id name mark pass
1 'Simon' 65 TRUE
5 changes: 5 additions & 0 deletions databases/tdotwgndhj/marks.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
id name mark pass
1 'Simon' 65 TRUE
2 'Sion' 55 TRUE
3 'Rob' 35 FALSE
4 'Chris' 20 FALSE
5 changes: 5 additions & 0 deletions databases/tkvuqbvdos/tkvuqbvdos.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
id a b c
1 435 45 876
2 54 453 87
3 435 45 768
4 2 7 8
2 changes: 2 additions & 0 deletions databases/uxdyshftky/marks.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
id name mark pass
1 'Simon' 65 TRUE
2 changes: 2 additions & 0 deletions databases/vcpojyhxum/marks.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
id name mark pass
1 'Simon' 65 TRUE
1 change: 1 addition & 0 deletions databases/vcrxmbjgbw/vcrxmbjgbw.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
id test test1
3 changes: 3 additions & 0 deletions databases/xbxcuvrrqx/xbxcuvrrqx.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
id a b c
1 a b c
2 abc def ghi
2 changes: 2 additions & 0 deletions databases/xqhmasjkha/marks.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
id name mark pass
1 'Simon' 65 TRUE
5 changes: 5 additions & 0 deletions databases/xscbogspvq/xscbogspvq.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
id a b c
1 435 45 876
2 54 453 87
3 435 45 768
4 2 7 8
1 change: 1 addition & 0 deletions databases/xuxesjtqro/xuxesjtqro.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
id test test1
2 changes: 2 additions & 0 deletions databases/ydgymnluhd/marks.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
id name mark pass
1 'Simon' 65 TRUE
2 changes: 2 additions & 0 deletions databases/ypivkqglow/marks.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
id name mark pass
1 'Simon' 65 TRUE
2 changes: 2 additions & 0 deletions databases/yqxavjbssy/marks.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
id name mark pass
1 'Simon' 65 TRUE
2 changes: 2 additions & 0 deletions databases/yrtjxliuja/marks.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
id name mark pass
1 'Simon' 65 TRUE
Loading

0 comments on commit 4614248

Please sign in to comment.