?
Solved

Sharing A Database

Posted on 2015-01-26
6
Medium Priority
?
49 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 143

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 84

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 35

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
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
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 35

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 111

Accepted Solution

by:
Ray Paseur earned 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

764 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