Sign up for Hasura Newsletter

Database Concepts

Database Objects

Database objects are entities that hold data and its metadata. In other words, an object is a data structure that is used to store or reference data.

Some of the object types that are contained in a schema are Databases, Tables, Views, Stored procedures, Indexes, Sequences, Constraints, Triggers, and Functions.

Further reading

To get a complete list of objects in your schema -

  • Connect to the SQL Server
  • In the Query editor, execute the following command
SELECT DISTINCT type_desc FROM sys.all_objects;

Output:

type_desc CLR_STORED_PROCEDURE EXTENDED_STORED_PROCEDURE SYSTEM_TABLE VIEW SQL_TABLE_VALUED_FUNCTION SQL_STORED_PROCEDURE AGGREGATE_FUNCTION SERVICE_QUEUE SQL_INLINE_TABLE_VALUED_FUNCTION USER_TABLE PRIMARY_KEY_CONSTRAINT INTERNAL_TABLE CLR_SCALAR_FUNCTION SQL_SCALAR_FUNCTION UNIQUE_CONSTRAINT

What is a Database Schema

A schema is a collection of database objects. Schema is a collection of logical structures of data.

Database schema describes the structure of the data and how the data is related to each other.

Schema is also referred to as a named space of database objects. Each user owns a single schema. You can use the T-SQL commands to create and manipulate the objects in the schema.

Did you find this page helpful?
Start with GraphQL on Hasura for Free
  • ArrowBuild apps and APIs 10x faster
  • ArrowBuilt-in authorization and caching
  • Arrow8x more performant than hand-rolled APIs
Promo
footer illustration
Brand logo
© 2021 Hasura Inc. All rights reserved
Github
Titter
Discord
Facebook
Instagram
Youtube
Linkedin