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.

Integrating multiple Databases Vs. Single Database

Discussion in 'Databases' started by kayhere, Feb 2, 2007.

  1. #1
    Hi Friends,

    I'm developing a website where i use atleast 6 different applications (scripts). They all uses MY_SQL database. My question is what is the best choice out of these two following options........ :confused:

    1. create 6 different Databases and then try to integrate them. ( i want a single user login and not 6 logins for 6 applications :) )

    2. A single database with all the tables of 6 applications. i guess i don't have to integrate and it would support a single login

    Are there any databse gurus out there who could give me the correct solution? pls help. i'm struck at the beginning :eek:

    Extecting your ideas and Thanks in advance. :)

    Cheers
    -Kay
     
    kayhere, Feb 2, 2007 IP
  2. Colbyt

    Colbyt Notable Member

    Messages:
    3,224
    Likes Received:
    185
    Best Answers:
    0
    Trophy Points:
    210
    #2
    No one has ever called me a DB guru so take all this as an opinion.

    If you are building this from scratch one database would be my choice. The user id, name and password would be common. For the other application you can always prefix the the table to eliminate the potential for duplicate fields.
    abc_item would be completely different from xyz_item.

    Each application could read the common fields for name and password. With the proper scripting once logged in they should be logged in for the entire session no matter which application they are trying to use.
     
    Colbyt, Feb 2, 2007 IP
  3. kayhere

    kayhere Active Member

    Messages:
    184
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #3
    Wow that was so fast :)

    Thankyou Colbyt,

    but, wouldn't it be a problem once the database grows. Will i face any problem in loading time? since i'm gonna use My-sql how big the database size can be for optimized results :)

    Cheers
    -Kay
     
    kayhere, Feb 2, 2007 IP
  4. RaginBajin

    RaginBajin Peon

    Messages:
    87
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You can have one login that can access all your databases. It's good to keep databases different if you you are just reading data sometimes and they have other functions. If they are all part of the same application and are used no where else, then I would say consolidate them.

    But, if you don't want to do that, you can access database tables from different databases pretty easily.

    Example:

    `select name, employee_id from db1.name, db2.employee where db1.name.id = db2.employee.employee_id`
     
    RaginBajin, Feb 2, 2007 IP