Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    May 2014
    Posts
    3
    Thanks
    3
    Thanked 0 Times in 0 Posts

    How to build best database as possible?

    Question about database.

    How I can build best/ fastest database as possible for browser game?

    Is there any "rules" or important steps which I should know?

    I made some searches from google and found: Database Normalization

    Ill keep reading from other sources where I can find info, but if someone could share

    his/ her knowledge, I would love that.

  • #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,642
    Thanks
    0
    Thanked 649 Times in 639 Posts
    A fully normalised database is fastest for inserting and updating data in the database as all of the information is stored the minimum number of times needed to identify all of the relationships.

    That should alweays be your starting point with the database design.

    Where this does not produce fast enough processing times the next thing to look at is indexes. Often adding or removing indexes on one or more tables will influence how quickly the relevant data can be accessed.

    Only where the fully normalised database with optimised indexes is still too slow should you then look at undoing some of the normalisations where the data is read far more frequently than it is written. Note that each time you undo a normalisation you create a situation where the same data is stored more than once and open up the possibility that the two places will not have the same value stored in them leading to inconsistencies so you should only ever do this for data that is relatively static but which is frequently read.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • Users who have thanked felgall for this post:

    Justanothernoob (06-10-2014)


  •  

    Posting Permissions

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