- DOTNET

Database schema



database schema (/ˈski.mə/ skee-ma) of a database system is its structure described in a formal language supported by the database management system (DBMS) and refers to the organization of data as a blueprint of how a database is constructed (divided into database tables in case of Relational Databases). The formal definition of database schema is a set of formulas (sentences) called integrity constraints imposed on a database.

Levels of database schema[edit]




A database schema is a way to logically group objects such as tables, views, stored procedures etc. Think of a schema as a container of objects.
You can assign a user login permissions to a single schema so that the user can only access the objects they are authorized to access.
Schemas can be created and altered in a database, and users can be granted access to a schema. A schema can be owned by any user, and schema ownership is transferable.
You can also read full article about SQL Server - Database Schemas.


What is the difference between a schema and a table and a database?


relation schema is the logical definition of a table - it defines what the name of the table is, and what the name and type of each column is. It's like a plan or a blueprint. A database schema is the collection of relation schemas for a whole database.
table is a structure with a bunch of rows (aka "tuples"), each of which has the attributes defined by the schema. Tables might also have indexes on them to aid in looking up values on certain columns.
database is, formally, any collection of data. In this context, the database would be a collection of tables. ADBMS (Database Management System) is the software (like MySQL, SQL Server, Oracle, etc) that manages and runs a database.


schema : database : table :: floor plan : house : room
Copyright © 2015 DOTNET All Right Reserved