"Use a collective name or, less ideally, a plural form. For example (in order of preference) staff and employees."<p>I hope Simon Holywell has never had to model a zoo in SQL. "Where are the rattlesnakes Simon - are they in the rhumba, crash or knot table?" [1]<p>[1] <a href="http://blog.writeathome.com/index.php/2013/03/improved-animal-groups-poster/" rel="nofollow">http://blog.writeathome.com/index.php/2013/03/improved-anima...</a>
What's the stance on using tabs to keep the stuff after keywords lined up? Whacking space a bunch of times to keep an OR lined in a WHERE clause is incredibly annoying. Why not just go WHERE\tcol1 = 3\n\t\tORcol2=6<p><pre><code> select *
from asdf
where col1 = 5
or col2 = 6
</code></pre>
I'll concede that the river is less pretty, but it's substantially easier to type, and SQL keywords are remarkably conducive to being tabbed around.<p>EDIT: Perhaps hilariously, by preceding the code with two spaces, the stuff got out of alignment. I'm adding another two padding spaces to start. (I usually use a 4 space tab, but I can see how the river becomes a bit wide on 8.)
"Use a collective name or, less ideally, a plural form. For example (in order of preference) staff and employees."<p>This goes contrary to what I was taught : use singular form. When I model my databases I think in those terms : employee works for 1 to n company, company has 0 to n employee.
Since it's a "many to many" relationship you need a third table (entity really) which you could call "working_with". The columns are id_employee and id_company.<p>This is the basis of the Merise method, but I don't think it's available in English. It makes modeling databases really easy.