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

Rust tutorial #370

Open
wants to merge 7 commits into
base: dev
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
Binary file added src/content/docs/tutorials/Graph_Schema.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
71 changes: 71 additions & 0 deletions src/content/docs/tutorials/example-database.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
title: Example database
---

The schema of the community is of follows:

![Graph Schema](./Graph_Schema.png)

## Nodes
### **User**:
The User node represents users within the social network. Each user has their information attached, such as:
- **user_id** (INT64): This is an unique id which is used to sort and find users.
- **username** (STRING): This is the unique username which each user will have.
- **account_creation_date** (DATE): This represents the date which the account was created.
```
userID,username,account_creation_date
1,epicwolf202,2022-09-09
2,silentninja637,2023-01-27
3,stormcat597,2023-02-25
4,brightking765,2023-05-11
5,fastgirl798,2021-06-11
```

### **Post**:
The Post node represents the posts which has been made on the social network. Each post has its information attached, such as:
- **post_id** (INT64): This is an unique id which is used to sort and find posts.
- **creation_date** (DATE): This represents the date which the account was created.
- **like_count** (INT64): This represents the amount of likes the post has received.
- **retweet_count** (INT64): This represents the amount of retweets the post has received.
```
postID,creation_date,like_count,retweet_count
1,2021-12-08,427,29
2,2022-06-02,9,16
3,2023-01-14,238,51
4,2023-01-06,67,147
5,2022-10-26,103,73
```

## Relations
### **FOLLOWS**
The relationship `FOLLOWS` goes from `User` node to `User` node. This relation represents a user following another user on the social network.
```
followerID,followeeID
1,7
1,6
2,17
2,10
2,13
```

### **POSTS**
The relationship `POSTS` goes from `User` node to `Post` node. This relation represents a user posting the post on the social network.
```
userID,postID
17,1
4,2
15,3
7,4
14,5
```

### **LIKES**
The relationship `Likes` goes from `User` node to `Post` node. This relation represents a user liking the post on the social network.
```
userID,postID
16,1
2,1
4,1
13,1
11,1
```
17 changes: 17 additions & 0 deletions src/content/docs/tutorials/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,20 @@ ecosystem. Click on the links below to open and run the notebooks.
href="https://colab.research.google.com/drive/16FscFHwSKQNXFprChdQufMP7G6u8cMTS"
/>
</CardGrid>

## Other language tutorials:
For other language APIs which Kùzu supports, we will be using the following dataset to explore the extensive abilities which graph database is able to provide.

<LinkCard
title="Example Database"
description="Database schema used in API tutorials"
href="/tutorials/example-database"
/>

The network which we will be using in this tutorial is suppose to simulate a community of users in a social network. The data for the network is in this [zip file](https://rgw.cs.uwaterloo.ca/kuzu-test/tutorial/tutorial_data.zip).

<LinkCard
title="Rust"
description="Tutorial for Kùzu's Rust API"
href="/tutorials/rust/rust_tutorial"
/>
Loading