Skip to content

Instantly share code, notes, and snippets.

@steveyen
Created February 11, 2011 16:54
Show Gist options
  • Save steveyen/822647 to your computer and use it in GitHub Desktop.
Save steveyen/822647 to your computer and use it in GitHub Desktop.
RDBMS schema safety tips & common practices...
- define primary keys, even if artificial
- normalize your schema, and denormalize carefully
- use indexes judiciously
- distributed 2PC is a tool best left in the toolbox
- __many more known relational schema and modeling tips & tricks go here, but too lazy to type__
Document database / couchdb "schema" safety tips & common practices...
- add a 'type' field to your document
- accountants don't use erasers
-- treat your committed business documents as "append only"
-- views come with implicit erasers; a view is not a business document
- idempotent == better
-
-
-
- (I'm still learning & discovering, but sense there's lots to fill in here.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment