in reply to (OT) Couple of Data Model Design Considerations

another point: if there will be many searches on the database and you're worried about performance (normalization can lead to worse performance) please consider using a search engine.

update: so what about the suggestion to use a search engine is so bad that i get 2 downvotes and no reasons told?

update2: in case anybody else got this wrong - normalization *can* lead to worse performance for *searches* and i'm not saying don't normalize.

update 3: "if there will be many searches" doesn't mean that this will influence the speed. it means if there are many searches then it is worthwhile to use a search engine. if you have 3 or 4 damn slow searches a day is not relevant.

rephrased (i thought it was clear what i meant, but apparently this wasn't the case): if you have a database that needs to be normalized but you have many search queries on it that are actually faster than they would be with a normalized data structure then don't hesitate to normalize but use a search engine for the searches.

  • Comment on Re: (OT) Couple of Data Model Design Considerations

Replies are listed 'Best First'.
Re^2: (OT) Couple of Data Model Design Considerations
by herveus (Prior) on Aug 14, 2007 at 15:51 UTC
    Howdy!

    This is bad advice, taken on its own.

    Denormalization is a species of optimization.

    Don't blithely do or recommend denormalization without specific data supporting the actual, documentable performance issue. If you don't know the actual issue, you might well simply make things worse.

    yours,
    Michael
      This is bad advice, taken on its own.

      Denormalization is a species of optimization.
      who recommended denormalization?
      i said, *if* you tend to not normalize because of performance issues, use a search engine instead.
        Howdy!

        "normalization can lead to worse performance" is a useless statement. Normalization can also lead to better performance. It *does* lead to more robust data models that more clearly communicate their design.

        Deciding not to normalize amounts to denormalization.

        Making that decision for "performance" implies that the normalized form has performance issues. Without normalizing and testing, you cannot properly assess the differences. You end up making assumptions about where to optimize, and those assumptions tend to be dead wrong too much of the time.

        Further, what do you mean when you say "consider using a search engine"? The data being described seems to be live data that will be updated transactionally. That need points toward more fully normalized forms, but it is not clear how the balance between update activity and query activity lies. A "search engine" is no help for modifying the data, and may be counterproductive if you have to frequently query rapidly changing data.

        yours,
        Michael
          A reply falls below the community's threshold of quality. You may see it by logging in.