Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by noodle22

  1. noodle22

    Do I have to denormalize?

    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 ...
  2. noodle22

    Way to check if row is updated in a trigger?

    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...
  3. noodle22

    Way to check if row is updated in a trigger?

    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...
  4. noodle22

    Way to check if row is updated in a trigger?

    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...
  5. noodle22

    Have a change log for tables but need to know about performance hits

    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...
  6. noodle22

    Have a change log for tables but need to know about performance hits

    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...
  7. noodle22

    Have a change log for tables but need to know about performance hits

    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...
  8. noodle22

    OOP Best Practices

    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...
  9. noodle22

    Should data objects and database accessors exist in the same class?

    awesome. ok, that makes sense to me. I think I have to work on my naming conventions a bit next time I refactor :)
  10. noodle22

    Should data objects and database accessors exist in the same class?

    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...
  11. noodle22

    Should data objects and database accessors exist in the same class?

    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...
  12. noodle22

    Should data objects and database accessors exist in the same class?

    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...
  13. noodle22

    Namespace organization and naming conventions

    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...
  14. noodle22

    Should data objects and database accessors exist in the same class?

    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...
  15. noodle22

    help with some ASP.NET MVC best practices

    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...

Part and Inventory Search

Back
Top