. Using the AdventureWorks database implement and test the History data auditing
ID: 3912322 • Letter: #
Question
. Using the AdventureWorks database implement and test the History data auditing model for UPDATE and DELETE actions on any table
create table Address with 3 columns with the same structure as the original table + hist_date + username + hist_id + operation_type
Table properties
Columns
Indexes
name value name [Person].[Address] created Mar 19 2009 9:08PM modified Mar 19 2009 9:08PM ansi nulls on quoted identifier on row count 19,614 Size of data 2,240 kb Size of indexes 2,504 kb Maximum size of a single row 692 bytesExplanation / Answer
If you have any doubts, please give me comment...
CREATE TABLE Address(
AddressID INT identity(1,1) NOT NULL PRIMARY KEY,
AddressLine1 NVARCHAR(60) NOT NULL,
AddressLine2 NVARCHAR(60),
City nvarchar(30) NOT NULL,
StateProvinceID INT,
PostalCode NVARCHAR(15),
rowguid UNIQUEIDENTIFIER,
ModifiedDate DATETIME,
hist_date DATE,
username NVARCHAR(30),
hist_id INT,
operation_type NVARCHAR(30),
FOREIGN KEY(StateProvinceID) REFERENCES StateProvince(StateProvinceID)
);
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.