Forum Replies Created

Viewing 15 posts - 76 through 90 (of 283 total)

  • RE: Many-to-Many relationships with foreign key constraints?

    Shaun McGuile (7/25/2008)


    Tom that would work,but...

    Data Warehouse model = denormalized data for speed.

    Your solution is normalized.

    So denormalize it... in the warehouse.

    In production use, it is normalized and thus versioning presents...

  • RE: How to create primary key for this table?

    MAIL_INTERESTS is just an intersection table to implement a many-to-many relationship between MAIL and INTERESTS tables. The combination of the two fields is a key. It generally makes no sense...

  • RE: Many-to-Many relationships with foreign key constraints?

    Shaun McGuile (7/18/2008)


    Have you seen this?

    http://en.wikipedia.org/wiki/Slowly_changing_dimension%5B/quote%5D

    Hmm, if this is the current state of the art, maybe I'm onto something. I have implemented versioning as just another normalization step...

  • RE: Many-to-Many relationships with foreign key constraints?

    It looks like what you are trying to do is versioning. That is, keep old values intact for historical or audit purposes as you make modification to the data. This...

  • RE: Newbie need help on handle single quotes in store proc???

    xsaycocie (7/14/2008)


    ALTER PROCEDURE dbo.Proc (@PARAM4 nvarchar )

    There are two things wrong here. First, the procedure's name is "proc" which is not going to be allowed. However, I assume that...

  • RE: How to get order by column containg value

    One trick I have used before is to create an integer column called OrderBy. I then populate it with values that will give me the desired order from the query....

  • RE: using 'Computed Column Specification '

    The only problem with using DateDiff like that is that if the date being examined is 2007-12-31 and "today" is 2008-01-01, the age will be one. That may not be...

  • RE: Composite FK

    mailsar (7/14/2008)


    Can a foreign key be a composite key even if the primary key of the table it references is not a composite key. For eg. If Part# is a...

  • RE: PL/SQL

    Kimberly.Hahn (7/15/2008)


    The values for the rowcnt in sysindexes is not always accurate...

    Yes, that's true. If you'll look in the comments of the function I submitted on the previous page, you'll...

  • RE: Am I stupid? Version History

    If you just want the one row of one entity that was in effect as of the date/time specified, the query is quite simple:

    select top 1 *

    from table

    where Key-field =...

  • RE: PL/SQL

    Could be homework I suppose, but strange it is not. It can take a couple of minutes for "Count(*)" to return a result for a Very Large Table, say 10...

  • RE: PL/SQL

    Here's a function I wrote partially based on something posted, iirc, here.

    /*

    Author: Tomm Carr

    Date: 2008-02-22

    This function will return the number of rows in a table, the same result

    as...

  • RE: is storing a comma-separated list symptomatic of a bad design?

    Yes, you do want to get the db in 3nf as much as possible. Taking it to higher levels are not necessary except in extremely specialized circumstances (which, in over...

  • RE: Time Calculation

    This works wonders for me:

    alter table dbo.CallCost

    add Seconds as DateDiff( ss, 0, '1900-01-01 ' + Duration );

    Now you have a computed column which very quickly, and behind the scenes, converts...

  • RE: doubts in Indexing

    GilaMonster (7/3/2008)


    ... It should be useful, depends on the queries though.

    Absolutely. Next time provide the actual query you are trying to optimize. Depending on what you want to read from...

Viewing 15 posts - 76 through 90 (of 283 total)