This repository has been archived by the owner on Oct 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
80 lines (56 loc) · 1.37 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
CSCI.421.01/02 - Database System Implementation Project
Christian Louria
Andrew Dorrell
Saakshi D'Souza
Kaiming Zhang
Compiling (Java 17)
* Load project into IntelliJ and run Main.java
--- OR ----
* javac */*.java *.java
this will compile all java files
Storage:
create folder at path.
crate catalog "/path/catalog.txt"
crate db "/path/Xdatabase.txt"
where x is the chronoligically next created table starting from 0
catalog storage:
create file db is initiallized
format:
pageSize
pages
<schemax>
Schema storage:
format:
legnth of schema in bytes (not including this int)
tablename
<attributeX>
Attribute storage:
format:
attributeName
#primarykey
#unique
#notnull
attributeType
#length of char/varchar
# means optional
db storage:
create file when new table is created
file:
<numpages>
<page1>
<pageX>
page:
<pageId>
<numOfJunkBytesAfterLastRecord (int)>
<record1>
<recordX>
<junkSpace>
record:
<sizeOfRecord (int)> // might not need
<nullBitMap>
<attribute1>
<attributeX>
attribute:
use standard writeInt, writeBoolean or writeDouble
for chars: pad string (short followed by string length) with "-" character, write as string, write an int to trim off "-" characters
for strings: write string (short followed by string length)