Bentley912 / Bamazon

Command Line Application - Mock Amazon App
0 stars 0 forks source link

SQL querying issues #2

Closed gabilan closed 7 years ago

gabilan commented 7 years ago

Right now all SQL queries are inline. The model and querying model are not aligned. It's not clear what the schema of the underlying data structure is. Try moving to an ORM (object-relational mapper) solution. It's easier to read and more clear about intent.

http://docs.sequelizejs.com/en/v3/

gabilan commented 7 years ago

Using a library like sequelize will also make it easier to implement transactions. That is, you can rollback and commit transactions. Which is paramount for an ordering system in case of failure.

Bentley912 commented 7 years ago

Thanks Ernest for checking it out. We are learning about ORM and sequelize this week. Good to know we are aligned with industry standard. I'll keep you posted as I progress. I still have 2.5 more months to go.

Sent from my iPhone

On May 3, 2017, at 3:45 PM, Ernest Wilkerson notifications@github.com wrote:

Using a library like sequelize will also make it easier to implement transactions. That is, you can rollback and commit transactions. Which is paramount for an ordering system in case of failure.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.