1) In computer programming, a schema (pronounced SKEE-mah) is the organization or structure for a database. The activity of data modeling leads to a schema. (The plural form is schemata. The term is from a Greek word for "form" or "figure." Another word from the same source is "schematic.") The term is used in discussing both relational databases and object-oriented databases. The term sometimes seems to refer to a visualization of a structure and sometimes to a formal text-oriented description.
Two common types of database schemata are the star schema and the snowflake schema.
2) In another usage derived from mathematics, a schema is a formal expression of an inference rule for artificial intelligence (AI) computing. The expression is a generalized axiom in which specific values or cases are substituted for each symbol in the axiom to derive a specific inference.