Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Naming Conventions

I read this tutorial, but I got confused about this.

What naming style should I be using in this case:

  • My table name: QuestionTypes or question_types?
  • My table id: QuestionTypeID or QuestionType_ID, question_type_id?

I know when MySQL workbench create .sql file, QuestionType_ID will be converted into questiontype_id, so should I be using this style: QuestionType?

Thank you very much.

like image 845
Jack Avatar asked Nov 12 '22 03:11

Jack


1 Answers

If you want to follow that specific convention, your table would be named question_types, and the field question_type_id.

I don't follow that convention, so I would name the table QuestionType and the field QuestionTypeId.

like image 63
Guffa Avatar answered Nov 14 '22 22:11

Guffa