1 model ≠ 1 table. Unfortunately, when designing a database you have to think at a lower level than "models" and "objects". You will have to deal with technical tables.
Being almost a newbie in SQL, I don’t understand the subtility here… can you tell a bit more what you mean ?
Thank you for your feedback! The most obvious case is junction tables (n..m relationship), i.e: users have n groups, groups contain m users, then you need a group_user table (a.k.a a junction table). This kind of table represents a relation between two models, not a model itself.
Aah. This threw me off thinking you mean one model ought not to be constrained in 1 table. What you really meant is every table isn't necessarily a representation of a model.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Being almost a newbie in SQL, I don’t understand the subtility here… can you tell a bit more what you mean ?
Thank you for your feedback! The most obvious case is junction tables (n..m relationship), i.e:
users
have ngroups
,groups
contain musers
, then you need agroup_user
table (a.k.a a junction table). This kind of table represents a relation between two models, not a model itself.Aah. This threw me off thinking you mean one model ought not to be constrained in 1 table. What you really meant is every table isn't necessarily a representation of a model.