Creating master tables