SQL Server Performance

which is better

Discussion in 'General Developer Questions' started by mariechristine, May 4, 2004.

  1. mariechristine New Member

    I have several entities for example: Order, Item, OrderITem, Country....
    Each item can have many file path associated to it.
    so which is better??
    1-> For each entity, a table containing the file path and the entity it. Ex: FileID, OrderID, FilePath

    2- or 1 table for all the entities in this way: FileID, FilePAth, EntityType (int: ex 1=Order, 2=Item..), RecordID

    Later on I need to select the file paths for a certain entity. Which approach is better?
  2. Luis Martin Moderator

    On the fly, I think 2.

    Luis Martin

  3. tdong New Member

    If they are of the same type (common columns and same datatype) put them together.

    2 It is. it is in 1stNF if I remember it correctly hehehe. I miss school

    May the best cheaters win

Share This Page