How do I determine an unknown element if I know the diffraction lines? I'm not quite sure if I fully understand x-ray diffraction yet. In a standard XRD experiment, if I'm given the $\theta$ values for the $K_{\alpha}$ and $K_{\beta}$ peaks, I can plug them into Bragg's law to find the spacing between atomic planes, $d$. How does this help me identify an unknown crystal?
I think if I can determine $d$, then I can somehow determine the miller indices. Then, I can use
$$d=a/\sqrt{h^2+k^2+l^2}$$
to solve for $a$. Would $a$ identify the crystal?
 A: In brief, every crystalline compound is characterized by a structure where the different lattice planes have different stoichiometric compositions and are separated by characteristic lengths. Taking into account the reflection conditions of the considered space group, a diffraction pattern is a collection of peaks whose positions are determined by the interplanar spacing, whereas their intensity depends on the chemical content of the plane (this is true if we disregard preferred orientation, structural strain and other structural defects effects).
So the equation that you report is very simplified and holds only for a cubic crystal, but in principle you could find two completely different compounds with the same a-parameter (within the experimental error). As a consequence you must also take a look at the distribution of the peak intensities in the diffraction pattern in order to precisely identify your phase.
A: Identification of materials by XRD is through matching the unique "fingerprint" of each material's diffraction pattern. From AZoMaterials:

Each chemical compound or phase reflects x-rays slightly differently and so has a different diffraction pattern. A mixture of compounds gives a pattern that is made up of the patterns of all the individual compounds. So to identify the compounds present in a mixture the pattern obtained is compared to a large database of patterns.

So if you want to identify something by XRD today, you just take a spectrum and the computer will match it to one someone else has already have logged. This is possible because that person knew what the compound was by means other than XRD and recorded its XRD spectrum in a searchable database, such one of those provided by The International Centre for Diffraction Data.
XRD can tell you what phase the material is in, which is where those equations come into play. As an example, here are the spectra for ferrite and austenite in which you can see the different crystal faces labelled:
Ferrite:

Austenite:

(above two images are from Professor Sir Harry Bhadeshia's Phase Transformation Group website at University of Cambridge) 
