1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Creating multiuser database

Discussion in 'MySQL' started by Kuna, Mar 13, 2013.

  1. #1
    Hello. For the first time I will try to make multiuser website. But since it is my first time I would need some advises.
    The most important is how to structure database so it is simple and efficient.

    What I'm trying to do:
    Allow users to enter their data
    Allow them to enter a lot of data (every single pigeon they have and info about it, sometimes one user could own 100 or more pigeons and they want to enter info about them. so if I have 1000users*100info=100 000 records)

    This is just piece of what I need. Let's assume that I will have a lot of records in my database from different users.

    I'm afraid that if I don't structure my database well it would be slow and exhausting for severs.
    Please give me some advises.
     
    Kuna, Mar 13, 2013 IP
  2. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #2
    Learn how to design a database.

    Without all the information about all the data you need to store, and all the relationships between all the data elements, no one can give you advice on how to design the database.

    BTW, 100,000 records isn't much - it's a pretty small database.
     
    Rukbat, Mar 15, 2013 IP
  3. gandalf117

    gandalf117 Active Member

    Messages:
    111
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #3
    "multiuser website"? do you mean a website where users will be able to log in and have their own page, etc. ?

    That's really not a big deal. This type of database is like any other database and as far as I know you don't need to do anything special to make it simple and efficient.

    Here is my advice:
    - Don't be afraid. It's just another database.
    - If you are going to have multiple users on your website then you will probably need a users table to identify them. Such a table will include user's Unique Ids, Emails, Passwords, etc.
    - You may have many users but you will still need only one table for pigeons. That table may contain pigeons Name, Color, Description, etc. How will you know which pigeon belongs to which user? Simply include a column UserId in the pigeons table. That will hold the Id of the user to which the pigeon belongs. The pigeons table will be at one to many relationship with the users table, because a single user can have many pigeons.

    So from what you are telling us it seems all you will need is two tables with a couple of columns each. Pretty simple and efficient a?
     
    gandalf117, Mar 25, 2013 IP