Database reference - AdventureWorks

AdventureWorks -  tables -  [HumanResources].[JobCandidate]

Description

Résumés submitted to Human Resources by job applicants. 

Table properties

namevalue
name[HumanResources].[JobCandidate]
createdMar 19 2009 9:08PM
modifiedMar 19 2009 9:08PM 
ansi nullson 
quoted identifieron 
row count13
Size of data128 kb
Size of indexes32 kb
Maximum size of a single row2,147,483,662 bytes

Columns

columndatatypelengthbytesdefaultnullsPKFKUQcomputedcomment
JobCandidateIDint identity(1,1)104 no  yes    no  Primary key for JobCandidate records. 
EmployeeIDint104 yes    Employee.EmployeeID      no  Employee identification number if applicant was hired. Foreign key to Employee.EmployeeID. 
Resumexmlmax2147483646 yes      no  Résumé in XML format. 
ModifiedDatedatetime238(getdate())no      no  Date and time the record was last updated. 

Indexes

namedescriptioncolumncomment
IX_JobCandidate_EmployeeIDnonclustered located on PRIMARYEmployeeIDNonclustered index. 
PK_JobCandidate_JobCandidateIDclustered, unique, primary key located on PRIMARYJobCandidateIDClustered index created by a primary key constraint. 

References

name
Employee

Foreign key graph

EmployeeJobCandidate

Foreign keys

namecolumnsforeign columnstypecomment
FK_JobCandidate_Employee_EmployeeIDEmployeeIDEmployee.EmployeeID   Foreign key constraint referencing Employee.EmployeeID. 

Defaults

default namecolumncomment
DF_JobCandidate_ModifiedDateModifiedDateDefault constraint value of GETDATE() 

Dependency graph

DF_JobCandidate_ModifiedDateJobCandidateIX_JobCandidate_EmployeeID...PK_JobCandidate_JobCandidateID...vJobCandidatevJobCandidateEducationvJobCandidateEmployment

Objects that depend on [HumanResources].[JobCandidate]

nameobject typelevel
vJobCandidateview1
vJobCandidateEducationview1
vJobCandidateEmploymentview1

Sample rows

JobCandidateIDEmployeeIDResumeModifiedDate
NULL  <ns:Resume xmlns:ns="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"><ns:Name...  7/24/1997 12:00:00 AM 
NULL  <ns:Resume xmlns:ns="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"><ns:Name...  7/24/1997 12:00:00 AM 
NULL  <ns:Resume xmlns:ns="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"><ns:Name...  7/24/1997 12:00:00 AM 
268  <ns:Resume xmlns:ns="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"><ns:Name...  1/23/2004 6:32:21 PM 
NULL  <ns:Resume xmlns:ns="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"><ns:Name...  7/24/1997 12:00:00 AM 
NULL  <ns:Resume xmlns:ns="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"><ns:Name...  7/24/1997 12:00:00 AM 
NULL  <ns:Resume xmlns:ns="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"><ns:Name...  7/24/1997 12:00:00 AM 
41  <ns:Resume xmlns:ns="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"><ns:Name...  1/23/2004 6:32:21 PM 
NULL  <ns:Resume xmlns:ns="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"><ns:Name...  7/24/1997 12:00:00 AM 
10  NULL  <ns:Resume xmlns:ns="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"><ns:Name...  7/24/1997 12:00:00 AM 

Code

CREATE TABLE [HumanResources].[JobCandidate](
    [JobCandidateID] [int] IDENTITY(1,1) NOT NULL,
    [EmployeeID] [int] NULL,
    [JobCandidateID] [int] IDENTITY(1,1) NOT NULL,
    [Resume] [xml](CONTENT [HumanResources].[HRResumeSchemaCollection]) NULL,
    [ModifiedDate] [datetime] NOT NULL,
 CONSTRAINT [PK_JobCandidate_JobCandidateID] PRIMARY KEY CLUSTERED 
(
    [JobCandidateID] 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].[JobCandidate]  WITH CHECK ADD  CONSTRAINT [FK_JobCandidate_Employee_EmployeeID] FOREIGN KEY([EmployeeID])
REFERENCES [HumanResources].[Employee] ([EmployeeID])
ALTER TABLE [HumanResources].[JobCandidate] CHECK CONSTRAINT [FK_JobCandidate_Employee_EmployeeID]
ALTER TABLE [HumanResources].[JobCandidate] ADD  CONSTRAINT [DF_JobCandidate_ModifiedDate]  DEFAULT (getdate()) FOR [ModifiedDate]

Powered by Yoyodyne © 1971