Commit 43114448 authored by Shane A. Stillwell's avatar Shane A. Stillwell 🎯

Minor updates

parent 98b98ca2
......@@ -16,6 +16,10 @@ I developed a 4 hour video course for Packt Publishing called [Mastering MEAN We
## Speaking Engagements (UPDATEME)
### [MidwestJS](http://midwestjs.com/)
In 2014, gave a talk on using Browserify in your apps. During the talk I explain CommonJS some Angular concepts and few other tidbits. The [video](https://www.youtube.com/watch?v=A2wRXnCpqgI) is pretty old and the audio quality is terrible.
### [Cloud Develop](http://clouddevelop.org/)
On August 15th, 2013 in Columbus, OH; I spoke about the **The Three Amigos: AngularJS, Node.js, and Heroku**. This talk involved an introduction to Node.js and Heroku, but focused a lot on AngularJS.
......
......@@ -22,7 +22,7 @@ To me, this is straight forward.
## IDs and the evil auto-increment
Almost every table having unique rows show have an `id` field. Please do NOT name it `accounts.account_id`, if you do this, you should be sad and feel ashamed. Such meta in the field names is just verbose nonsense. It should go without saying, `id` should be unique.
Almost every table having unique rows should have an `id` field. Please do NOT name it `accounts.account_id`, if you do this, you should be sad and feel ashamed. Such meta in the field names is just verbose nonsense. It should go without saying, `id` should be unique.
### Why is auto-increment so bad?
......@@ -100,7 +100,7 @@ Next, make sure you are not using reserved words in SQL or in the app language p
### Foreign Keys and the _id
A lot of database designs will use the convention `emails.person_id` as a foreign key to the field `people.id`. I can see the value in this, because it provides hints in your application layer. The value is just an ID to a foreign field. I personally do not like this convention, as I mentioned previously it's too meta. As a database administrator you know it's a foreign key, so it's almost certainly an ID, putting it in the field name is redundant. As for the application layer, they should be cognizant of table structure and understand `emails.person` is an ID.
A lot of database designs will use the convention `emails.person_id` as a foreign key to the field `people.id`. I can see the value in this, because it provides hints in your application layer. The value is just an ID to a foreign field. I do not like this convention, as I mentioned previously it's too meta. As a database administrator you know it's a foreign key, so it's almost certainly an ID, putting it in the field name is redundant. As for the application layer, they should be cognizant of table structure and understand `emails.person` is an ID.
To recap
......@@ -120,7 +120,7 @@ I've been slightly swayed by the article [How I Write SQL](https://launchbylunch
* Names of tables should be singular
* FK should be like `account_id` instead of just `account`
But above all
Above all
> The only thing worse than bad naming conventions is multiple naming conventions. If your existing project already has a standard approach to naming its database objects then keep using it.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment