Categorising Items Effectively In DataStores

I’m currently saving items by IDs, IDs that I have created data for inside a ModuleScript Database.

ModuleScript Database for Hats

local hatDatabase = {

	[1] = {Name = "Top Hat", Desc = "Classy! Not Trashy", Image = "", Price = "20"},


return hatDatabase

IntValues inside of a folder called PlayerData that are Saved/Loaded


So “H” implies it’s a Hat and “1” is the ID of the Item. The value of the IntValue is irrelevant. My question is, is this effective? Obviously I’ll have more categories than Hats, for example “S” would be Swords etc… but I am questioning if I’m taking the correct route to achieve this. I just need to know how I’d be able to categorise my items effectively.

Sub-folders for different categories would be more efficient in terms of querying data.

But how would I save and load them into the correctly category?