The most common cementing materials are silica and calcium carbonate, which are often derived either from dissolution or from alteration of the sand after it was buried.
The environment where it is deposited is crucial in determining the characteristics of the resulting sandstone, which, in finer detail, include its grain size, sorting, and composition and, in more general detail, include the rock geometry and sedimentary structures.