How row oriented and column oriented db works?