Am I the only one who requests more than one database?

After repeatedly reading rubies on rails and several connections to the database, it seems that I have found that not many people, at least not with ror. I’m used to querying many different databases and schemas and retrieving information for both the report and one seamless page. Thus, the user does not need to log in to several different systems. I can create a page that has all the systems on one or two web pages.

Is this not a common occurrence in website and database design?

EDIT: Is this because most of my source code is in classic asp?

+4
source share
8 answers

I really honestly believe that most ORM designers don't seem to think that users might want to access more than one database. This seems like a pretty common limitation in the ORM universe.

+2
source

Our client site works through 3 databases, so I do it. In fact, I bring everything into the point of view of one central database, which then connects to the others.

I have never considered this a “normal” behavior. I assume that most of the time you will develop for one system and work against it.

EDIT: Just for development, we use Linq for SQL for our data layer, and we define objects in relation to the database views. Thus, we save reports and application code working with the same data model. There is some additional work on setting up Linq objects, because you need to manually define primary keys and set up associations ... however, so far this has definitely proven to be worthwhile. We tried to do this using the Entity Framework, but I had problems setting up relationships, and I had to give up. The funny thing is that I thought that the Entity Framework should have been designed for more complex scenarios like ours ...

+2
source

Often hit several databases during one part of the application workflow. However, in each case that I did this, this was accomplished with a few web service calls that, among other things, wrap the corresponding databases.

I, in my opinion, never had to hit several databases at once and combine the results into one report.

+1
source

I have seen such an architecture in corporate portals where a lot of data is pulled through different data sources. The whole purpose of the portal is to combine silo systems - users may not want to use many systems in isolation (especially if they must be signed in each). This is normal in this scenario, especially if it is a large company that has expanded rapidly and has a large number of heterogeneous systems.

In your case, whether to do this correctly depends on why you have these separate databases.

+1
source

Pulling data from two databases and compiling the report is not unusual, but because cross-database queries cannot be optimized by the query mechanism of any database, OLTP usually use a single database to keep the application running.

0
source

With ORM, this can be a little tricky. However, this can be done. Drag objects from various databases as needed, and then use them as composite to create a new object that is truly desirable. If you can skip part of the ORM process, you can directly query the databases and directly create your object.

0
source

If you are building a system from scratch, it is not recommended to do so. If you are working with a system that you did not design, there is no choice, and this is not uncommon (the difference between "organic" and "planned" is growing).

0
source

Apart from master and various test instances, I regularly ended up in nine databases. Yes, I inherited it, and yes, the "Classic" ASP is prominent. Of course, all the "brilliant" designers of this mess are long gone. We are replacing it with things more reasonable, as safe as possible.

I would think that if you are building a new system and continue to add databases and get to two or three databases, it might be time to review your design. OTOH, if you collect data from several disparate systems, then no, this is not so strange. Depending on the time you need and your budget for throwing hardware at the problem, and if your data is mostly static, this will be a good scenario for a “report server” that periodically transfers data from the Live server.

0
source

All Articles