README
Authours: Steven Siyu Xiong, Qiyuan Bao
ER Diagram: https://app.creately.com/diagram/Id97ysOhrTj/view and ER diagrams.zip
Overview
scripts
folder consist of SQL code to to create the tables, primary keys, foreign keys, and any additional indexes. Load the data from data folder.data
folder consist of csv raw social media datacommandLine.py
is the prototype command line client consist of frontend and backend code.
Setup
- Create database
create database projecttest;
- Use database
use projecttest;
- Under
cd scripts
directoryuse projecttest;
thensource CreateTables.sql;
- Under
cd data
directoryuse projecttest;
thensource ../scripts/LoadData.sql
pip install click
pip install click_repl
pip install mysql-connector
- In
commandLine.py
, understartDb()
function, change thehost
,user
, andpassword
parameters.
Run
- Note you have to run all the commands inside the interactive shell
- Run the interactive shell with
python3 commandLine.py repl
- To check available commands run
--help
in the interactive shell
Commands
python3 commandLine.py repl
Run these commands after you have enter the interactive shell with - For help, run
--help
and see the available commands. - Helpful tip, you can use
tab
to auto complete partially typed commands, arrow up and down to select as well.
Exit
exit
Account
signin
signingroup
to login as group adminregister
Post
myposts
show posts made by the logged in usernewpost
reactpost
readpost
deletepost
comment
showallpostsbyuser
Unread Posts
showunreadpostsbygroup
showunreadpostsbytopic
showunreadpostsbyuser
Follow
followgroup
followperson
followtopic
unfollowgroup
unfollowperson
unfollowtopic
Friend
acceptfriendrequests
addfriend
seefriends
friendrequestscreatedbyme
deletefriend
Group
creategroup
showallpostsbygroup
showmyfollowedgroups
grantgroupmembership
requestgroupmembership
showallgroupscmd
Show a list of groups and their Group IDsshowgroupswhereiamadmin
showgroupswhereiammember
Topic
showtopics
showmyfollowedtopics
showallpostsbytopic