Discrete Approximations, Relaxations, And Applications In Quadratically Constrained Quadratic Programming