• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 157
  • Last Modified:

Files / File Groups / Table Spaces / Schemas in SQL Server 2005 (Architecture) !!

Hi,

Can you please exaplin me the architecture / building blocks for SQL Server 2005 (Like Files / Pages / File Groups / Table Spaces / Schemas etc) to know how SQL Server was built ? This will help me a lot to understand the basics of SQL Server to know how it is working...just curious.

Thanks
0
kishore_peddi
Asked:
kishore_peddi
1 Solution
 
SQL_SERVER_DBACommented:
this is a really good explaination for Files and File Groups....http://www.informit.com/guides/content.aspx?g=sqlserver&seqNum=42&rl=1
 
Pages
The SQL Server database page size is 8 KB. Each page contains a header with fields such as Page Number, Object Id, LSN, Index Id, Torn bits, and Types. The actual row data is located on the remaining portion of the page. The internal database structures track the allocation state of the data pages in the database.

Page Number
A page number is a value from 0 through ((Max File Size/8 KB)-1). The page number multiplied by 8 KB provides the offset in the file to the first byte in the page.

Schema
A schema is nothing more than a named, logical container in which you can create database objects. A new schema is created using the CREATE SCHEMA DDL statement. For instance, you might create a schema for sales-related data by using the following T-SQL:

CREATE SCHEMA Sales
GO

Once created, you can add objects, such as tables or stored procedures, to the schema. To do so, you must prefix them with the schema name:

CREATE TABLE Sales.SalesPeople
(
    SalesPersonId INT,
    SalesPersonName VARCHAR(50)
)
GO

Just as you might expect, you can access an object by referencing it by schema name:

SELECT *
FROM Sales.SalesPeople
GO

0
 
Aneesh RetnakaranDatabase AdministratorCommented:
Check books online and the book 'Inside SQL Server "
0

Featured Post

NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now