owned this note
owned this note
Published
Linked with GitHub
# DataBase Design bot manual.
#### How to use the bot efficiently.
1. Create a `Private` github repository. GitHub project name should only contain `_` but no `-` e.g., Valid names are as follows: `CIS552Project` or `CIS_552_Project`.
2. Once you have created your private Github repository, add the github user represented by this email : `cis552 dot 01 dot db@gmail dot com`(remove spaces, and replace dot with `.`, this is to avoid spams since the link is public). How to add github to collaborators, follow this [link](https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/inviting-collaborators-to-a-personal-repository) to know how to add a user as collaborator.
3. Please provide the ssh link to your GitHub repo. You can find it in your repo, click the green button to download, select ssh, and copy the link. Your link will be in this format : `git@github.com:your_github_username/CIS552_Project.git`.
4. In order to run your project via the terminal ( Linux/Mac/WSL for windows 10 users) , you need to orgranize everything(libs,codes, etc) within the same package. i.e ., your project will have the different libraries within the same java package; otherwise, your code won't compile on a terminal. You need to first install java program in your computer. For linux users, you can use the command :
``` apt-get install default-jdk``` , for Windows users, who want to use comand promt, you can watch [this]( https://youtu.be/9s8saAeKEfg) video. Test your project is working on terminal using the command :
```javac Main.java```
This will create a class binary called `Main.class`. Then you run that using the command :
```java Main```
You will be able to see your results. Note that this is just for testing on your machine locally. For the final project, your query engine needs to accept two additional arguments. This will be when you use the `javac`. The two arguments are : `Absolute path to the data file` and `absolute path to the sql file`. We will provide these from the bot side and run your query engine against these two arguments. Feel free to experiment with the sample data and queries provided.
5. The output of queries should be pipe separated, `3|7|8|4`, just as what is in the data files.
6. The tool should be ready to accept a data folder and 1 SQL query file at a time. E.g.,
``` json
javac -verbose -cp .:lib/* -d build/ com/database/*.java
```
then
```json
java -cp build:lib/* com.database.Main /absolute/path/to/query1.sql /absolute/path/to/data/
```
Where the lib folder contains all libraries. The result will be a list of pipe-separated values. See the example below.
```
9|7|6|4
3|4|8|1
9|7|6|4
3|4|8|1
```
7. Each team will have a unique key that they can use to authenticate to the bot, and this key will be linked to the group's private Github repo. To run the query engines against the data files and SQL query, the team needs to send their key to the bot as a message.
8. Once you are ready and want to test the bot, please use the following link to use the bot.
Bot link: https://t.me/db_graderBot
9. If you have questions , don't hesitate to contact me.