Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
drsloat
Starting Member
45 Posts |
Posted - 2005-01-13 : 14:33:27
|
| I'm designing a simple content management app for a web site. 1. Live content is displayed dynamically on web site2. Live content can be edited (only 1 edited copy at a time), but the live copy must stay live until the edited version goes through a simple workflow (dev -> ready to launch -> live)I have a main content table, but am not sure of the best way to implement the edited version and the workflow. One idea is to have a ContentType column that basically indicates "Live","Dev","Ready to launch" and store multiple rows. I'm pretty sure all of the fields in this table are editable.The other idea is to have a completely separate DevContent table with a foreign key to the Content table. It seems like the reason to do this would be if the dev copy shared some attributes with the live copy, but could not edit those attributes.Does it seem like I'm on the right track? Any suggestions? |
|
|
clarkbaker1964
Constraint Violating Yak Guru
428 Posts |
Posted - 2005-01-13 : 17:38:59
|
You could use an integer datatype to represent Dev, Ready to Launch, Live as 1, 2, 3 Then store the descriptions in another table so that the descriptions can be modified later without having to rework the code.It can also make some things easier to program and query because you are evaluating a numerical value rather that text. It could prove useful for option buttons as well as order by clauses in queries.From a normalization viewpoint I like to have list type tables so that the definitions of the values are known and descriptions about the use of the status can be retained somewhere in the database.You could then write forms arround the maintenance of this table and its values. |
 |
|
|
drsloat
Starting Member
45 Posts |
Posted - 2005-01-13 : 18:20:05
|
| Good point on the workflow attribute with descriptions in a domain table (i think that's what you call it). My PK at this point would be a content id and a workflow status (Dev, Live, etc). I'd like to enforce that you can't have a Dev and a ready to launch at the same time though. I may just enforce that with the application though. |
 |
|
|
|
|
|