updated readme
This commit is contained in:
94
README.md
94
README.md
@@ -1,46 +1,70 @@
|
|||||||
# Astro Starter Kit: Basics
|
# Assignment 03: Graph Database for Lecture Management
|
||||||
|
|
||||||
```sh
|
This repository contains an exercise for the Graph Databases course at the JKU.
|
||||||
deno create astro@latest -- --template basics
|
It contains the implementation for an application layer that uses an underlying graph database with data that is provided in the Moodle course.
|
||||||
```
|
|
||||||
|
|
||||||
> 🧑🚀 **Seasoned astronaut?** Delete this file. Have fun!
|
## How to Use
|
||||||
|
|
||||||
## 🚀 Project Structure
|
1. **Clone the repository**:
|
||||||
|
```bash
|
||||||
|
git clone https://git.implohq.de/semester06-graph_databases/assignment03
|
||||||
|
```
|
||||||
|
2. **Set up the database**:
|
||||||
|
- Run with `docker run -p 7474:7474 -p 7687:7687 -v /home/quirinecker/Downloads/neo4j/data:/data --env=NEO4J_AUTH=none neo4j:latest`
|
||||||
|
- Import via the cypher file that is provided in the moodle course
|
||||||
|
3. Run Application:
|
||||||
|
- Install dependencies with `deno install` or alternatively `npm install`
|
||||||
|
- Configure the environment variables in `.env` file.
|
||||||
|
- Sample file:
|
||||||
|
```
|
||||||
|
|
||||||
Inside of your Astro project, you'll see the following folders and files:
|
NEO4J_URI=neo4j://localhost:7687
|
||||||
|
NEO4J_USERNAME=neo4j
|
||||||
|
NEO4J_PASSWORD=admin
|
||||||
|
|
||||||
```text
|
```
|
||||||
/
|
- Run `deno run dev` or alternatively `npm run dev`
|
||||||
├── public/
|
|
||||||
│ └── favicon.svg
|
|
||||||
├── src
|
|
||||||
│ ├── assets
|
|
||||||
│ │ └── astro.svg
|
|
||||||
│ ├── components
|
|
||||||
│ │ └── Welcome.astro
|
|
||||||
│ ├── layouts
|
|
||||||
│ │ └── Layout.astro
|
|
||||||
│ └── pages
|
|
||||||
│ └── index.astro
|
|
||||||
└── package.json
|
|
||||||
```
|
|
||||||
|
|
||||||
To learn more about the folder structure of an Astro project, refer to [our guide on project structure](https://docs.astro.build/en/basics/project-structure/).
|
## Features
|
||||||
|
|
||||||
## 🧞 Commands
|
### 1. **Automatic Deletion Notifications**
|
||||||
|
|
||||||
All commands are run from the root of the project, from a terminal:
|
- Deleting any node (e.g., student, professor, lecture) automatically creates a **Notification** node.
|
||||||
|
|
||||||
| Command | Action |
|
### 2. **Lecture Participant Management**
|
||||||
| :------------------------ | :----------------------------------------------- |
|
|
||||||
| `deno install` | Installs dependencies |
|
|
||||||
| `deno dev` | Starts local dev server at `localhost:4321` |
|
|
||||||
| `deno build` | Build your production site to `./dist/` |
|
|
||||||
| `deno preview` | Preview your build locally, before deploying |
|
|
||||||
| `deno astro ...` | Run CLI commands like `astro add`, `astro check` |
|
|
||||||
| `deno astro -- --help` | Get help using the Astro CLI |
|
|
||||||
|
|
||||||
## 👀 Want to learn more?
|
- **List Participants**: Enter a lecture number to list all participants (students and professors) in **ascending order by name**.
|
||||||
|
- **Add Participants**: Add new participants to a lecture.
|
||||||
|
|
||||||
Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).
|
### 3. **Lecture Search**
|
||||||
|
|
||||||
|
- Search for lectures using a **flexible search string**.
|
||||||
|
- The string can match:
|
||||||
|
- Professor's name.
|
||||||
|
- Lecture ID.
|
||||||
|
- Lecture topic.
|
||||||
|
- Room.
|
||||||
|
- Date.
|
||||||
|
- Returns a list of all matching lectures.
|
||||||
|
|
||||||
|
### 4. **Student Grading**
|
||||||
|
|
||||||
|
- Search for a student by name or matriculation number.
|
||||||
|
- Grade them for an exam **only if they are registered** for that exam.
|
||||||
|
- Prevents grading unregistered students.
|
||||||
|
|
||||||
|
### 5. **Delete Students**
|
||||||
|
|
||||||
|
- Delete a student by:
|
||||||
|
- Matriculation number.
|
||||||
|
- Name (first or last).
|
||||||
|
|
||||||
|
### 6. **Relationship Queries**
|
||||||
|
|
||||||
|
- **Connection Check (A and B are people)**:
|
||||||
|
- If A and B are **students** in the same lecture → "classmates".
|
||||||
|
- If A and B are **professors** teaching the same lecture → "colleagues".
|
||||||
|
- If no connection exists → "No connection found".
|
||||||
|
- **Path Finding (A and B are any nodes)**:
|
||||||
|
- Display **all paths** connecting A and B.
|
||||||
|
- Paths are ordered by length: **shortest first, longest last**.
|
||||||
|
|||||||
Reference in New Issue
Block a user