Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript Using SQL ORMs with Node.js Defining Models Use Options to Adjust Models

model name vs table name

Since "model" in ORM equals "table" in database and we communicate with DB through ORM, why do we care about table names? (in Movie.init(), it seems that we can set table name to whatever we like and different from model name)

1 Answer

Robert Manolis
STAFF
Robert Manolis
Treehouse Guest Teacher

Hey Tim Wang, it's a preference thing as I understand it. It's just a way of providing the option of customizing the table name. Here's a Sequelize doc that talks more about this. :thumbsup: