-
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)
- Регулярные выражения
- Тестирование приложений
Category Archives: Без рубрики
Java.Hibernate.Beginner.What is better, save or persist ?
It depends on your needs — but in modern, portable code, persist() is usually the better choice. Here’s why: 🔹 Why prefer persist()✅ Standardized (JPA) — persist() is part of the JPA specification, so it’s portable across any JPA implementation … Continue reading
Posted in Без рубрики
Comments Off on Java.Hibernate.Beginner.What is better, save or persist ?
Java.Hibernate.Beginner.How do you save an object in Hibernate?
To save an object in Hibernate, you need to:1️⃣ Open a Hibernate Session.2️⃣ Start a transaction.3️⃣ Call session.save() or session.persist() to make the object persistent.4️⃣ Commit the transaction to write the object to the database.5️⃣ Close the session to release … Continue reading
Posted in Без рубрики
Comments Off on Java.Hibernate.Beginner.How do you save an object in Hibernate?
Java.Hibernate.Beginner.What happens if you don’t close a session in Hibernate?
✅ What happens if you don’t close a Hibernate session? Answer:If you don’t close a Session, several serious problems can occur: 🔹 1) Database connection leaks✅ Each Hibernate Session holds a JDBC connection (from your connection pool, e.g., HikariCP).✅ If … Continue reading
Posted in Без рубрики
Comments Off on Java.Hibernate.Beginner.What happens if you don’t close a session in Hibernate?
Java.Hibernate.Beginner.Explain “Can leave the entity in a transient state if there’s no transaction (e.g., changes may not actually persist)”
🔹 What happens technically:When you call session.save(entity), Hibernate assigns an identifier (e.g., the primary key) and puts the entity into the session’s first-level cache — so it becomes persistent in the session context. But if you haven’t started a transaction, … Continue reading
Posted in Без рубрики
Comments Off on Java.Hibernate.Beginner.Explain “Can leave the entity in a transient state if there’s no transaction (e.g., changes may not actually persist)”
Java.Hibernate.Beginner.What is the difference between save() and persist() in Hibernate?
🔹 1) save()✅ Returns the generated identifier (primary key) immediately as a Serializable value.✅ Works both inside and outside of an active transaction.✅ Can leave the entity in a transient state if there’s no transaction (e.g., changes may not actually … Continue reading
Posted in Без рубрики
Comments Off on Java.Hibernate.Beginner.What is the difference between save() and persist() in Hibernate?
Java.Hibernate.Beginner.How do you begin and commit a transaction in Hibernate?
You manage transactions in Hibernate using the Transaction API. You: Begin a transaction with session.beginTransaction(). Commit it with transaction.commit(). Optionally roll it back with transaction.rollback() in case of errors. 🔹 Basic example of transaction management: 🔹 What happens during this … Continue reading
Posted in Без рубрики
Comments Off on Java.Hibernate.Beginner.How do you begin and commit a transaction in Hibernate?
Java.Hibernate.Beginner.How do you close a Hibernate session?
You close a Hibernate Session by calling its close() method: 🔹 What happens when you call session.close()?✅ Releases the JDBC connection associated with the session back to the connection pool (e.g., HikariCP).✅ Destroys the session’s first-level cache, evicting all managed … Continue reading
Posted in Без рубрики
Comments Off on Java.Hibernate.Beginner.How do you close a Hibernate session?
Java.Hibernate.Beginner.In which cases entity starts to be trackable ?
An entity starts being trackable (i.e., Hibernate will dirty-check it and sync changes) when it becomes persistent — specifically, when it’s associated with an open Hibernate session. 🔹 Here are the cases when an entity becomes persistent and trackable: ✅ … Continue reading
Posted in Без рубрики
Comments Off on Java.Hibernate.Beginner.In which cases entity starts to be trackable ?
Java.Hibernate.Beginner.What is dirty checking ?
Dirty checking is Hibernate’s automatic mechanism that tracks changes to persistent entities and ensures that any updates you make to those objects are automatically synchronized to the database when the session is flushed (usually at transaction commit). 🔹 How does … Continue reading
Posted in Без рубрики
Comments Off on Java.Hibernate.Beginner.What is dirty checking ?
Java.Hibernate.Beginner.Whats is Stateless session ?
A StatelessSession is a lighter, faster version of Session. It does not use first-level cache, doesn’t track entity states, or support automatic flushing. Best suited for batch processing where you just want to read or write data efficiently without overhead. … Continue reading
Posted in Без рубрики
Comments Off on Java.Hibernate.Beginner.Whats is Stateless session ?