In my opinion your first approach isn't enought because of the difference between categorical and numerical numerical. The standardisation should be maybe more appropriate but i don't have enough knowledge about it and recommand you to treat those two type separetely. Your second proposition seems great because you use appropriate distance for each type of data and combine them to obtain a final result. There are lots to discuss about how weighted them. I will encourage you to read this very interesting paper about categorical data where a lot of distance measure are inspect : http://www-users.cs.umn.edu/~sboriah/PDFs/BoriahBCK2008.pdf It could be more preferable than Hamming depending the case.