Something I don't understand in Quantum Mechanics

I've just started on QM and I'm puzzled with a lot of new ideas in it.

1.On a recent lecture I've attended, there is an equation says: $\langle q'|\sum q|q\rangle \langle q|q' \rangle =\sum q \delta(q,q')$

I don't understand why $\langle q'|q\rangle \langle q|q' \rangle =\delta (q,q')$

Can you explain this equation for me?

2.Actually, I'm still not clear about the bra-ket notation. I've learnt the bra and the ket could be considered as vectors. Then what are the elements of the vectors?

Thank you very much!

-
 Comment to the question(v3): Both eqs. contain typos. Please check the source again. – Qmechanic♦ Oct 11 '12 at 9:29 – Qmechanic♦ Oct 14 '12 at 17:03

1. The equation is true, if $|q\rangle$,$|q'\rangle$ are chosen from an orthonormal set of vectors, such as an eigenbasis of an operator. Then, by definition, $\langle q|q' \rangle = \delta_{q,q'}$
2. $| q \rangle$ just denotes some vector labeled $q$ in some Hilbert space. The dimension equals the number of distinct classical states that your system can be in.
${{{}}}$