I am new to document oriented databases. My question is why do I have to declare a model in MongoDB each and every time my app starts? For example:
mongoose.model('User', {
collection: 'user',
properties: [
'created',
'username',
'password',
'email'
]} //Edited: '}' was missing in original post
);
I want to build all tables ONCE and in my app only feed or query for data. I thought that all data architecture should be set via CLI or a special Admin (let's say PhpMyAdmin for mySql).
It turns out that in the beginning of my application each and every time I declare a data model. Doesn't make sense to me. Help :)