When planning database design should I ceate more when I will use in the beginning?

FunGuy

Free Member
Apr 26, 2010
51
0
Hi,

When at start designing a database, should I just create of what I need now or should I create more when I need now (this is possible because I know where I want to be in 5 years time). But I see a bug in this strategy - if company's strategy will change I will have a messy database or it will be easy to amend whenever I will want (in 2-5-8 years time)?
 

lynxus

Free Member
  • Business Listing
    Jul 5, 2011
    1,343
    316
    Gloucester, UK
    imsupporting.com
    When you say "create" do you mean the data in it or just the structure?

    Changing the structure is easy later down the line by using the alter table command.( mysql )

    Or if you like, Use something like "PHPmyAdmin" and use that to design and manage the database ( Make sure you secure it properly though... )

    Short answer : Create what you need now and in the short term.
    Long answer: Create what you need now and do whatever you want with it later, may be slightly more complex . But you can change the structure at any time. ( with some effort )
     
    Upvote 0
    Hi,

    When at start designing a database, should I just create of what I need now or should I create more when I need now (this is possible because I know where I want to be in 5 years time). But I see a bug in this strategy - if company's strategy will change I will have a messy database or it will be easy to amend whenever I will want (in 2-5-8 years time)?

    Be mindful of the concept known as YAGNI ("You Ain't Gonna Need It"). In a nutshell, you might be better off only doing what you need now, and leaving future expansion for "when we cross that bridge".

    (See also: http://c2.com/xp/YouArentGonnaNeedIt.html )

    Creating a database system is a very educational experience. Perhaps you should create a "version 1.0" with the intention of scrapping it after a few years and replacing it with a newer system. (aka http://c2.com/cgi/wiki?PlanToThrowOneAway )



    James
     
    Last edited by a moderator:
    Upvote 0

    pogodan

    Free Member
    Jul 10, 2011
    1
    0
    FunGuy - it generally makes more sense to think in terms of "what does my product need to do now?", conceptualize what software parts you need to make that product(e.g. what classes/objects, in an object-oriented language), and then finally map those objects into the database to store your software's data. I'd recommend using an ORM to help do this and abstract away the details of the database
     
    Upvote 0

    Latest Articles