Welcome to the Knowledge Showdown Database repository! This repository contains the SQL scripts and database schema for implementing a comprehensive knowledge showdown system. The database is designed to store and manage data related to avatars, countries, average scores, categories, questions, users, games, responses, answers, and various roles and permissions. The schema consists of 16 tables, including 11 primary tables and 5 joining tables.
Figure 1 Knowledge Showdown Database Diagram.
-
Avatars:
- Stores avatar images and associated data.
-
Countries:
- Contains information about countries.
-
AverageScores:
- Stores average scores data.
-
CategoriesQuestions:
- A joining table connecting categories and questions.
-
Users:
- Stores information about users, including unique IDs, names, and contact details.
-
Categories:
- Contains information about knowledge categories.
-
Questions:
- Stores details about questions, including question IDs, text, and other pertinent information.
-
Games:
- Keeps track of games and their details.
-
Responses:
- Stores responses to questions.
-
Answers:
- Contains information about answers to questions.
-
UsersRoles:
- A joining table connecting users and roles.
-
GamesQuestions:
- A joining table connecting games and questions.
-
RolesPermissions:
- A joining table connecting roles and permissions.
-
Roles:
- Stores information about user roles.
-
UsersPermissions:
- A joining table connecting users and permissions.
-
Permissions:
- Stores information about user permissions.
To set up the Knowledge Showdown Database on your MySQL Server, follow these steps:
- Connect to your MySQL Server using your preferred client or MySQL Workbench.
- Create a new database using the provided SQL commands in the
create_database.sql
file.
Execute the SQL scripts in the Knowledge Showdown Database Scripts
folder in the following order:
1.create database
: Create the database named Knowledge-Showdown-Database
2. primary tables
: Create the necessary primary tables in the database.
3. joining tables
: Create the necessary joining tables in the database.
The database is now set up and ready to be used by the Knowledge Showdown application.
Alternatively, you can restore the database from the provided .mwb
file.
Contributions to the Knowledge Showdown Database project are welcome. If you would like to contribute, please follow these guidelines:
- Fork the repository and create your branch:
git checkout -b your-branch-name
- Make changes following the project's coding conventions.
- Test your changes thoroughly to ensure they don't introduce any issues.
- Commit your changes:
git commit -m "Your commit message"
- Push to the branch:
git push origin your-branch-name
- Open a pull request, describing your changes and their purpose.
The Knowledge Showdown Database project is released under the MIT License. You are free to use, modify, and distribute the database schema and SQL scripts according to the terms of the license.
If you have any questions, suggestions, or feedback, please feel free to reach out. You can contact us by opening an issue on the repository.
Thank you for your interest in the Knowledge Showdown Database project. We hope it proves to be a valuable resource for implementing the database component of your knowledge showdown system!