node.js - DB structure for a photo application in MEAN. Is this a good approach? -
i'm new mean , trying feet wet implementing application. i'm trying make photo app each user can store photos.
my idea implement follows:
- each user has schema has username, password , other basic credentials.
each uploaded photo have schema as:
var photoschema = mongoose.schema({ photofile: string, photodescription: string });
photofile contains location file stored.
then maintain schema track photos:
var photos = mongoose.schema({ username: string, photoobjects: [photoobject.id] });
so, structure maintain photos of users using mongo? if not i'd appreciate in knowing wrong approach , how improve it.
thank you.
i add last updated , created. metadata never hurts in production applications , debug scenarios.
Comments
Post a Comment