I'm using Lightswitch to develop a quoting interface that implements revision control. They way I do it is to have a parent table that contains a list of all the quotes (this would be similar to an Explorer window full of Excel spreadsheets i.e. data.xls, data(1).xls, data(2).xls, etc.). Each of which has a unique ID and a revision number. The details of each revision of each quote are held in a child table that has a foreign key relationship linking it to the unique ID of a particular revision of a particular quote.
When a user logs in, they are presented with a grid view of all revisions of their quotes. When they select a particular quote revision, the unique ID of that entry is used as a parameter in all of my filter queries on the details of that quote, which are presented on a different screen.
My tables are created like this:
create table Quotes (
"QuoteID" uniqueidentifier
not null primary key,
"QuoteNumber" nvarchar(8)
not null,
"QuoteRevStart" date
not null,
"QuoteRevEnd" date,
"QuoteRevNumber" tinyint
not null,
"QuoteRevCurrent" bit
not null
)
create table QuoteDetails (
"QuoteDetailsID" uniqueidentifier default newid()
not null primary key,
"QuoteNo" uniqueidentifier
not null foreign key references Quotes(QuoteID),
"ItemNo" smallint
not null,
"ProductQty" smallint
not null,
)
This is based on Type 6 Slowly Changing Dimensions database design. All of this is done with standard Lightswitch controls.