SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot
    Join Date
    Jan 2006
    Location
    Washington DC and Skopelos, Greece
    Posts
    71
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Multi User Databases

    I have built a mySQL database application that I'd like to give to two people.

    I want them to use the same code but have their own data.

    I would prefer to host the app and only let them access (and maintain their data).

    I'm not sure where to start.

    Do I need to have duplicate systems (tables, queries, webpages), or is there a better way?

    Is this even feasible?

    Can someone point me in a direction to study how (best) to do this..

    Many thanks

    David
    The only way I can repay your help, is to help others.

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,273
    Mentioned
    60 Post(s)
    Tagged
    3 Thread(s)
    one set of tables, with a userid column in each table to distinguish the rows for each user
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    SitePoint Zealot
    Join Date
    Jan 2006
    Location
    Washington DC and Skopelos, Greece
    Posts
    71
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Rudy!!

    That brings up a slew of follow up questions...

    What if it grows.. What if I have thousands of users? hundreds of thousands?

    (I know, hire someone who knows what they are doing - and study meanwhile).

    But, are there security issues with your approach? I guess I can try it with friends and see.

    Wont I have to query every use of every table? I guess I have to have users log in every time they use the system?

    Thanks for helping.... I off to add UID fields.
    The only way I can repay your help, is to help others.

  4. #4
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,273
    Mentioned
    60 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by ddelmonte View Post
    What if it grows.. What if I have thousands of users? hundreds of thousands?
    you'd better have the proper indexes on your tables then

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"


Tags for this Thread

Bookmarks

Posting Permissions

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