ChatDB is an interactive, ChatGPT-like application that assists users in learning how to query data in various database systems (both SQL and NoSQL). Unlike traditional query interfaces, ChatDB provides a natural language approach to database interactions while still allowing real-time query execution and result display.
DSCI551_PROJECT/
├── dsci551/
│ ├── migrations/
│ │ ├── init.py
│ │ ├── 0001_initial.py
│ │ ├── 0002_userqueryhistory.py
│ │ ├── 0003_alter_order_table.py
│ │ ├── 0004_alter_order_table.py
│ │ └── 0005_alter_order_customer_id.py
│ ├── static/
│ │ └── images/
│ │ └── logo.png
│ ├── templates/
│ │ ├── home.html
│ │ ├── login.html
│ │ ├── nosql_query.html
│ │ ├── query_form.html
│ │ ├── query_history.html
│ │ ├── register.html
│ │ └── select_database.html
│ ├── init.py
│ ├── admin.py
│ ├── apps.py
│ ├── models.py
│ ├── tests.py
│ └── views.py
├── dsci551_project/
│ ├── init.py
│ ├── asgi.py
│ ├── settings.py
│ ├── urls.py
│ └── wsgi.py
├── Final Report.docx
├── manage.py
└── requirements.txt
- Frontend: HTML, CSS, JavaScript
- Backend: Django
- Databases:
- MySQL (relational)
- MongoDB (NoSQL)
- Dependencies:
Django==5.0.3pymongo==4.12.1PyMySQL==1.1.0Requests==2.32.3
- Clone the repository
git clone [repository-url]
- Install required dependencies
pip install -r requirements.txt
- Enter your own mysql account under dsci551_project/dsci551_project/setting.py
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'dsci551_project', # you database name 'USER': 'root', #your mysql username 'PASSWORD': '******', #your mysql password 'HOST': 'localhost', 'PORT': '3306', #The port you want } }
- Start Django server
python manage.py runserver
- Open your browser and navigate to:
http://127.0.0.1:8000
-
MySQL Dataset We use the dataset from HW3 as an example, and our data is in the folder 'Data_Source/MySQL' path, you can import each of them as separate tables in on database in MySQL
-
MongoDB Dataset We use the dataset from HW5 as an example, and our data is in the folder 'Data_Source/MongoDB' path, you can import each of them as separate tables in on database in mongoDB
- Login
- Database Selection
- Choose between MySQL and MongoDB
- Database Connection
- Connect to your MySQL database by input your database name and password
- Connect to your MongoDB database by input URL
- Natural Language Queries
- Input the query statement you want to try
Made with ❤️🔥 by Team ChatDB 42