-
Notifications
You must be signed in to change notification settings - Fork 1
Developers ‐ EcoMind database
The next image presents the EcoMind database structure.

Following, each database table and their relationships are explained in detail.
EcoMind reuses the Django User model to store critical information such as email, password and is_superuser fields. This information is used as part of the login system and to access to the administration panel. EcoMind extended the User model capabilities with its own CustomUser model. This model contains the name field which is used in conjunction with the User.password for the login system. It also contains the points field which is used to track the amount of points that the user has gained by using the application. By default, users start with 0 points.
EcoMind users store a set of images in their local computers. These users use this application to be able to tag those images. The Tag table contains the information that is stored in the tagging process, such as: file_id (that corresponds to the file image name), material, package_color, bottle_cap, dirtiness, packaging_type, brand, reference, capacity, and damage. Each tag is associated with the CustomUser that completes this process. Therefore, users obtain points for each different image that is tagged.
Once a user tags an image, that user is able to classify that image file in its corresponding bin. The Classification table includes information about the date, custom_user_id, and file_id. The classification process also gives some points to the corresponding user.
The Activity table stores information about the history and types of processes that user has carried out in the EcoMind application. The type field could be "Classify", "Tagging" or "Redeem Points".
Once an EcoMind user executes a process that involves a modification in his/her points, a PointsHistory record is created. The PointsHistory table stores the date and the amount points that were gained or redeemed by a specific user.
The Product table contains information about virtual products that the users can "purchase" by using their points. Product information includes name, image, description, and price.