Distributed Database Partitioning and Query Processing