-
MY PROJECTS
-
Recent Posts
- SQL.How can you compare two nullable values safely, and how does IS DISTINCT FROM differ from <>?
- SQL.How are NULL values ordered by ORDER BY, how do defaults differ between databases, and how can you control their placement?
- SQL.How does NULL propagate through arithmetic expressions, and how can COALESCE and NULLIF help handle missing values and division by zero?
- SQL.How does NULL affect join conditions, and why can filtering the right-hand table in WHERE remove unmatched rows from a LEFT JOIN?
- SQL.How do GROUP BY and DISTINCT treat NULL values, even though NULL = NULL evaluates to UNKNOWN?
- SQL.How do aggregate functions handle NULL, and what is the difference between COUNT(*), COUNT(column), and COUNT(DISTINCT column)?
- SQL.How does NULL affect IN and NOT IN, and why can NOT EXISTS be a safer choice when a subquery returns nullable values?
- SQL.How do WHERE, HAVING, and CHECK constraints treat conditions that evaluate to UNKNOWN?
- SQL.Why do column = NULL and column <> NULL not work as expected, and when should you use IS NULL and IS NOT NULL?
- SQL.What is SQL’s three-valued logic (TRUE, FALSE, UNKNOWN), and how do AND, OR, and NOT behave with UNKNOWN?
- ChromeDevTools.Watch all failed requests
- SQL.What are domain types (or constraints on data types), and how do they help enforce data correctness?
- SQL.How does SQL handle comparisons between different data types (for example, string vs number), and why is this dangerous?
- SQL.What is the difference between DATE, TIME, TIMESTAMP, and TIMESTAMPTZ, and which one should be used for business events?
- SQL.How do numeric types like INTEGER, BIGINT, DECIMAL, and FLOAT differ in terms of precision and use cases?
- SQL.What problems can arise from implicit type casting in SQL, and how can it affect indexes?
- SQL.How does NULL differ from 0, an empty string, or FALSE in SQL?
- SQL.What is the difference between CHAR, VARCHAR, and TEXT, and when would you choose each?
- SQL.What is MVCC ?
- SQL.What is AutoVacuum Postgres ?
Categories
- Aptana
- Azure
- C#
- DataSnap
- DBExpress
- Delphi
- Delphi и сети
- Delphi. Язык программирования
- ExtJS
- FastReport
- FireDAC
- FireMonkey
- GIT
- ICS
- IDE
- IIS
- Indy
- InnoSetup
- javascript
- jQuery
- JSON
- LiveBindings
- MSHTML
- MySQL
- PHP
- REST
- Ribbons
- SMS
- SQL инструкции
- SVN
- TRichView
- UniGui
- WebBroker
- WinAPI
- Windows
- Алгоритмы
- Без рубрики
- Деревья
- Ищу ответ
- Компонентостроение
- Мои компоненты
- Начальный уровень
- Обработка исключений
- Парсинг
- Потоки(Threads)
- Регулярные выражения
- Тестирование приложений
Author Archives: Stanislav_Panteleev
Java.Hibernate.Middle.What is the difference between @OneToMany(mappedBy=…) vs. @JoinColumn?
✅ Short Answer @OneToMany(mappedBy=…) marks the inverse side of a bidirectional relationship → it tells JPA the parent does not own the foreign key. @JoinColumn marks the owning side → it defines where the foreign key is stored in the … Continue reading
Posted in Без рубрики
Comments Off on Java.Hibernate.Middle.What is the difference between @OneToMany(mappedBy=…) vs. @JoinColumn?
Java.Hibernate.Middle.How do you map an embeddable object in Hibernate?
✅ Short Answer In Hibernate/JPA, you map an embeddable object using @Embeddable on the value class, and @Embedded on the owning entity’s field → the embeddable’s fields become columns in the entity’s table. 🔎 Detailed Explanation 🔹 Embeddables are reusable … Continue reading
Posted in Без рубрики
Comments Off on Java.Hibernate.Middle.How do you map an embeddable object in Hibernate?
Java.Hibernate.Middle.How do you map a many-to-many relationship with extra columns?
✅ Short Answer To map a many-to-many relationship with extra columns in the join table, you can’t use plain @ManyToMany.Instead, you must model the join table as a separate entity with two @ManyToOne relationships — this is called an association … Continue reading
Posted in Без рубрики
Comments Off on Java.Hibernate.Middle.How do you map a many-to-many relationship with extra columns?
Java.Hibernate.Middle.What means orphan removal ? Give example
✅ Short Answer Orphan removal means that if you remove a child entity from its parent’s collection, JPA will automatically delete that child entity from the database, treating it as an “orphan.” 🔎 Detailed Explanation 🔹 By default in a … Continue reading
Posted in Без рубрики
Comments Off on Java.Hibernate.Middle.What means orphan removal ? Give example
Java.Hibernate.Middle.What sql’s are executed when i select, insert, delete parent/child, especially when i need bidirectional connections ?
✅ Scenario: Mapping You have: 📥 Insert Parent + Children Code: SQL executed:1️⃣ INSERT parent row: 2️⃣ INSERT each child row with foreign key: 📤 Select Parent + Children Parent alone: SQL: ✅ No child data loaded if collection is … Continue reading
Posted in Без рубрики
Comments Off on Java.Hibernate.Middle.What sql’s are executed when i select, insert, delete parent/child, especially when i need bidirectional connections ?
Java.Hibernate.Middle.How do you map a bidirectional one-to-many relationship?
✅ Short Answer To map a bidirectional one-to-many relationship, you:1️⃣ Add a @OneToMany(mappedBy = “…”) collection on the parent side.2️⃣ Add a @ManyToOne reference to the parent on the child side.This creates a two-way link between parent and child entities. … Continue reading
Posted in Без рубрики
Comments Off on Java.Hibernate.Middle.How do you map a bidirectional one-to-many relationship?
Java.Hibernate.Middle.How do you map a unidirectional one-to-many relationship?
✅ Short Answer To map a unidirectional one-to-many relationship, you use @OneToMany on the “one” side without a corresponding mapping on the “many” side. You typically combine it with @JoinColumn to specify the foreign key column in the “many” table. … Continue reading
Posted in Без рубрики
Comments Off on Java.Hibernate.Middle.How do you map a unidirectional one-to-many relationship?
Java.Hibernate.Middle.When to use which instrument to solve n+1 problem ?
✅ Use JOIN FETCH when: You always need the associated data in that query’s result (e.g., displaying authors and their books in a UI table). You’re only fetching one collection or single-valued associations → avoids Cartesian explosion. You want maximum … Continue reading
Posted in Без рубрики
Comments Off on Java.Hibernate.Middle.When to use which instrument to solve n+1 problem ?
Java.Hibernate.Middle.Give me a full list of decisions of n + 1 problem
✅ 1) Join fetches (JOIN FETCH in JPQL/HQL) Load parent and associated entities in one SQL query. Example: Pros: very effective; simple. Cons: can cause Cartesian product explosions when fetching multiple collections. ✅ 2) Entity graphs (EntityGraph API) Declaratively specify … Continue reading
Posted in Без рубрики
Comments Off on Java.Hibernate.Middle.Give me a full list of decisions of n + 1 problem
Java.Hibernate.Medium.What is subselect fetching?
🔎 What is subselect fetching? Subselect fetching is a Hibernate-specific fetch strategy for collections (e.g., @OneToMany, @ManyToMany) that reduces the N+1 select problem in a different way than batch or join fetches. Instead of: executing N separate queries (1 per … Continue reading
Posted in Без рубрики
Comments Off on Java.Hibernate.Medium.What is subselect fetching?