avoiding orphans in model that allows pending consolidation

  • I am designing a database for a web app which needs to store user profiles.

    However I need to be able to consolidate these profiles when they meet criteria to define as the same actual user.

    So, in the profile table I might have a user row for a facebook user, a twitter user and a email user.

    Only later do I realize, when they update a profile with an email address, that all three profiles belong to the same user.

    So I need to associate them at a higher level level but this higher level might not exist so I effectively have orphans until consolidation... This seems very ugly and makes queries tricky.

    Is there a better way to do this?

    Thanks for all help,

    Jules

    www.sql-library.com[/url]

  • Sample of schema you have? Some data for representing a query which you don't like? What you would like instead?

    Please click on the link at the bottom of my signature...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • decided to go with sparse vertical partitions.

    updating pk/fk column of left tables to point to correct user stub table pk.

    thanks anyway

    www.sql-library.com[/url]

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply