Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

New answers tagged

2

I assume that H2 will get a SHARE lock when querying the database, and needs a WRITE lock to add new rows the table, which it cannot do whilst there is a SHARE lock on a table. That is only true if you're using the older PageStore engine. If you are using anything more recent than H2 version 1.4 then MVStore is the default engine. That allows concurrent ...


2

It's very unlikely that you could restrict the access to a single table in a real application, so you would have to specify all the required tables and maintain that list. It's a somewhat normal approach to limit things to the database user on the larger scale, such as using different roles for reporting, normal users, admins etc. depending on which layers ...


0

I don't think you need any databases or anything fancy like cloud computing. Computers are fast, and you can wait a little bit for it to process. Do you really want to know count of every single combination of words at once or do you want to query just some of them? Here is the solution for knowing all of them: You can make a map of (word1, word2) --> (...


2

Basically yes: We are aware of no other embedded SQL database engine that supports as much concurrency as SQLite. SQLite allows multiple processes to have the database file open at once, and for multiple processes to read the database at once. When any process wants to write, it must lock the entire database file for the duration of its update. (source) ...


0

(Important Preliminary Consideration) Before attempting to answer the questions you asked, I would highly encourage you to consider renting a high-memory machine for the ML modeling tasks if you're already in the cloud and talking about batch jobs. A 500GB RAM box can be had for $5/hr these days, and it'll be worth every penny (if you have little enough data ...


0

You asked: When to use many notation? The ERD should reflect the design and the business requirement you decided to implement as RDBMS rules. As an example from the ERD you have provided, A Shipment Includes MANY line_items. Since both sides are mandatory, this means that: 1-In physical design, there would be FK of Shipment ID in the Item table. 2-...


1

You need to only mock the database connection underneath your functions. If you are using dependency injection (or even a service locator) you should be able to swap the database connection out for a mocked one quite easily.


1

Why would you wish to create such a degree of abstraction? The very reason that different storage technologies exist, is because each have a matrix of advantages and disadvantages that cannot be made general - not even by the best minds of the industry and the economic resources of massive corporations. If any storage technology would seem to be ...


4

The best way to guarantee that you stay reasonably decoupled from the database, but at the same time remain free to use any feature of it, is to not create an abstraction layer for the database. (Well, unless you have the explicit requirement now, that you need to support multiple databases. Otherwise YAGNI.) The worst thing one can do, is to try to stay "...


3

In many cases, the answer is to change your design so that you can pass the capabilities you need as arguments to a new function, and then test the new function with "test doubles" replacing the things that are hard. async function ValidateUserExists(username, email){ return ValidateUserExistsV2(username, email, UsernameExists, ValidateUserExists); } ...


0

I think your model could be better. As it is it allows a section to be related to many node_sections rather than to maximum of 2. You could either: write a digit 2 on the diagram to show that there is a maximum cardinality at that end of the relationship; or drop node_section and have two 1:m relationships directly between node and section. If your pipe ...


Top 50 recent answers are included