I am learning mongodb and trying it out with a given requirement as follows:
data is formatted in a flat file as:
id: number
user: string
filename1: string
filename1:id: number
filename1:attribute1: number
filename1:attribute2: number
filename1:attribute3: number
filename2: string
filename2:id: number
filename2:attribute1: number
filename2:attribute2: number
filename2:attribute3: number
...
filename_n: string
filename_n:id: number
filename_n:attribute1: number
filename_n:attribute2: number
filename_n:attribute3: number
the file names vary both in names and counts. attributes per file name are fixed. There are multiple users.
I need to be able to query based on attribute values.
I found a relevant question here: How to get a specific embedded document inside a MongoDB collection?
wondering whats the best schema is for my requirement.
Or is mongodb a bad choice for this?