Just one more question, if a field is called “date of birth” for example (has more than 1 word) would I write “dateOfBirth” or “date_of_birth”? Thanks again.
dateOfBirth or dateofbirth or dob (less chance of a typo in the last one)
An underscore can sometimes be hard to spot in a hurry.
The only time I add anything to identify a field as from a particular table is when using id.
As there are usually several tables with a field called id, I tend to add a single letter in front of id. eg mID for members table, fID for the flight table, aID for the accounts table. I find this helps me when including a foreign key, as I can tell which table it is related to; months later this is a real benefit, imho.
Thanks Dr John. Yes, I was curious about what people do for id fields.
Thanks a lot! Much appreciated.
----By the way, one more question, if I have a table named member type should I name it with an underscore e.g. member_type or memberType or membertype?
and they also suggest to use plural. Thanks! Is underscore between 2 words okay for tables as it looks easier to read? e.g. member_type as opposed to membertype?