-
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.Medium.How do you configure Hibernate with Spring (e.g., LocalSessionFactoryBean)?
✅ Short Answer In a traditional Spring (non-Spring Boot) app, you configure Hibernate using LocalSessionFactoryBean to create the Hibernate SessionFactory, set up a DataSource, and configure a HibernateTransactionManager for declarative transactions. 🔎 Detailed Explanation Here’s a typical setup in a … Continue reading
Posted in Без рубрики
Comments Off on Java.Hibernate.Medium.How do you configure Hibernate with Spring (e.g., LocalSessionFactoryBean)?
Java.Hibernate.Medium.What are the differences between JPA and native Hibernate APIs?
✅ Short Answer JPA API is the standardized Java API for persistence, defined by the Jakarta Persistence specification → it’s portable across providers (Hibernate, EclipseLink, OpenJPA, etc.). Hibernate native API gives you Hibernate-specific features beyond JPA → more flexibility, but … Continue reading
Posted in Без рубрики
Comments Off on Java.Hibernate.Medium.What are the differences between JPA and native Hibernate APIs?
Java.Hibernate.Medium.When do i need such type conversion ?
✅ Short Answer You need custom type conversion when you want to map Java types that don’t directly match database column types, or when you need to store complex or non-standard values — beyond what JPA handles automatically. 🔎 Detailed … Continue reading
Posted in Без рубрики
Comments Off on Java.Hibernate.Medium.When do i need such type conversion ?
Java.Hibernate.Medium.What are user-defined types and how do you implement them?
✅ Short Answer In Hibernate, user-defined types let you customize how your Java objects are mapped to database columns by implementing the UserType (or the newer BasicType/AttributeConverter in JPA).They’re useful when you need to map non-standard data types (like custom … Continue reading
Posted in Без рубрики
Comments Off on Java.Hibernate.Medium.What are user-defined types and how do you implement them?
Java.Hibernate.Middle.How do you map enums in Hibernate?
✅ Short Answer In JPA/Hibernate, you map enums with the @Enumerated annotation, specifying whether to persist them as ordinal values (integers) or string names. 🔎 Detailed Explanation 🔹 Basic mapping example 🔹 EnumType options✅ EnumType.ORDINAL (default): Stores enum’s zero-based ordinal … Continue reading
Posted in Без рубрики
Comments Off on Java.Hibernate.Middle.How do you map enums in Hibernate?
Java.Hibernate.Middle.What is the @Version annotation for?
🔎 Detailed Explanation 🔹 How it works When you annotate a field with @Version, Hibernate automatically:✅ Reads the version value when loading the entity.✅ Checks the version when updating → if the version in the database doesn’t match the version … Continue reading
Posted in Без рубрики
Comments Off on Java.Hibernate.Middle.What is the @Version annotation for?
Java.Hibernate.Medium.Can i load number of records with naturalId ?
✅ Short Answer No — Hibernate’s natural ID API (session.byNaturalId(…)) is designed for one entity lookup at a time.It doesn’t support batch fetching multiple different natural IDs in a single call. 🔎 Detailed Explanation 🔹 How natural ID API works … Continue reading
Posted in Без рубрики
Comments Off on Java.Hibernate.Medium.Can i load number of records with naturalId ?
Java.Hibernate.Medium.What is @NaturalId and how is it used?
✅ Short Answer The @NaturalId annotation marks a field as a natural business key → a unique, immutable identifier other than the primary key.Hibernate allows you to load entities efficiently by natural IDs, caching them separately from the primary key. … Continue reading
Posted in Без рубрики
Comments Off on Java.Hibernate.Medium.What is @NaturalId and how is it used?
Java.Hibernate.Medium.What does the @Formula annotation do?
✅ Short Answer The @Formula annotation lets you map a read-only calculated property in an entity by defining a SQL expression → Hibernate includes it in the SELECT statement when loading the entity. 🔎 Detailed Explanation 🔹 @Formula allows you … Continue reading
Posted in Без рубрики
Comments Off on Java.Hibernate.Medium.What does the @Formula annotation do?
Java.Hibernate.Middle.What will happen if i will not write @JoinColumn on the owning side ?
✅ Short Answer If you don’t specify @JoinColumn on the owning side (usually the @ManyToOne side), JPA will still create a foreign key column, but it will use a default naming convention → typically <entity_field>_id.This can lead to unexpected or … Continue reading
Posted in Без рубрики
Comments Off on Java.Hibernate.Middle.What will happen if i will not write @JoinColumn on the owning side ?