Closest equivalent to SQLAlchemy for Java/Scala [closed]

One of the notable things about SQLAlchemy is that it makes tables first class objects. Thus the core API is really written around table objects, and the API therefore is essentially relational in nature. Thus at this level even if the API is OO, it is essentially reflecting RDBMS objects or functions such as Tables, … Read more

Will multiple calls to `now()` in a single PostgreSQL query always give the same result?

The documentation says about now(): now() is a traditional PostgreSQL equivalent to transaction_timestamp() And about transaction_timestamp(): These SQL-standard functions all return values based on the start time of the current transaction So within one SQL statement, now() will always return the same value.

Can one make a relational database using MongoDB?

The idea behind MongoDB is to eliminate (or at least minimize) relational data. Have you considered just embedding the attendance data directly into each student record? This is actually the preferred design pattern for MongoDB and can result in much better performance and scalability. If you truly need highly relational and normalized data, you might … Read more

Decomposing a relation into BCNF

Although the question is old, the other questions/answers don’t seem to provide a very clear step-by-step general answer on determining and decomposing relations to BCNF. 1. Determine BCNF: For relation R to be in BCNF, all the functional dependencies (FDs) that hold in R need to satisfy property that the determinants X are all superkeys … Read more

Postgresql delete multiple rows from multiple tables

Arranging proper cascading deletes is wise and is usually the correct solution to this. For certain special cases, there is another solution to this that can be relevant. If you need to perform multiple deletes based on a common set of data you can use Common Table Expressions (CTE). It’s hard to come up with … Read more

Why are relational databases having scalability issues?

Imagine two different kinds of crossroads. One has traffic lights or police officers regulating traffic, motion on the crossroad is at limited speed, and there’s a watchdog registering precisely what car drove on the crossroad at what time precisely, and what direction it went. The other has none of that and everyone who arrives at … Read more