Page 1 of 3 123 LastLast
Results 1 to 15 of 32
  1. #1
    Join Date
    Dec 2008
    Posts
    3

    Question Unanswered: Database Design Question

    Hi
    I'm designing a club database schema (ER model) with my tradional techniques of identifying concrete Entities and relationships. However, its been suggest i should make the model more generic so that it can be reused for other similar markets. For example, a student becomes a member, a room becomes an asset. What are the cons of this approach? Additionally, its been suggested much of the specifics can be stored as xml datatypes and therefore many of the market specific tables would "disappear" into xml. What are your thoughts here?
    I suppose the underlying question is should we stick with my tradional approach, take a full-blown generic approach or some kind of half-way house?
    Comments and suggstions welcome.

    Rgs

  2. #2
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    My thoughts are that one of the primary purposes of a database is to enforce relational integrity and business rules. In a sense, to PREVENT users from entering unstructured data.
    So be aware that the more generic you make a database, the less effective, useful, and manageable it may become. Particularly if you head down the XML path.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  3. #3
    Join Date
    Dec 2008
    Posts
    3
    I understand what you are saying.
    However, if you were building a new product would you specialise the ER model to the extreme that it could only be used for that particular market or generalise it so that it could be reused for similar markets?

  4. #4
    Join Date
    Dec 2007
    Location
    London, UK
    Posts
    741
    I would design it to match the customer's specific needs. That way the customer gets the maximum use and value from the data model as Blindman already suggested. Most customers don't expect to pay for something designed for other people unless they are a software or services vendor or have some other IP potential in mind.

  5. #5
    Join Date
    Dec 2008
    Posts
    3
    Thanks for the responses so far...
    Let me elaborate a little more.
    We are a small software house building a new web app for a client. The application is for a niche market. However, we are looking to build the application and database (or at least the core) such that it can be reused and service other customers and other similar markets.
    So, back to the original question. Should we have one specific database schema per market niche or one that services all niches in a sector?
    Next, where should xml datatypes be used and were not?

  6. #6
    Join Date
    Dec 2007
    Location
    London, UK
    Posts
    741
    This isn't primarily a technical question. I think it must be determined by your business strategy and market research. There is a business concept called Value Discipline, which defines three broad types of product strategy: Operational Excellence, Customer Intimacy or Product Leadership.

    A product that is very generic and therefore (hopefully) low cost would fall into the Operational Excellence category. A product that is highly customised to meet different customers needs belongs to the Customer Intimacy category.

    Presumably you'll want to do whatever gets the most profitable outcome from your potential market, but you are in a better position to know that than I am.

  7. #7
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    The decision you need to make is more of an Art than a Science. Just be sure you understand the scope of the requirements, and make sure you are on the same page as your company.
    You need to decide NOW what product you are going to create and what market you are going to server. Not later.
    As to the XML, use it as sparingly as possible. I know it is practically irresistible to enable clients to "customize" off the shelf software, so if this is absolutley necessary then XML is a good choice for this limited feature.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  8. #8
    Join Date
    Jun 2004
    Location
    Long Island
    Posts
    696
    If you want it really generic, go with an EAV model.

  9. #9
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by PMASchmed
    If you want it really generic, go with an EAV model.
    you forgot to mention the extra coffee, tylenol, and zoloft that he's gonna need with EAV

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  10. #10
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    No no, Rudy.
    Clearly you do not fully understand the EAV model.
    The coffee, tylenol, and zoloft are only required by the next DBA, after the original database designer leaves the company two weeks before the project is completed.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  11. #11
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    My question is why accept the limitations of EAV when you can use XML, or go for the full freedom of text files? If you are going to go for it, there is no reason to only go half way!

    -PatP

  12. #12
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    text files FTW!!!
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  13. #13
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Ha.
    Yesterday a guy on my latest project who is kind of a junior DBA suggested in a meeting that we store millions of archive records for reporting in multiple CSV files.
    I explained to him later that was kind of like Robin suggesting to Batman that it might be better to take the bus today.
    Then, this wise-ass know-it-all in my office (don't you hate people like me that? I do....) informed that there actually was an episode where the dynamic duo took a public bus.
    So I had to hit him. Pow! Bam!
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  14. #14
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    True, but it was Batman that told Robin that they needed to take the bus.

    -PatP

  15. #15
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Wise-ass know-it-all. I hate you.
    Wham!!!
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •