Welcome to the Treehouse Community
Looking to learn something new?
When using Express with a SQL database, should you still create an object model similar to the mongoDB examples?
I don't think I'll have an opportunity to use any no SQL in my work for a while, so I was wondering what the difference in an Express app using mongoDB and an Express app using SQL server or MySQL.
Ken AlgerTreehouse Teacher
Many things are very similar from a conceptual standpoint if you replace MongoDB with another database. You are still capturing the data in your app and storing it, it becomes the syntax of how it is done that is altered. There is also going to need to likely be an ORM layer with a SQL database that isn't needed when using MongoDB. Additionally, by going with a SQL database, you lose the flexibility of schema design that MongoDB provides (along with a host of other benefits).
If you have code to share for folks to take a look at, it would help for the "best practice" aspect of your question.