What's the difference between a Database and a Schema in SQL Server? Both are the containers of tables and data.
If a Schema is deleted, then are all the tables contained in that schema also deleted automatically or are they deleted when the Database is deleted?
This question is related to
sql-server
database
sql-server-2005
database-schema
Schema is a way of categorising the objects in a database. It can be useful if you have several applications share a single database and while there is some common set of data that all application accesses.
Schema says what tables are in database, what columns they have and how they are related. Each database has its own schema.
Database is like container of data with schema, and schemas is layout of the tables there data types, relations and stuff
Schema in SQL Server is an object that conceptually holds definitions for other database objects such as tables,views,stored procedures etc.
Source: Stackoverflow.com