Hi,
I have the typical problem of needing to store historical data from a normalized database the problem is I have would be dimensions referencing other dimensions. The worst case is
Table:Deficiency
sk: surrogateKey for different versions of the same record
pk: ID
fk: BuildingSKID
...
bborissov, that is a much nicer way of writing the idea of comparing all columns... but it still means we have to compare all columns...might be what I have to do though
pwise, thanks for the ideas for UPDATE and UPDATED(), but I believe both of those operate on either the table as a whole or...
That is what I am doing...but the issue is that inserted contains records even if no data has changed.
MyTable
pk Name
1 'sameasbefore'
Now in sql server query window
UPDATE myTable SET [Name]='sameasbefore' WHERE pk=1
Now in my trigger if I check the inserted table I find that it...
Hi,
I am using an Instead Of trigger for a table and I need a way to determine if a row has been updated. The problem is, if I do something like
UPDATE myTable SET [Name]='sameasbefore'
Then in the trigger, inserted and deleted both contain records for all the rows in my table even if the...
Ok, so I came up with a way to do it without using dynamic sql but then I started thinking about the use of this implementation. What I am really going to want is to not just compare changes, but compare one version of the row with a previous version (and possible set the previous as the new...
After thinking about this some more, I can do method (b) by not using dynamic SQL and by not having to copy inserted/deleted into temp tables. I would just make a special case of the trigger for each table I am auditing (just hard code the columns rather then get them from the information...
Hi,
I've created a change log for when data in a table changes (I'm actually using it for a wiki type app). I have two ways of doing this
a) copy all the new data and all the old data into the change log table
b) copy only the changes
The advantage of (a) is that it doesn't compare anything...
I found Head First Design Patterns to be a really good book as well. It uses these examples that are really basic and has tons of stupid tricks/jokes to make the book fun to read and help you remember when to use stuff. There is also a Head First OO Design book which I would not recommend...
ok, I think that answers my question. And then your public IEnumerable<ProductDto> SearchStoreForProducts(...) would be contained in some other class somewhere (but not within store). Thanks for the detailed response (again:)
Also, DonQuichote, I totally missed your post when I last checked...
sorry that I am not fully getting this but I think I am having trouble asking my question. I can't phrase it right.
In the case above, would you have your function that handles the criteria within a method in store? ie Store.Search(searchstring)
and then Search would contain the criteria...
I'm using nhibernate as my OR mapper and I used MyGeneration to come up with my initial mappings. It created collections in my objects for the different relationships and I must say, I find them pretty useful. NHibernate handles all the lazy loading for me so I don't have to worry about it too...
What are typical project/namespace organization for a DB project (including accepted names...maybe people don't name things accessors)? I have been doing something like
*[project].Core.Entities - contains entity objects. Should this be called Domain or DomainObjects...
Consider this example. Suppose that I have a Store object and a Product object. The properties in each class are
Store
-String Name
-String Location
-IList<Product> Products
Product
-Name
-ProductNumber
Now I am using some OR mapper to populate these objects. My current method of relating...
Ok, just in case anyone else has been wondering about 2 (controllers) as well for ASP.NET MVC, this article talks about REST design for ASP.NET MVC webapps
http://blog.wekeroad.com/2007/12/06/aspnet-mvc-using-restful-architecture/
Basically, it helped me better divide up my controllers so that...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.