A closer look shows that the 4 x 4 deck rail posts are bolted (not nailed or screwed) to the frame of the deck. The top rail is a 2 x 4 to which the 2 x 2 pickets are nailed. The top cap is a 2 x 6 board. The bottoms of the 2 x 2 rails are nailed to the frame of the deck.