The very classical orthogonal polynomials named after Hermite, Laguerre and Jacobi, satisfy many common properties. For instance, they satisfy a second-order differential equation with polynomial coefficients and they can be expressed in terms of a hypergeometric function.Replacing the differential equation by a second-order difference equation results in (discrete) orthogonal polynomial solutions with similar properties. Generalizations of these difference equations, in terms of Hahn's q-difference operator, lead to both continuous and discrete orthogonal polynomials with similar properties. For instance, they can be expressed in terms of (basic) hypergeometric functions.Based on Favard's theorem, the authors first classify all families of orthogonal polynomials satisfying a second-order differential or difference equation with polynomial coefficients. Together with the concept of duality this leads to the families of hypergeometric orthogonal polynomials belonging to the Askey scheme. For each family they list the most important properties and they indicate the (limit) relations.Furthermore the authors classify all q-orthogonal polynomials satisfying a second-order q-difference equation based on Hahn's q-operator. Together with the concept of duality this leads to the families of basic hypergeometric orthogonal polynomials which can be arranged in a q-analogue of the Askey scheme. Again, for each family they list the most important properties, the (limit) relations between the various families and the limit relations (for q --> 1) to the classical hypergeometric orthogonal polynomials belonging to the Askey scheme.These (basic) hypergeometric orthogonal polynomials have several applications in various areas of mathematics and (quantum) physics such as approximation theory, asymptotics, birth and death processes, probability and statistics, coding theory and combinatorics.