Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Qchmqs5378yenglish native ? if not then it can be that, also it's irrelevant, what's important is consistency, if all table names are plural then fine, make all models plural as well, and stick to it
-
TangChr49558y@Qchmqs I'm not sure if you are dissing my language? But I agree with you on consistency.
-
Skipp23468yUm... why is naming tables in singular better? Makes no sense to me. A table contains multiple rows of entities - users, clients, cars, whatever... i always use plural.
Models are singular, but controllers are not -
Qchmqs5378yI'm saying that the guy who wrote the names might be not native and so he doesn't regard this as an issue at all, also consistency is far more important anyway
-
@Skipp the idea is that you give the table the same name as the thing it's modelling. It really doesn't matter at all though; if this is something that introduces any ambiguity to code or discussions then you've got bigger problems!
-
quanqchau258yI use Ruby on Rails and it's convention to name tables in plural. ActiveRecord works like that. For example table name is cars then model name is Car. It's even smart enough to know the plural vs singular forms of words like wah/watches.
-
Select * from product p inner join subproduct sp gives the feel of 1-1 relationships...but products to subproducts feels like the possibility of many-many, so I guess it depends on your table relationships?
Related Rants
Table names in plural. Really?
Slow clapping
undefined
naming
database
table