Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reformatted .md files and made minor midifications to the #include stuff. #6

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 67 additions & 46 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,57 +1,78 @@
# PeterDB
<h1 align="center">PeterDB</h1>
<h3 align="center">
The project codebase for Principles of Data Management at UC Irvine
</h3>

#### This is the project codebase for Principles of Data Management, PeterDB
### Components


### Components:
- PagedFileManager
- RecordBasedFileManager
- RelationManager
- IndexManage
- QueryEngine
- PagedFileManager
- RecordBasedFileManager
- RelationManager
- IndexManager
- QueryEngine

### Use CLion for development
- Simply open (or clone) the repo as a project in CLion
- Reload CMake Project, https://www.jetbrains.com/help/clion/reloading-project.html
- CLion takes care of the building. Select executables (tests) from the top-right configurations.

### If you are not using CLion and want to use the command line `cmake` tool:
- From the repo root directory, create and go into a build directory

`mkdir -p cmake-build-debug && cd cmake-build-debug`

- Generate makefiles with `cmake` in the build directory by specifying the project root directory as the source:

`cmake ../`

your makefiles should be written to `[root]/cmake-build-debug`

- Build the project in the build directory:

`cmake --build .`

- To run tests with `ctest` in the build directory:

`ctest .`

or you can specify a test case, for example `ctest . -R PFM_File_Test.create_file`

- To clean the build, in the build directory:

`make clean`

or simply remove the build directory:
`rm -rf [root]/cmake-build-debug`


- Simply open (or clone) the repo as a project in CLion
- Reload CMake Project, https://www.jetbrains.com/help/clion/reloading-project.html
- CLion takes care of the building. Select executables (tests) from the top-right configurations.

### If you are not using CLion and want to use the command-line `cmake` tool:

From your Ubuntu system, install the following packages

```
sudo apt install cmake libgtest-dev google-mock valgrind libreadline-dev
```

From the repo root directory, create and go into a build directory:

```
mkdir -p cmake-build-debug && cd cmake-build-debug
```

Generate makefiles with `cmake` in the build directory by specifying the project root directory as the source:

```
cmake ../
```

Your makefiles should be written to `[root]/cmake-build-debug`.

Build the project in the build directory:

```
cmake --build .
```

To run tests with `ctest` in the build directory:

```
ctest .
```

or you can specify a test case, for example `ctest . -R PFM_File_Test.create_file`

To clean the build, in the build directory:

```
make clean
```

or simply remove the build directory:

```
rm -rf [root]/cmake-build-debug
```

### Project Instruction
- Implement the QueryEngine(QE) component. Write your implementation in the corresponding .cc files under `src` directory.

- Implement the QueryEngine (`qe.cc`) component. Write your implementation in the corresponding .cc files under `src` directory.

- DO NOT change the pre-defined APIs (classes, functions, methods) in the given .h files.
If you think some changes are really necessary, please contact us first.
If you think some changes are really necessary, please contact us first.

- You can add your own files (.h, .cc), or even directories under `src`, if needed. You might need to modify or add `CMakelists.txt` files under `src` directory or its child directories.

- DO NOT modify anything under `test` directory: all the tests will be overwritten by the instructor's copy during grading.
- Tests are released with the source code.
- DO NOT modify anything under `test` directory: all the tests will be overwritten by the instructor's copy during grading.
- Tests are released with the source code.
57 changes: 19 additions & 38 deletions report/project1.md
Original file line number Diff line number Diff line change
@@ -1,67 +1,48 @@
## Project 1 Report


### 1. Basic information
- Team #:
- Github Repo Link:
- Student 1 UCI NetID:
- Student 1 Name:
- Student 2 UCI NetID (if applicable):
- Student 2 Name (if applicable):

- **Team No.:**
- **Github Repo Link:**
- **Student 1 UCI NetID:**
- **Student 1 Name:**
- **Student 2 UCI NetID (if applicable):**
- **Student 2 Name (if applicable):**

### 2. Internal Record Format
- Show your record format design.



- Describe how you store a null field.


#### Show your record format design.

- Describe how you store a VarChar field.



- Describe how your record design satisfies O(1) field access.
#### Describe how you store a null field.

#### Describe how you store a VarChar field.

#### Describe how your record design satisfies O(1) field access.

### 3. Page Format
- Show your page format design.



- Explain your slot directory design if applicable.

#### Show your page format design.

#### Explain your slot directory design if applicable.

### 4. Page Management
- Show your algorithm of finding next available-space page when inserting a record.



- How many hidden pages are utilized in your design?


#### Show your algorithm of finding next available-space page when inserting a record.

- Show your hidden page(s) format design if applicable

#### How many hidden pages are utilized in your design?

#### Show your hidden page(s) format design if applicable

### 5. Implementation Detail
- Other implementation details goes here.


#### Other implementation details goes here.

### 6. Member contribution (for team of two)
- Explain how you distribute the workload in team.


#### Explain how you distribute the workload in team.

### 7. Other (optional)
- Freely use this section to tell us about things that are related to the project 1, but not related to the other sections (optional)


#### Freely use this section to tell us about things that are related to the project 1, but not related to the other sections (optional)

- Feedback on the project to help improve the project. (optional)
#### Feedback on the project to help improve the project. (optional)
76 changes: 25 additions & 51 deletions report/project2.md
Original file line number Diff line number Diff line change
@@ -1,88 +1,62 @@
## Project 2 Report


### 1. Basic information
- Team #:
- Github Repo Link:
- Student 1 UCI NetID:
- Student 1 Name:
- Student 2 UCI NetID (if applicable):
- Student 2 Name (if applicable):

### 2. Meta-data
- Show your meta-data design (Tables and Columns table) and information about each column.
- **Team No.:**
- **Github Repo Link:**
- **Student 1 UCI NetID:**
- **Student 1 Name:**
- **Student 2 UCI NetID (if applicable):**
- **Student 2 Name (if applicable):**

### 2. Meta-data

#### Show your meta-data design (Tables and Columns table) and information about each column.

### 3. Internal Record Format (in case you have changed from P1, please re-enter here)
- Show your record format design.



- Describe how you store a null field.


#### Show your record format design.

- Describe how you store a VarChar field.



- Describe how your record design satisfies O(1) field access.
#### Describe how you store a null field.

#### Describe how you store a VarChar field.

#### Describe how your record design satisfies O(1) field access.

### 4. Page Format (in case you have changed from P1, please re-enter here)
- Show your page format design.



- Explain your slot directory design if applicable.

#### Show your page format design.

#### Explain your slot directory design if applicable.

### 5. Page Management (in case you have changed from P1, please re-enter here)
- How many hidden pages are utilized in your design?



- Show your hidden page(s) format design if applicable

#### How many hidden pages are utilized in your design?

#### Show your hidden page(s) format design if applicable

### 6. Describe the following operation logic.
- Delete a record



- Update a record



- Scan on normal records
#### Delete a record

#### Update a record

#### Scan on normal records

- Scan on deleted records



- Scan on updated records

#### Scan on deleted records

#### Scan on updated records

### 7. Implementation Detail
- Other implementation details goes here.


#### Other implementation details goes here.

### 8. Member contribution (for team of two)
- Explain how you distribute the workload in team.


#### Explain how you distribute the workload in team.

### 9. Other (optional)
- Freely use this section to tell us about things that are related to the project 1, but not related to the other sections (optional)


#### Freely use this section to tell us about things that are related to the project 1, but not related to the other sections (optional)

- Feedback on the project to help improve the project. (optional)
#### Feedback on the project to help improve the project. (optional)
Loading