Member since Apr 08, 2007, follows 11 people, 2 public groups, 4330 public bookmarks (4658 total).

More »
Tags

Recent Tags:
Top Tags:

More »
Recent Bookmarks and Annotations

  • A new way to increase rewards beyond 5X - The Frequent Miler on Feb 26, 15
  • Chase Ink 5X: Maximizing the 5x Spending Bonus on Retail Gift CardsThe Points Guy on Feb 25, 15
    • So if you were to go through the Ultimate Rewards portal to one of those sites and then buy gift cards online with your Ink Bold or Plus, not only would you be earning 5X points per $1, but you’d also be earning an additional 2-3 points depending on the merchant for a total of up to 8 Ultimate Rewards points per dollar, which is an amazing value.
  • Users Know: Your Job Is Not to Write Code on Feb 25, 15
  • Emotional Design Fail: Divorcing My Nest Thermostat on Feb 23, 15
    • Beauty Is Only Chrome Deep (Visceral)

       

      The Nest looks pretty on my wall, especially as opposed to its old, utilitarian-looking predecessor. The physical appearance may win every beauty contest, but if I can’t do what I want with it, then it’s art not design.

    • Beauty Is Only Chrome Deep (Visceral)

       

      The Nest looks pretty on my wall, especially as opposed to its old, utilitarian-looking predecessor. The physical appearance may win every beauty contest, but

    • if I can’t do what I want with it, then it’s art not design
  • GUI Database Design Tools - PostgreSQL wiki on Feb 23, 15
  • How I Write SQL, Part 1: Naming Conventions on Feb 23, 15
    • Indexes should be explicitly named and include both the table name and the column name(s) indexed.
  • The Database Programmer: Database Skills: A Sane Approach To Choosing Primary Keys on Feb 22, 15
    • Rule of Thumb 1: Use Character Keys For Reference Tables
    • We can now see the surprising fact that the integer keys will slow us down  in many situations. Not only do they have no performance advantage, but  they actually hurt performance. The reason is because they require  joins on almost every query. A 3-table query with two joins will  always be much slower than a 1-table query with no joins. If you are using  an ORM system that does not do JOIN's, but instead does separate fetches,  then you have 3 round trips to the server instead of 1, and heaven  forbid you have queries in a nested loop, the performance will simply  crash and burn. All of this is kind of  ironic since you so often hear people blindly repeat the dogmatic  phrase "We will use integer keys for performance reasons..."
    • If you are following these rules of thumb closely in your  project then it is important not to use the object id  as a primary key, and therefore you may never use it  as a foreign key either. If you use an object id as the  primary key then you lose a lot  of the benefits of the character keys listed above.

    1 more annotation...

  • Re: Referencing Serial Type as Foreign Key on Feb 22, 15
    • In a table definition I reference the primary key of another table. That > key is of datatype SERIAL. In the referencing table, do I define the column > as >  > col_name INTEGER REFERENCES other-table (primary_key_field), >  > or is the datatype SERIAL because that's what the referenced > primary_key_field is?
    • Serial is a psuedo type to integer/big (depending on the type of  serial). What you have above should work fine.
  • naming conventions - PostgreSQL: default constraint names - Stack Overflow on Feb 22, 15
      • The standard names for indexes in PostgreSQL are:

          

        {tablename}_{columnname(s)}_{suffix}

          

        where the suffix is one of the following:

          
           
        • pkey for a Primary Key constraint
        •  
        • key for a Unique constraint
        •  
        • excl for an Exclusion constraint
        •  
        • idx for any other kind of index
        •  
        • fkey for a Foreign key
        •  
        • check for a Check constraint
        •  
          

        Standard suffix for sequences is

          
           
        • seq for all sequences
  • PostgreSQL: Documentation: 9.4: Character Types on Feb 22, 15
    • Values of type character are physically  padded with spaces to the specified width n, and are stored and displayed that way.
    • The storage requirement for a short string (up to 126 bytes)  is 1 byte plus the actual string, which includes the space  padding in the case of character.
    • Tip: There is no performance difference among these  three types, apart from increased storage space when using  the blank-padded type, and a few extra CPU cycles to check  the length when storing into a length-constrained column.  While character(n) has performance advantages in  some other database systems, there is no such advantage in  PostgreSQL; in fact  character(n) is usually the slowest of the  three because of its additional storage costs. In most  situations text or character varying should be used instead.

More »
Groups

  • Crossfit

    5 members, 30 items

    A place for us to track our Crossfit workouts and post links to any interesting information we find.

  • Diigo Community

    4313 members, 9074 items

    Share your review, tips, tricks, and ideas for using Diigo here, and discuss our features, ideas for new features, anything Diigo related. Note that bookmarks posted to this group have no relation to 'Hot Bookmarks from the Diigo Community'.

Highlighter, Sticky notes, Tagging, Groups and Network: integrated suite dramatically boosting research productivity. Learn more »

Join Diigo