Northwind Database (Document! X Sample)
AdventureWorks Database / Person Schema / Person.Password Table
In This Topic
    Person.Password Table
    In This Topic
    Description
    One way hashed authentication information
    Properties
    Creation Date27/10/2017 14:33
    File GroupPRIMARY
    Text File Group
    System Object
    Published for Replication
    Rows19972
    Data Space Used1,880.00 KB
    Index Space Used16.00 KB
    Columns
     Column NameDescriptionDatatypeLengthAllow NullsDefaultFormula
    Primary Key  Integer4   
     Password for the e-mail account.VarChar128   
     Random value concatenated with the password string before the password is hashed.VarChar10   
     ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.GUID16 
    (newid())
     
     Date and time the record was last updated.DBTimeStamp4 
    (getdate())
     
    Indexes
    IndexDescriptionPrimaryUnique
    Primary key (clustered) constraint
    Relationships
    RelationshipDescription
    Foreign key constraint referencing Person.BusinessEntityID.
    Objects that Person.Password depends on
     Database ObjectObject TypeDescriptionDep Level
    Person.BusinessEntity tablePerson.BusinessEntityTableSource of the ID that connects vendors, customers, and employees with address and contact information.2
    dbo.Name datatypedbo.NameUser Defined Data Type 2
    dbo.NameStyle datatypedbo.NameStyleUser Defined Data Type 5
    Person.Person tablePerson.PersonTableHuman beings involved with AdventureWorks: employees, customer contacts, and vendor contacts.4
    SQL
    SET ANSI_NULLS ON
    SET QUOTED_IDENTIFIER ON
    CREATE TABLE [Person].[Password](
        [BusinessEntityID] [int] NOT NULL,
        [PasswordHash] [varchar](128) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
        [PasswordSalt] [varchar](10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
        [rowguid] [uniqueidentifier] ROWGUIDCOL  NOT NULL,
        [ModifiedDate] [datetime] NOT NULL,
     CONSTRAINT [PK_Password_BusinessEntityID] PRIMARY KEY CLUSTERED 
    (
        [BusinessEntityID] 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 [Person].[Password] ADD  CONSTRAINT [DF_Password_rowguid]  DEFAULT (newid()) FOR [rowguid]
    ALTER TABLE [Person].[Password] ADD  CONSTRAINT [DF_Password_ModifiedDate]  DEFAULT (getdate()) FOR [ModifiedDate]
    ALTER TABLE [Person].[Password]  WITH CHECK ADD  CONSTRAINT [FK_Password_Person_BusinessEntityID] FOREIGN KEY([BusinessEntityID])
    REFERENCES [Person].[Person] ([BusinessEntityID])
    ALTER TABLE [Person].[Password] CHECK CONSTRAINT [FK_Password_Person_BusinessEntityID]
    See Also