Solved

Sharing A Database

Posted on 2015-01-26
6
42 Views
Last Modified: 2015-02-11
Is it possible and OK for two websites to share a database?  If I have two websites on two different hosting servers and services, is it ok for one Website to share/look at a database used by another website?

Website Number One would be implementing, editing, adding data and interacting with the Database.
Website Number Two would be looking at the info on the database, not interacting or editing.

This seems ok but am I missing something?  Are there best practices to consider?  Security issues?

Thanks in advance!
0
Comment
Question by:rgranlund
6 Comments
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 40570853
yes, that is perfectly possible. usually you should have 1 central place (webservices for example is a good way) to access the db from "anywhere", and the web sites using those webservices exclusively to make sure that the data is read/updated the same way indeed from any application
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 40571033
Some hosting services like Godaddy will not allow you connect to a database server on another outside hosting/server.  Test it before you commit to it.

And some don't allow external access to the database servers.  At all.
0
 
LVL 34

Expert Comment

by:gr8gonzo
ID: 40571148
Just general thoughts:

1. In terms of security, every additional access point to the database can be considered a security issue. That's not a bad thing - just something you have to keep in mind when you design solutions. It's like adding another door onto a house - you have to just make sure all your doors are locked in order to be secure - you can't just lock the front door and leave the others unlocked and expect to be secure.

2. It's good that you can identify that Website #2 will ONLY be reading from the database. That means you can create different credentials that ONLY have reading (SELECT) privileges, and in case that website is compromised, it won't be AS bad as if you lost full admin credentials. It's still bad, though, and information can be as good as gold in terms of gaining additional access, so it's still a priority to make both sites as secure as possible.

3. The database engine you use will make a big difference in how you do things. For example, if you have a lot of visitors on website #2 and expect to be doing a lot of updating/writing to the database on website #1, then you might want to consider using the InnoDB engine in MySQL. A lot of people use the default MyISAM engine, but when you make updates to a table in MyISAM, it locks the entire table, which can impact people who are trying to access the data in that table. Of course, if you don't update the tables often, or if you don't have a lot of traffic, it's not a big deal. If you're a MySQL novice, then you can USUALLY consider InnoDB tables to basically act like MyISAM tables, but with a few advantages.
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 7

Author Comment

by:rgranlund
ID: 40571153
Well I guess my question is this;
How do I display information from an outside DB on my website?
0
 
LVL 34

Expert Comment

by:gr8gonzo
ID: 40571198
What do you mean "outside DB" - are you talking about the central DB you're referring to in your original post?
0
 
LVL 108

Accepted Solution

by:
Ray Paseur earned 500 total points
ID: 40571626
Ask your hosting company how to connect to the databases.  This will do two important things.  First, it will probably get you an answer complete with an example, and second, it will verify that the host intends to be able to support this sort of thing.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
null value 15 69
Not needed 13 57
Error installing extension Linux 4 34
SQL BACKUP - 2008 R2 8 17
This article discusses four methods for overlaying images in a container on a web page
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to count occurrences of each item in an array.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now