A schema in computer programming is the organisation or structure for a database.
It can also be used in regards to maths where a schema is a formal expression of an inference rule for artificial intelligence computing.
A schema is created through modelling and is used when talking about both relational databases and object oriented databases.
Basically a schema is the blueprint of how a database is constructed, although it can be said to be a set of formulas called integrity constraints imposed on a database. Integrity constraints are designed to ensure the compatibility between parts of the schema and all constraints are expressible in the same language.