user_ratingsTable:- Populated by
RatingDataParser, which parses user ratings in the specified file format and performs batch inserts into the database.
- Populated by
item_similarityTable:- Populated by
DatabaseManager, which processes a similarity file to batch-insert records into the database.
- Populated by
- The
RecommendationSystemqueriesuser_ratingsto retrieve user preferences. - It uses
item_similarityto find items related to those the user has rated, applying a similarity threshold. - Recommendation scores are calculated based on a combination of user ratings and item similarity scores.
-
Purpose: Stores individual user ratings for items, representing user preferences.
-
Schema:
user_id(INT, PRIMARY KEY)item_id(INT, PRIMARY KEY)score(INT): The rating score assigned by the user.
-
Usage:
- Insertion: Handled by
RatingDataParser. - Query: Provides user recommendations in conjunction with the
item_similaritytable.
- Insertion: Handled by
-
Purpose: Stores similarity scores between pairs of items.
-
Schema:
item1(INT, PRIMARY KEY)item2(INT, PRIMARY KEY)similarity_score(DOUBLE): The calculated similarity score betweenitem1anditem2.
-
Features:
- Add index to
item1for fast searching. - The
similarity_scoreindicates the strength of the relationship between items.
- Add index to
-
Usage:
- Insertion: Managed by
DatabaseManager. - Query: Used by the
RecommendationSystemto find related items and compute recommendation scores.
- Insertion: Managed by