This commit is contained in:
lever1209 2025-03-23 13:53:22 -03:00
commit 3da1cfc1f5
Signed by: lever1209
GPG key ID: AD770D25A908AFF4
13 changed files with 352 additions and 120 deletions

51
docs/db-structure.md Normal file
View file

@ -0,0 +1,51 @@
---
# Preface
### Primitive Data Types
#### Null
This value type can override any other type and essentially means "nothing" not even 0, its the lack of a value whatsoever
If you open a box thats supposed to have a number in it, and you found null, the box would just be empty
#### Boolean
A boolean value is true or false, it cannot be anything else
See [Sqlite](sqlite.md#Boolean) for more information on boolean values within sqlite.
#### Integer
An integer is any valid number without a decimal, such as 1, 5, 68, 421, and even negative numbers like -42, -99999, or -0 in some cases
#### Real Number (floating point number)
A real number is any real number, such as 1, 73, 45, 0.6, 255, -9.8, 200000000, and so on, it may use a decimal value unlike integers.
We should prefer Integers over Real Numbers unless a decimal place is absolutely required:
There are resolution limitations to consider, the number of bits a computer can store in a single value is finite, a 32 bit number only has 32 bits, meaning there can only be about 2 billion and some possible combinations.
Real numbers do not change this, there are only 2 billion or so different values to a real number, so the smaller you go, the more likely you are to accidentally "snap" to a nearby number that can actually be stored,
The same thing happens when you go high enough.
Here are some good videos on the topic.
Simple [Computerphile](https://www.youtube.com/watch?v=PZRI1IfStY0)
Technical [Spanning Tree](https://www.youtube.com/watch?v=bbkcEiUjehk)
### Complex Data Types
#### Users
- UID: Integer
- isDeveloper: Boolean
---
# Structure
### Stuff, eventually

10
docs/sqlite.md Normal file
View file

@ -0,0 +1,10 @@
This file will store any corrections or nuance about using sqlite.
### Boolean
Due to a restriction of sqlite, we must use Integer data types to represent a boolean value.
To do so the value must be either 0 meaning false, or 1 meaning true.
The database accessor will do this conversion for you automatically, so this will only matter to people working on the database accessor.