Description
Lookup table containing the departments within the Adventure Works Cycles company.
Table properties
| name | value |
|---|
| name | [HumanResources].[Department] |
| created | Mar 19 2009 9:08PM |
| modified | Mar 19 2009 9:08PM
|
| ansi nulls | on
|
| quoted identifier | on
|
| row count | 16 |
| Size of data | 8 kb |
| Size of indexes | 24 kb |
| Maximum size of a single row | 410 bytes |
Columns
| column | datatype | length | bytes | default | nulls | PK | FK | UQ | computed | comment |
|---|
| DepartmentID | smallint identity(1,1) | 5 | 2 | | no
| yes
| |
| no
| Primary key for Department records.
|
| Name | Name | 50 | 200 | | no
|
| |
| no
| Name of the department.
|
| GroupName | Name | 50 | 200 | | no
|
| |
| no
| Name of the group to which the department belongs.
|
| ModifiedDate | datetime | 23 | 8 | (getdate()) | no
|
| |
| no
| Date and time the record was last updated.
|
Indexes
| name | description | column | comment |
|---|
| AK_Department_Name | nonclustered, unique located on PRIMARY | Name | Unique nonclustered index.
|
| PK_Department_DepartmentID | clustered, unique, primary key located on PRIMARY | DepartmentID | Clustered index created by a primary key constraint.
|
Referenced by
Foreign key graph
Defaults
Dependency graph
Objects that [HumanResources].[Department] depends on
| name | object type | level |
|---|
| Name | type | 1 |
Objects that depend on [HumanResources].[Department]
Sample rows
| DepartmentID | Name | GroupName | ModifiedDate |
|---|
| 1
| Engineering
| Research and Development
| 6/1/1998 12:00:00 AM
|
| 2
| Tool Design
| Research and Development
| 6/1/1998 12:00:00 AM
|
| 3
| Sales
| Sales and Marketing
| 6/1/1998 12:00:00 AM
|
| 4
| Marketing
| Sales and Marketing
| 6/1/1998 12:00:00 AM
|
| 5
| Purchasing
| Inventory Management
| 6/1/1998 12:00:00 AM
|
| 6
| Research and Development
| Research and Development
| 6/1/1998 12:00:00 AM
|
| 7
| Production
| Manufacturing
| 6/1/1998 12:00:00 AM
|
| 8
| Production Control
| Manufacturing
| 6/1/1998 12:00:00 AM
|
| 9
| Human Resources
| Executive General and Administration
| 6/1/1998 12:00:00 AM
|
| 10
| Finance
| Executive General and Administration
| 6/1/1998 12:00:00 AM
|
Code
CREATE TABLE [HumanResources].[Department](
[DepartmentID] [smallint] IDENTITY(1,1) NOT NULL,
[Name] [dbo].[Name] NOT NULL,
[DepartmentID] [smallint] IDENTITY(1,1) NOT NULL,
[GroupName] [dbo].[Name] NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_Department_DepartmentID] PRIMARY KEY CLUSTERED
(
[DepartmentID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
ALTER TABLE [HumanResources].[Department] ADD CONSTRAINT [DF_Department_ModifiedDate] DEFAULT (getdate()) FOR [ModifiedDate]