ArticleslgStudy

science

Database schema

Database schema is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Database schema rather than just read about it. In short: The database schema is the structure of a database described in a formal language supported typically by a relational database management system (RDBMS). The term "schema" refers to the organization of data as a blueprint of how the database is constructed (divided into database tables in the case of relational databases).

Database schema — main illustration
Database schema — illustration

Key takeaways

  • Database schema belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Database schema to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Database schema from memory before moving on to harder problems.

Reference excerpt

The database schema is the structure of a database described in a formal language supported typically by a relational database management system (RDBMS). The term "schema" refers to the organization of data as a blueprint of how the database is constructed (divided into database tables in the case of relational databases). The formal definition of a database schema is a set of formulas (sentences) called integrity constraints imposed on a database. These integrity constraints ensure compatibility between parts of the schema. All constraints are expressible in the same language. A database can be considered a structure in realization of the database language. The states of a created conceptual schema are transformed into an explicit mapping, the database schema. This describes how real-world entities are modeled in the database. "A database schema specifies, based on the database administrator's knowledge of possible applications, the facts that can enter the database, or those of interest to the possible end-users." The notion of a database schema plays the same role as the notion of theory in predicate calculus. A model of this "theory" closely corresponds to a database, which can be seen at any instant of time as a mathematical object. Thus a schema can contain formulas representing integrity constraints specifically for an application and the constraints specifically for a type of database, all expressed in the same database language. In a relational database, the schema defines the tables, fields, relationships, views, indexes, packages, procedures, functions, queues, triggers, types, sequences, materialized views, synonyms, database links, directories, XML schemas, and other elements. A database generally stores its schema in a data dictionary. Although a schema is defined in text database language, the term is often used to refer to a graphical depiction of the database structure. In other words, schema is the structure of the database that defines the objects in the database. In an Oracle Database system, the term "schema" has a slightly different connotation.

Ideal requirements for schema integration The requirements listed below influence the detailed structure of schemas that are produced. Certain applications will not require that all of these conditions are met, but these four requirements are the most ideal.

Overlap preservation Each of the overlapping elements specified in the input mapping is also in a database schema relation. Extended overlap preservation Source-specific elements that are associated with a source’s overlapping elements are passed through to the database schema. Normalization Independent entities and relationships in the source data should not be grouped together in the same relation in the database schema. In particular, source specific schema elements should not be grouped with overlapping schema elements, if the grouping co-locates independent entities or relationships. Minimality If any elements of the database schema are dropped then the database schema is not ideal.

Example of two schema integrations Suppose we want a mediated schema to integrate two travel databases, Go-travel and Ok-flight. Go-travel has two relations:

Ok-flight has just one relation:

The overlapping information in Go-travel’s and Ok-flight’s schemas could be represented in a mediated schema:

Oracle database specificity In the context of Oracle Databases, a schema object is a logical data storage structure. An Oracle database associates a separate schema with each database user. A schema comprises a collection of schema objects. Examples of schema objects include:

tables views sequences synonyms indexes clusters database links snapshots procedures functions packages On the other hand, non-schema objects may include:

users roles contexts directory objects Schema objects do not have a one-to-one correspondence to physical files on disk that store their information. However, Oracle databases store schema objects logically within a tablespace of the database. The data of each object is physically contained in one or more of the tablespace's datafiles. For some objects (such as tables, indexes, and clusters) a database administrator can specify how much disk space the Oracle RDBMS allocates for the object within the tablespace's datafiles. There is no necessary relationship between schemas and tablespaces: a tablespace can contain objects from different schemas, and the objects for a single schema can reside in different tablespaces. Oracle database specificity does, however, enforce platform recognition of nonhomogenized sequence differentials, which is considered a crucial limiting factor in virtualized applications.

Microsoft SQL Server In Microsoft SQL Server, the default schema of every database is the dbo schema.

See also Data element Data mapping Data model Database design Database model Entity–relationship model Knowledge representation and reasoning Object-role modeling Olog Schema matching Three-schema approach

References

External links Tip/Trick: Online Database Schema Samples Library Database Schema Samples Designing the Star Schema Database

Illustrations

Database schema: MediaWiki 1.28.0 database schema. Many FOSS software tools allow modelling of DB layout/schemes like this. Visual representation often may also be exported as a production-ready source code made in DB-compatible languages like SQL.
MediaWiki 1.28.0 database schema. Many FOSS software tools allow modelling of DB layout/schemes like this. Visual representation often may also be exported as a production-ready source code made in DB-compatible languages like SQL.

Worked examples

Example 1 — a first encounter with Database schema

Start with the simplest possible case. Write down what Database schema claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Database schema before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Database schema ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Database schema

In research
Database schema appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Database schema in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Database schema is common in secondary-school and first-year university syllabi. It links to neighbouring topics Data management, Data modeling, Relational model, so understanding it makes those chapters shorter.
In everyday life
Look for Database schema outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Database schema” →

How to study Database schema in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Database schema means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Database schema out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Database schema in simple terms?

The database schema is the structure of a database described in a formal language supported typically by a relational database management system (RDBMS). The term "schema" refers to the organization of data as a blueprint of how the database is constructed (divided into database tables in the case…

Why does Database schema matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Database schema?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Database schema.

Tags

  • Data management
  • Data modeling
  • Relational model

Keep exploring