<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Merve Yayın on Medium]]></title>
        <description><![CDATA[Stories by Merve Yayın on Medium]]></description>
        <link>https://medium.com/@merveyayin?source=rss-d172a53c08c8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*N4xbmCVVh-VOviE7gJk67w.jpeg</url>
            <title>Stories by Merve Yayın on Medium</title>
            <link>https://medium.com/@merveyayin?source=rss-d172a53c08c8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 12:55:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@merveyayin/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[AI Çağında Clean Code]]></title>
            <link>https://medium.com/@merveyayin/ai-%C3%A7a%C4%9F%C4%B1nda-clean-code-8102a0d07446?source=rss-d172a53c08c8------2</link>
            <guid isPermaLink="false">https://medium.com/p/8102a0d07446</guid>
            <category><![CDATA[agentic-coding]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[clean-code]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[code-quality]]></category>
            <dc:creator><![CDATA[Merve Yayın]]></dc:creator>
            <pubDate>Sun, 11 Oct 2026 18:20:37 GMT</pubDate>
            <atom:updated>2026-10-11T19:31:19.598Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Comment’lerden SOLID’e: AI’ın yazdığı kod testleri geçiyor, peki fonksiyonel olmayan tarafı — bakım, okunabilirlik, mimari? 2026&#39;da yayımlanan araştırmalar ne gösteriyor?</strong></h3><p>Dokuz aydır bir agent yardımı olmadan neredeyse hiç kod yazmıyorum. Bu sürede zorlandığım konuları bir seri haline getirmeye karar verdim. İlki şu: <strong>AI doğru yönlendirilmediğinde clean code’dan kolayca uzaklaşabiliyor.</strong></p><p>Bunun yalnızca bana mı böyle geldiğini merak edip literatüre baktım. 2026&#39;da yayımlanan çalışmalar aynı şeyi ölçerek söylüyor: <strong>testleri geçen kod, quality konusunda sınıfta kalabiliyor.</strong></p><p>Sorunun kökeni ölçümde. Modellerin başarısı benchmark’larda <strong>correctness</strong> oranıyla, yani üretilen kodun testleri geçip geçmediğiyle ölçülüyor. Kodun bakımı, okunabilirliği ve mimari yapısı için ise üzerinde uzlaşılmış benzer bir ölçü yok.</p><p>CodeQL ve CodeScene gibi statik analiz araçları bu boşluğu bir yere kadar dolduruyor. Onlarla ölçüldüğünde ortaya çıkan tablo da şu: yeni bir modelin, eskisiyle aynı kalitede kod yazması hiç de ender bir durum değil.</p><h3>1. AI ve Kod Kalitesi</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_7cezFONxZ0JfRpp9h2V4w.png" /></figure><p>Yıllarca kodun kendi kendini anlatması gerektiğini öğrendik. Şimdi PR’larda fonksiyon adını tekrar eden, satır aralarına sıkışmış comment’ler var ve artık kimsenin gözünü rahatsız etmiyor.</p><p>Comment’ler göze çarpan tarafı; asıl maliyet tasarımda birikiyor. Modelin hedefi çalışan kodu üretmek ve bunun net bir karşılığı var: benchmark’lardaki correctness oranı, yani üretilen kodun testleri geçip geçmediği. SOLID’e uygunluk, soyutlamanın doğru yerde olması, sorumluluğun dağılımı, tasarımın gelecekteki ihtiyaçları kaldırabilmesi ise hiçbir yerde puana dönmüyor. Tam anlamıyla somut bir ölçüm yapmak kolay değil ve üzerinde anlaşılmış bir çerçeve henüz yok. Üstelik bu kararların bedeli hemen ortaya çıkmıyor. Yanlış kurulmuş bir tasarımda, birkaç satırla karşılanabilecek bir talep günlerce süren bir geliştirmeye dönüşebiliyor; fatura da ancak o noktada kesiliyor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QPOVGt8DAX9cy_CBO-ztpg.png" /></figure><p>Mimari erozyonun toplam faturası repo verisinde görünüyor. GitClear’ın Haziran 2026 tarihli <em>The Maintainability Gap</em> raporunda kod bloğu duplikasyonu <strong>%81</strong>, hata maskeleyen yapılar <strong>%47</strong> artmış durumda. Kod çoğalıyor, yapı zayıflıyor.</p><h3>Literatürden iki çalışma</h3><p><strong>Bu rakamlar sahadan, gerçek repolardan geliyor.</strong> Peki aynı soru kontrollü bir deneyde ölçüldüğünde ne çıkıyor? Linköping Üniversitesi’nden Xin Sun ve ekibi 2026&#39;da bunu ölçen iki çalışma yayımladı: ilki yeni modelin eskisinden daha kaliteli kod yazıp yazmadığına, ikincisi AI’ın yazdığı kodun insan çözümünün yanında nerede durduğuna bakıyor.</p><h3>Do Newer Models Produce Better Patches? A Non-Functional Quality Study [1]</h3><p><strong>Yeni modeller daha iyi kod mu yazıyor, yoksa sadece daha çok testi mi geçiyor?</strong></p><p>LLM’lerin kod yazma başarısı çoğu benchmark’ta tek bir sayıya indirgeniyor: <strong>resolved rate</strong>, yani modelin yazdığı kod değişikliklerinin (patch) kaç tanesinin testleri geçtiği. Her yeni model bu sayıyı biraz daha yukarı taşıyor. Ama testi geçen bir kod, iyi bir kod olduğu anlamına gelmiyor; gereksiz karmaşıklık, bakım zorluğu, güvenlik riski veya fazladan kaynak kullanımı getirebilir.</p><p>Bu çalışma tam olarak bu boşluğa odaklanıyor: yeni nesil modeller daha fazla issue çözüyor, peki yazdıkları kodlar fonksiyonel olmayan kalite (non-functional quality) açısından da daha mı iyi? Araştırma soruyu eski (Claude Sonnet 4, Mayıs 2025) ve yeni (Claude Opus 4.6, Şubat 2026) modelleri karşılaştırarak yanıtlıyor. Kısa cevap: <strong>yeni model daha fazla issue çözüyor, ancak statik analizle ölçülen kalite bakımından iki model arasında anlamlı bir fark bulunmuyor.</strong></p><h4>Araştırma soruları</h4><p>• <strong>RQ1:</strong> Her iki modelin de çözdüğü ortak görevlerde, yeni ve eski modelin yazdığı kodlar kalite açısından ne ölçüde farklı?</p><p>• <strong>RQ2:</strong> Bu kodlarda hangi kalite sorunları öne çıkıyor?</p><h4>Deney düzeni ve metrikler</h4><p>Araştırmacılar, 11 Python projesinden gerçek GitHub issue’larıyla oluşturulmuş 300 görevlik <strong>SWE-bench Lite</strong> benchmark’ını kullanmış. Modeller SWE-agent çerçevesiyle çalıştırılmış ve onlardan yalnızca hatayı düzeltmeleri istenmiş; kalite iyileştirmesi istenmemiş.</p><p>Testleri geçen kodlar dört açıdan değerlendirilmiş:</p><p>• <strong>Statik kalite:</strong> CodeQL kodu güvenlik, güvenilirlik ve bakım/okunabilirlik etiketli sorgularla tarıyor. CodeScene ise 25&#39;ten fazla faktörü birleştiren Code Health skorunu üretiyor: God Class (Brain Class), Brain Method, Complex Method, Large Method, Long Parameter List, Primitive Obsession, Bumpy Road, Low Cohesion ve DRY Violations. Değişiklik öncesi ve sonrası analiz yapılarak yeni sorun eklenip eklenmediğine bakılmış.</p><p>• <strong>Performans:</strong> Testler 5 kez çalıştırılıp ortalama CPU süresi ve tepe bellek kullanımı ölçülmüş.</p><p>• <strong>Değişikliğin boyutu:</strong> Kaç satır ve kaç dosyanın değiştiği sayılmış.</p><p>Adil bir karşılaştırma için ana analiz, iki modelin de çözdüğü <strong>71 ortak görev</strong> üzerinde yapılmış.</p><h4>Fark bulunan alanlar</h4><p><strong>1. Daha fazla görev çözülüyor.</strong> Opus 4.6, 300 görevden 133&#39;ünü (%44,3) çözerken Sonnet 4 108&#39;ini (%36,0) çözmüş. Çalışmada yeni modelin açık farkla önde olduğu tek alan bu.</p><p><strong>2. Daha kısa kod yazılıyor.</strong> Ortak görevlerde Opus 4.6 medyanda 3 satır, Sonnet 4 ise 6 satır değiştirmiş ve Opus daha az dosyaya dokunmuş.</p><h4>Fark bulunmayan alanlar</h4><p><strong>3. Statik kod kalitesi: fark yok.</strong> Çalışmanın ana bulgusu bu. CodeQL’de 71 görevin 66&#39;sında iki modelin kodu tamamen aynı sonucu vermiş. CodeScene’de yalnızca 10 görevde fark çıkmış.</p><p><strong>4. Belirli kod sorunlarının sıklığı: anlamlı fark yok.</strong> Tek dosyada çok fazla satır veya tutarsız dönüş değerleri gibi sorunlar Opus’ta biraz daha seyrek, ama hiçbiri istatistiksel olarak anlamlı değil.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*poMcG_zmNuzXss9CNqHnjQ.png" /><figcaption><strong>Tablo 1.</strong> Claude Sonnet 4 ile Claude Opus 4.6&#39;nın 71 ortak görevdeki karşılaştırması</figcaption></figure><h4>Sonuç</h4><p>Çalışma, LLM değerlendirmelerinde sıkça gözden kaçan bir noktayı açıkça ortaya koyuyor: <strong>daha yüksek resolved rate, daha kaliteli kod anlamına gelmiyor.</strong> Opus 4.6 daha fazla issue çözüyor ve daha öz kod yazıyor; ancak aynı issue’yu çözdüklerinde statik analizle ölçülen kalite neredeyse aynı, kaynak kullanımı ise çok az da olsa daha yüksek. Yazarların önerisi net: resolved rate, statik analiz bulguları, kaynak kullanımı ve değişikliğin özellikleri ayrı ayrı raporlanmalı. Aksi halde “model ilerledi” dediğimizde neyin ilerlediğini tam olarak bilemiyoruz.</p><p>Kaynak: Sun, X., Ståhl, D., Sandahl, K., Kessler, C. (2026). <em>Do Newer Models Produce Better Patches? A Non-Functional Quality Study.</em> arXiv:2607.18462</p><p>İkinci çalışma aynı soruyu bu kez modeli modelle değil, <strong>insan geliştiriciyle</strong> karşılaştırarak soruyor.</p><h3>Quality Assurance of LLM-generated Code: Addressing Non-Functional Quality Characteristics [2]</h3><p><strong>Yapay zekânın yazdığı kod testleri geçiyor, peki arkasında ne bırakıyor?</strong></p><p>İkinci çalışma, AI’ın yazdığı kodun kalitesini üç ayrı açıdan ele alıyor: akademi ne diyor, sektör ne bekliyor ve modeller pratikte nasıl davranıyor? Bunun için 109 makalelik bir literatür taraması, sektörden 15 katılımcıyla iki görüşme oturumu ve bir deney yapılmış.</p><h4>Literatür: akademi neye bakıyor?</h4><p>Konuya ilgi hızla artıyor, ancak araştırmalar birkaç özelliğe yığılıyor: güvenlik (%33,6), performans (%23,3) ve maintainability (%17,2). Yazarlara göre bunun önemli bir nedeni, bu özelliklerin mevcut araçlarla kolay ölçülebilmesi. Yani araştırmalar “ölçülmesi gerekene” değil “ölçülebilene” bakıyor. Ortak bir tanım ve ölçüm çerçevesi yok; kalite özellikleri arasındaki etkileşimler de neredeyse hiç incelenmemiş.</p><h4>Sektör görüşmeleri: ne bekleniyor?</h4><p>Geliştiriciler için doğruluk, pazarlık konusu olmayan bir ön koşul. Asıl kaygı başka: sektörün önceliği <strong>maintainability ve okunabilirlik</strong>, özellikle büyük ve uzun ömürlü projelerde. Katılımcılar mevcut maintainability metriklerine de güvenmiyor. Yapay zekânın yazdığı kodun hacmi ve karmaşıklığı arttıkça kodu anlamak zorlaşıyor; bu da kısa vadeli verimlilik ile uzun vadeli bakım maliyeti arasında bir gerilim yaratıyor.</p><h4>Deney: Claude Sonnet 4 (Mayıs 2025) vs insan</h4><p>Claude Sonnet 4, SWE-bench Lite üzerinde görevlerin %36&#39;sını çözmüş. Doğru çözülen ortak 17 görevde yazdığı kod, insan geliştiricilerin aynı görevler için yazdığı gerçek çözümlerle karşılaştırılmış:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/934/1*AcHAKjoF9_43_oafSBnUtA.png" /><figcaption><strong>Tablo 2.</strong> Claude Sonnet 4 ile developer’ların 17 ortak görevdeki çözümlerinin karşılaştırması</figcaption></figure><p><strong>Doğru kod, kaliteli kod demek değil.</strong> Sonnet 4&#39;ün kodu her kalite açısından insan çözümünden daha zayıf: yaklaşık 2 kat daha fazla satır ve 14 kat daha fazla maintainability uyarısı. Uyarıların çoğu döngüsel import (cyclic import) sorunundan geliyor. İnsanlar projenin mevcut yapısını bilerek var olan modülleri yeniden kullanırken, model sorunu kendi içinde çözmeye çalışıp import’ları yeniden düzenliyor.</p><p><strong>Geri bildirimle iyileştirme kısmen işe yarıyor.</strong> Modele CodeQL raporları verilip kodu iyileştirmesi istendiğinde, hız ve bellek iyileştirmeleri istatistiksel olarak anlamlı çıkmış. Ancak <strong>maintainability ve güvenlik iyileştirmeleri anlamlı bir fark yaratmamış.</strong></p><p><strong>Bir şeyi düzeltmek diğerini bozabiliyor.</strong> Maintainability’yi iyileştirmesi istendiğinde bazı görevlerde uyarı sayısı tam tersine artmış: bir örnekte 3&#39;ten 44&#39;e; başka bir örnekte bellek kullanımı 48 MB’den 145 MB’ye çıkmış.</p><h4>Sonuç</h4><p>Çalışma, akademinin ve sektörün önceliklerinin aynı yerde olmadığını gösteriyor: akademik çalışmalar ağırlıklı olarak güvenlik ve performans üzerinde yoğunlaşırken, sektör bunların yanına maintainability’yi de koyuyor ve özellikle uzun ömürlü projelerde en çok orayı dert ediyor. Yazarların uyarısı açık: yapay zekânın yazdığı kodu doğrulamadan projeye eklemek teknik borcu artırma riski taşıyor. Önerdikleri çözüm, statik analizi ve otomatik kalite kontrollerini kod üretim sürecinin <strong>içine</strong> yerleştirmek. Hedef, kodun yalnızca “testleri geçmesinden” “kaliteli bir şekilde geçmesine” ulaşmak.</p><p>Kaynak: Sun, X., Ståhl, D., Sandahl, K., Kessler, C. (2026). <em>Quality Assurance of LLM-generated Code: Addressing Non-Functional Quality Characteristics.</em></p><h3>2. Peki doğru yol ne?</h3><p>Asıl soru “AI kod yazsın mı” değil, <strong>“AI’ın yazdığı kodu ne kadarını doğrulamadan kabul ediyoruz”</strong>. Yazıdaki bulgular aynı yere çıkıyor: AI bugün hızlı ve çoğu zaman doğru bir uygulayıcı, ama sistem düzeyinde zayıf bir tasarımcı. Daha yeni model bunu kendiliğinden çözmüyor; statik analizle ölçülen kalite neredeyse aynı kalıyor. Üstelik statik analiz de her şeyi yakalamıyor: yanlış konumlanmış bir soyutlama, domain’e uymayan bir modül sınırı ya da gelecekteki ihtiyaçları karşılayamayacak mimari kararlar hiçbir araçta uyarı üretmiyor. Mesele tasarımla da sınırlı değil: dokümante edilmemiş bir edge case, modelin hiç haberi olmadığı için sessizce atlanıyor. Bu tür borcun faturası ya bir değişiklik talebi geldiğinde ya da canlıda bir incident çıktığında kesiliyor.</p><p>Peki hız ile kalite arasındaki dengeyi nasıl kuracağız?</p><p>Verinin işaret ettiği iş bölümü şöyle özetlenebilir:</p><p><strong>İnsanda kalması gerekenler.</strong> Sınır çizmek (modül, servis, bounded context), sözleşme tasarlamak (interface imzaları, hata modeli), tersine çevrilmesi pahalı kararlar ve güvenlik sınırları. Ortak özellikleri, yanlış kararın maliyetinin saatlerde değil çeyreklerde ölçülmesi.</p><p><strong>AI’a rahatlıkla bırakılabilecekler:</strong> Sözleşme netse implementasyon, test üretimi, migration iskeleti, log ve monitoring boilerplate’i, basit CRUD, mekanik refactor.</p><p><strong>Pipeline’a bırakılması gerekenler:</strong> Kod duplikasyonu kontrolleri, güvenlik taramaları ve test coverage eşikleri. Çünkü modelin itiraz etmesini ummak yerine sistemin itiraz etmesini garanti altına almak mümkün.</p><p><strong>Repo düzeyinde kontrol:</strong> Statik analizi ve kalite kontrollerini CI’a taşımak, AI’ın yazdığı kodun review’dan geçmeden merge edilmemesini kural haline getirmek, ve ölçümü duplikasyon, karmaşıklık ve hata maskeleme gibi yapısal metrikler üzerinden yapmak.</p><p>AI bir süre daha araştırma ve implementasyon aracı olarak kalacak gibi görünüyor. Sebebi yetenek eksikliği değil: maintainability ve mimari kalite için üzerinde uzlaşılmış bir ölçüm çerçevesi yok. Testin geçip geçmediğini ölçebiliyoruz, kodun yaşayıp yaşamayacağını ölçemiyoruz. Bu boşluk kapanmadan “model ilerledi” cümlesi mimari bir güvence üretmiyor.</p><p>Sizin projelerinizde durum nasıl? Mimari kararları hangi noktaya kadar AI’a bırakıyorsunuz: sözleşme tasarımına kadar mı, yoksa yalnızca sözleşme netleştikten sonraki implementasyona mı? Ve review’da en sık neyi düzeltiyorsunuz: her yere serpiştirilmiş comment’leri mi, null dönen interface’leri mi, aynı methodun üçüncü kopyasını mı, yoksa sessizce yutulan exception’ları mı?</p><h3>Kaynaklar</h3><p><strong>Kod kalitesi, comment ve teknik borç</strong></p><p>1. Sun, X., Ståhl, D., Sandahl, K., Kessler, C. — <em>Do Newer Models Produce Better Patches? A Non-Functional Quality Study</em> — arXiv:2607.18462 (2026)</p><p>2. Sun, X., Ståhl, D., Sandahl, K., Kessler, C. — <em>Quality Assurance of LLM-generated Code: Addressing Non-Functional Quality Characteristics</em> (2026)</p><p>3. <em>Evaluating Human- and AI-Generated Code Quality Based on Code Smell</em> — ACM (2026)</p><p>4. <em>AI-Generated Smells: An Analysis of Code and Architecture in LLM- and Agent-Driven Development</em> — arXiv:2605.02741 (2026)</p><p>5. GitClear — <em>The Maintainability Gap</em> (Haziran 2026)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8102a0d07446" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Serializable Isolation: The Gold Standard of Database Consistency]]></title>
            <link>https://medium.com/@merveyayin/serializable-isolation-the-gold-standard-of-database-consistency-7a39008109e6?source=rss-d172a53c08c8------2</link>
            <guid isPermaLink="false">https://medium.com/p/7a39008109e6</guid>
            <dc:creator><![CDATA[Merve Yayın]]></dc:creator>
            <pubDate>Fri, 04 Jul 2025 11:10:45 GMT</pubDate>
            <atom:updated>2025-07-04T11:10:45.903Z</atom:updated>
            <content:encoded><![CDATA[<p>When you need <strong>strong guarantees</strong> in your database — no anomalies, no surprises — there’s only one isolation level that stands above the rest: <strong>Serializable</strong>.</p><p>It’s the only level that guarantees transactions behave as if they were executed <strong>one at a time</strong>, in a strict serial order — even though, under the hood, they might be running in parallel.</p><p>Let’s dive into how databases achieve this level of isolation using techniques like:</p><ul><li>🔁 <strong>Actual Serial Execution</strong></li><li>🔐 <strong>Two-Phase Locking (2PL)</strong></li><li>🌐 <strong>Serializable Snapshot Isolation</strong></li></ul><h3>🧵 Actual Serial Execution: One At A Time</h3><p>The most straightforward way to ensure serializability is to <strong>literally</strong> execute one transaction at a time, on a single thread.</p><h4>🚫 No Concurrency = No Conflicts</h4><p>This method eliminates the need for locks or conflict detection entirely. Since transactions can’t overlap, there’s no way for one to interfere with another.</p><p>But there’s a trade-off…</p><h4>🐌 Limitations of Single-Threaded Serial Execution</h4><ul><li>All transactions must be <strong>short and fast</strong> — a slow one stalls the entire system</li><li>The <strong>entire active dataset must fit in memory</strong></li><li>Write throughput is limited by <strong>a single CPU core</strong></li></ul><p>This model only works for high-speed, in-memory systems — like <strong>VoltDB</strong> and <strong>FoundationDB</strong> — that tightly control transaction scope and size.</p><h4>🪓 Partitioning for Scalability</h4><p>To escape the limits of one-core performance, many serial databases <strong>partition the data</strong>.</p><p>Each partition runs its own serial transaction processor — meaning:</p><ul><li>💥 Parallelism increases with CPU cores</li><li>🚀 Transaction throughput scales linearly</li><li>🧩 Each transaction must only touch <strong>one partition</strong></li></ul><p>If a transaction spans multiple partitions, it hits a wall. ⚠️</p><h3>🛠️ Two-Phase Locking (2PL): The Traditional Approach</h3><p>Before optimistic techniques, <strong>Two-Phase Locking (2PL)</strong> was the go-to for enforcing serializability.</p><h4>🔒 How It Works</h4><ol><li><strong>Locks are acquired</strong> (read or write) as the transaction runs</li><li><strong>No locks are released</strong> until the transaction commits or aborts</li></ol><p>This ensures <strong>no conflicting reads or writes</strong> can happen mid-transaction.</p><p>📚 2PL is strict. Even <strong>reads block writes</strong>, and <strong>writes block reads</strong>.</p><h4>😬 Downsides of 2PL</h4><ul><li>🐢 <strong>Performance hit</strong> due to excessive blocking</li><li>⚠️ High risk of <strong>deadlocks</strong> (A waits for B, B waits for A)</li><li>❌ Poor fit for read-heavy workloads or long-running queries</li></ul><p>Databases using 2PL (like some OLTP systems) must <strong>automatically detect deadlocks</strong> and abort one transaction to recover.</p><h4>🔍 Predicate Locks and Phantom Prevention</h4><p>To fully enforce serializability, 2PL must include <strong>predicate locks</strong> — locking not just existing rows, but also <strong>future matching rows</strong>.</p><p>Example:</p><blockquote>SELECT * FROM bookings WHERE room_id = 1 AND date = ‘2025–06–23’ FOR UPDATE;</blockquote><p>If no rows are returned, a standard lock does nothing. But a <strong>predicate lock</strong> would prevent new rows from matching the query condition later — a must to stop <strong>phantom writes</strong>.</p><h3>🚀 Serializable Snapshot Isolation (SSI): Optimism Wins</h3><p>Can we get the benefits of <strong>serializability</strong> without the pain of <strong>locking</strong>?</p><p>Yes — with <strong>Serializable Snapshot Isolation (SSI)</strong>. 🧠💡</p><p>Described in 2008 and adopted in PostgreSQL 9.1+, SSI is an <strong>optimistic concurrency control</strong> method.</p><h4>🌞 Optimistic by Design</h4><p>Instead of blocking or locking, SSI:</p><ol><li><strong>Lets transactions proceed freely</strong> using snapshot isolation</li><li><strong>Monitors for conflicts in the background</strong></li><li><strong>Aborts only when necessary</strong></li></ol><p>If the database detects that a transaction would have violated serializability, it’s rolled back before commit. Otherwise, it’s allowed to succeed.</p><h4>🧊 Built on Snapshot Isolation</h4><p>SSI starts with the snapshot isolation guarantees:</p><ul><li>Reads see a consistent snapshot</li><li>No blocking on reads or writes</li><li>MVCC ensures writers never block readers, and vice versa</li></ul><p>On top of that, SSI adds logic to detect when <strong>write skew</strong> or other anomalies would break serializability.</p><h4>🧠 How SSI Detects Conflicts</h4><p>Let’s say:</p><ul><li>T1 reads rows A and B</li><li>T2 updates B and commits</li><li>T1 updates A and tries to commit</li></ul><p>This sequence could lead to a <strong>write skew</strong>. SSI detects that T1’s read of B is outdated and aborts the transaction to maintain serializability.</p><p>✅ Safe<br> 🚀 Efficient<br> 🤯 Complex under the hood — but transparent to developers</p><h4>📈 Performance of SSI</h4><p>The beauty of SSI is that it adds <strong>only a small overhead</strong> compared to snapshot isolation — <strong>far less than 2PL</strong>.</p><ul><li>Ideal for long-running reads</li><li>Great for OLAP workloads</li><li>No deadlocks, no blocking, no painful locks</li></ul><p>✅ In PostgreSQL, it’s the best choice when you need correctness <strong>without giving up performance</strong>.</p><h3>👋 Final Thoughts</h3><p>If you’re building systems where <strong>data correctness is critical</strong>, you need to understand serializable isolation — especially when you start scaling writes and transactions.</p><ul><li>For small, fast transactions: <strong>serial execution</strong> works beautifully</li><li>For complex workloads: <strong>SSI</strong> gives serializability without locks</li></ul><p>References:</p><p>Kleppmann, Martin. Designing Data-Intensive Applications. O’Reilly Media, 2017</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7a39008109e6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[️ Weak Isolation Levels in Transactions: Read Committed & Snapshot Explained]]></title>
            <link>https://medium.com/@merveyayin/%EF%B8%8F-weak-isolation-levels-in-transactions-read-committed-snapshot-explained-d8afede56c55?source=rss-d172a53c08c8------2</link>
            <guid isPermaLink="false">https://medium.com/p/d8afede56c55</guid>
            <dc:creator><![CDATA[Merve Yayın]]></dc:creator>
            <pubDate>Fri, 04 Jul 2025 11:01:27 GMT</pubDate>
            <atom:updated>2025-07-04T11:01:27.666Z</atom:updated>
            <content:encoded><![CDATA[<p>Database isolation levels are the invisible rules that govern how transactions interact with each other. <br> If you’ve ever wondered how databases prevent dirty reads, lost updates, or race conditions — this guide is for you.</p><h3>📖 Read Committed: The Most Basic Isolation Level</h3><p><strong>Read Committed</strong> is one of the most widely used isolation levels. It’s the default in many major databases, including Oracle 11g, PostgreSQL, SQL Server 2012, and MemSQL.</p><h3>✅ What Does It Guarantee?</h3><ul><li><strong>No dirty reads</strong>: A transaction can only read data that has already been committed.</li><li><strong>No dirty writes</strong>: A transaction can only overwrite data that has already been committed.</li></ul><h3>⚙️ How Does It Work Behind the Scenes?</h3><h4>🧱 Preventing Dirty Writes</h4><p>To ensure that two transactions don’t overwrite each other’s updates:</p><ul><li>When a transaction wants to <strong>update a row</strong>, it must <strong>acquire a lock</strong> on that row.</li><li>The transaction <strong>holds the lock</strong> until it either <strong>commits or aborts</strong>.</li><li>While the lock is held, <strong>no other transaction can write</strong> to that row.</li><li>This guarantees that writes are isolated and consistent.</li></ul><h4>🧱 Preventing Dirty Reads</h4><p>Instead of locking readers (which can slow down the system), most databases take a more elegant approach:</p><ul><li>When a transaction <strong>writes to a row</strong>, the database stores:</li><li>The <strong>old committed value</strong></li><li>The <strong>new uncommitted value</strong></li><li>While the transaction is still <strong>in progress</strong>:</li><li>Other transactions will <strong>see only the old committed value</strong></li><li>The <strong>new value becomes visible only after commit</strong></li></ul><p>✅ This mechanism <strong>prevents dirty reads</strong> while allowing readers to continue without waiting — keeping things <strong>fast and non-blocking</strong>.</p><p>⚠️ However, some databases like <strong>IBM DB2</strong> and <strong>Microsoft SQL Server</strong> (when read_committed_snapshot=off) use <strong>locks</strong> to prevent dirty reads instead of versioning. In these cases, readers may be blocked while waiting for writers to release their locks.</p><h3>🧊 Snapshot Isolation</h3><p>Under <strong>Snapshot Isolation</strong>, each transaction reads from a <strong>consistent snapshot</strong> of the database — exactly as it was at the <strong>start of the transaction</strong>, regardless of concurrent updates.</p><p>This isolation level is perfect for <strong>long-running, read-only operations</strong> like backups and analytics because it avoids confusion caused by data changing during query execution.</p><p>It is widely supported by databases such as <strong>PostgreSQL</strong>, <strong>MySQL (InnoDB)</strong>, <strong>Oracle</strong>, and <strong>SQL Server</strong>.</p><h3>✅ What Does It Guarantee?</h3><ul><li><strong>No dirty reads</strong>: Transactions only read data that has already been committed.</li><li><strong>No dirty writes</strong>: Transactions only overwrite data that has already been committed.</li><li><strong>Prevents read skew</strong>: Each transaction sees a consistent snapshot, avoiding inconsistencies from concurrent updates.</li></ul><h3>⚙️ How Does It Work Behind the Scenes?</h3><h4>🧱 Preventing Dirty Writes</h4><p>To avoid conflicting writes:</p><ul><li>Snapshot Isolation prevents dirty writes the same way as <em>Read Committed.</em></li></ul><p>This guarantees that writes remain <strong>isolated and consistent</strong>.</p><h4>🧱 Preventing Dirty Reads with MVCC</h4><p>Snapshot Isolation takes this further by letting transactions read from a <strong>consistent snapshot</strong> of the database as of the transaction start:</p><ul><li>Databases store <strong>multiple committed versions</strong> of each data item, allowing different transactions to see different snapshots simultaneously.</li><li>This approach is called <strong>Multi-Version Concurrency Control (MVCC)</strong>.</li><li>Snapshot Isolation <strong>uses a single snapshot for the entire transaction</strong>.</li></ul><p>Thanks to MVCC, <strong>long-running read queries</strong> can run alongside writes <strong>without blocking</strong> or lock contention, maintaining both <strong>performance and consistency</strong>.</p><h3>🔄 Repeatable Read and Naming Confusion</h3><p><strong>Snapshot isolation</strong> is a valuable isolation level — especially for <strong>read-only transactions</strong> — but its naming can be confusing across different database systems.</p><ul><li>In <strong>Oracle</strong>, snapshot isolation is called <strong>serializable</strong>.</li><li>In <strong>PostgreSQL</strong> and <strong>MySQL</strong>, it’s called <strong>repeatable read</strong>.</li></ul><p>💡 This inconsistency stems from the fact that the <strong>SQL standard</strong> does <strong>not explicitly define snapshot isolation</strong>. The standard is based on the isolation levels introduced by <strong>System R in 1975</strong>, which predates the invention of snapshot isolation.</p><p>References:</p><p>Kleppmann, Martin. Designing Data-Intensive Applications. O’Reilly Media, 2017.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d8afede56c55" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Understanding Isolation Levels Through Real-World Anomalies]]></title>
            <link>https://medium.com/@merveyayin/understanding-isolation-levels-through-real-world-race-conditions-a31d6090a7f4?source=rss-d172a53c08c8------2</link>
            <guid isPermaLink="false">https://medium.com/p/a31d6090a7f4</guid>
            <dc:creator><![CDATA[Merve Yayın]]></dc:creator>
            <pubDate>Fri, 04 Jul 2025 10:51:15 GMT</pubDate>
            <atom:updated>2025-07-04T11:39:12.096Z</atom:updated>
            <content:encoded><![CDATA[<p>When multiple transactions operate on the same or related data concurrently, databases can encounter <em>race conditions</em> that compromise data consistency. Database engines use <strong>isolation levels</strong> to handle these issues — each offering different trade-offs between performance and consistency.</p><p>For instance, <strong>Read Uncommitted</strong> provides the best performance but offers the weakest guarantees in terms of correctness. On the other hand, <strong>Serializable</strong> delivers the highest level of consistency but often at the cost of reduced performance.</p><p>To choose the right isolation level for your application, it’s essential to first understand the kinds of race conditions that can occur. Once we grasp these potential pitfalls, we’ll explore how each isolation level works under the hood to prevent (or fail to prevent) them.</p><h3>Understanding Database Anomalies</h3><p>Databases often promise strong consistency, but not all isolation levels are created equal. If you’re not careful, subtle race conditions can lead to serious bugs — even in production. Here’s how.</p><h3>🟡 Dirty Read</h3><p>When a transaction reads uncommitted data from another transaction — meaning it sees changes that might later be rolled back.</p><p><strong>📌 Example:<br></strong> Transaction A updates a balance to $500 but hasn’t committed. Transaction B reads that value and makes decisions based on it. If A later rolls back, B made a choice based on invalid data.</p><p><strong>✅ Solution:<br></strong>Use Read Committed or a higher isolation level. It ensures transactions can’t read uncommitted changes.</p><h3>🔴 Dirty Write</h3><p>When two transactions write to the same data at the same time — and one of them writes over data that hasn’t even been committed yet by the other.</p><p><strong>📌 Example:<br></strong>For example, consider <a href="https://learning.oreilly.com/library/view/designing-data-intensive-applications/9781491903063/ch07.html#fig_transactions_dirty_writes">Figure </a>1 , which illustrates a used car sales website on which two people, Alice and Bob, are simultaneously trying to buy the same car. Buying a car requires two database writes: the listing on the website needs to be updated to reflect the buyer, and the sales invoice needs to be sent to the buyer. In the case of <a href="https://learning.oreilly.com/library/view/designing-data-intensive-applications/9781491903063/ch07.html#fig_transactions_dirty_writes">Figure </a>1, the sale is awarded to Bob (because he performs the winning update to the listings table), but the invoice is sent to Alice (because she performs the winning update to the invoices table).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/0*7l28nYL20bueA8nF" /></figure><p><em>Figure 1. With dirty writes, conflicting writes from different transactions can be mixed up.</em></p><p><strong>✅ Solution:<br></strong> Again, Read Committed or higher prevents this by locking the data until the first transaction commits or aborts.</p><h3>🔁 Non-repeatable Read &amp; Read Skew</h3><p>Non-repeatable read occurs when a transaction reads the same data twice and sees different values because another transaction modified and committed changes in between. When this causes inconsistent or logically incorrect views across multiple related reads within the transaction, it is referred to as a read skew anomaly.</p><p><strong>📌 Example:</strong></p><p>For example, consider <a href="https://learning.oreilly.com/library/view/designing-data-intensive-applications/9781491903063/ch07.html#fig_transactions_dirty_writes">Figure</a> 2, Alice has a total of $1,000 in her bank, split evenly across two accounts with $500 each. A transaction transfers $100 from one account to the other. In a single transaction, Alice reads her first account’s balance before $100 is moved out, then reads her second account’s balance after $100 is added; because these two reads happen at different times during the transfer, she sees $500 in one account and $400 in the other, making her total look like $900 even though she still has $1,000. This situation is called a read skew.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/988/0*FWis26WJLylds_6A" /></figure><p><em>Figure 2. Read skew: Alice observes the database in an inconsistent state.</em></p><p><strong>📉 Why It Matters:<br></strong>Inconsistent reads — meaning reading data that isn’t fully up-to-date — can sometimes be harmless, like when refreshing a banking app where the balance may temporarily appear incorrect but corrects itself shortly after. However, when such inconsistencies occur during backups or analytics, parts of the backup may contain outdated data while others have newer data, or analytics queries may produce misleading results. This can lead to permanent data corruption when restoring from backups or to incorrect business decisions based on faulty reports.</p><p><strong>✅ Solution:<br> </strong>Use Snapshot Isolation or a stricter level.<strong><br> 📝 Note:</strong> Implementation varies — PostgreSQL, Oracle, and SQL Server handle this better than MySQL’s “repeatable read”<strong>.</strong></p><h3>💥 Lost Update</h3><p>Two transactions read the same value, modify it, and write it back. One update silently overwrites the other.</p><p><strong>📌 Example:</strong></p><ul><li>Two users edit the same wiki page and save changes at the same time. One user’s edit is lost<strong>.</strong></li><li>Two processes increment a counter by reading, adding 1, and writing back. One increment is lost.</li></ul><p><strong>✅ Solutions:</strong></p><ul><li><strong>🔒</strong> Use explicit row locks<strong> (SELECT … FOR UPDATE)</strong></li><li><strong>🧠</strong> Use atomic operations<strong> (UPDATE counter SET value = value + 1)</strong></li><li><strong>🔁 </strong>Use compare-and-set logic (<strong>UPDATE stock SET quantity = quantity — 1 WHERE product_id = 123 AND quantity = 10</strong>)</li><li><strong>✅ </strong>Databases like PostgreSQL (Repeatable Read), Oracle (Serializable), and SQL Server (Snapshot) auto-detect lost updates and abort transactions.<br> 🚫 MySQL (Repeatable Read) does not detect lost updates!</li></ul><h3>⚠️ Write Skew</h3><p>Occurs under Snapshot Isolation when two concurrent transactions read shared data and update disjoint but related rows. Individually they look fine — together, they break a rule.</p><p><strong>📌 Example:<br></strong> For example, consider <a href="https://learning.oreilly.com/library/view/designing-data-intensive-applications/9781491903063/ch07.html#fig_transactions_dirty_writes">Figure</a> 3, A hospital system requires at least one doctor on call. Alice and Bob are both on call, and both try to go off at the same time. Each sees “2 doctors available” and proceeds. Result: no doctors on call, which violates policy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*GJcpeFLdM3DoK5JS" /></figure><p><em>Figure 3. Example of write skew causing an application bug.</em></p><p><strong>✅ Solution:</strong></p><ul><li>Use explicit locking</li><li>Or use Serializable isolation level to prevent this anomaly</li></ul><h3>🛡️ Final Note: Choose Isolation Levels Wisely</h3><p>Each isolation level offers a tradeoff between consistency and performance. The right choice depends on your use case, but understanding the race conditions they allow is critical.</p><p>References:</p><p>Kleppmann, Martin. Designing Data-Intensive Applications. O’Reilly Media, 2017</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a31d6090a7f4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Are Transactions? The Key to Data Integrity in Databases]]></title>
            <link>https://medium.com/@merveyayin/what-are-transactions-the-key-to-data-integrity-in-databases-609a96b637fa?source=rss-d172a53c08c8------2</link>
            <guid isPermaLink="false">https://medium.com/p/609a96b637fa</guid>
            <dc:creator><![CDATA[Merve Yayın]]></dc:creator>
            <pubDate>Fri, 04 Jul 2025 10:40:43 GMT</pubDate>
            <atom:updated>2025-07-04T10:40:43.736Z</atom:updated>
            <content:encoded><![CDATA[<p>In today’s digital world, managing data securely and reliably is more important than ever. One of the fundamental ways to ensure data integrity in databases is by using <strong>transactions</strong>. But what exactly is a transaction, and why does it matter so much? Let’s dive in! 💡</p><h3>What Is a Transaction?</h3><p>A transaction is a sequence of database operations (like reads and writes) treated as a single, indivisible unit. This means that either <strong>all operations succeed</strong> or <strong>none of them do</strong> — no half-finished business allowed! This all-or-nothing approach helps prevent corrupted or inconsistent data from sneaking into your system.</p><p>Imagine a bank transfer where money is withdrawn from one account and deposited into another. Without transactions, if the withdrawal succeeds but the deposit fails, your data would be messed up. With transactions, both steps must complete together, or neither happens, keeping your data safe and sound. 💸➡️💰</p><h3>Why Use Transactions? Pros and Cons ⚖️</h3><h3>Pros:</h3><ul><li><strong>Data Integrity:</strong> Transactions guarantee that your data stays consistent and reliable.</li><li><strong>Error Handling Simplified:</strong> You don’t have to worry about partial updates causing chaos.</li><li><strong>ACID Compliance:</strong> Transactions enforce the ACID principles (Atomicity, Consistency, Isolation, Durability), which are the backbone of robust database systems.</li></ul><h3>Cons:</h3><ul><li><strong>Performance Impact:</strong> Transactions can slow down operations, so they’re not ideal for every use case.</li><li><strong>Overkill for Some Apps:</strong> If your application doesn’t require strict data consistency, transactions might add unnecessary complexity.</li></ul><h3>The ACID Principles Explained 🧩</h3><p>Transactions help databases follow four key rules known as ACID:</p><ul><li><strong>Atomicity:</strong> The entire transaction happens or nothing happens at all.</li><li><strong>Consistency:</strong> The database always stays in a valid state.</li><li><strong>Isolation:</strong> Multiple transactions run independently without interfering with each other.</li><li><strong>Durability:</strong> Once a transaction completes, changes are permanent — even if the system crashes.</li></ul><h3>When Should You Use Transactions? 🎯</h3><p>Transactions are perfect when data accuracy and integrity are non-negotiable, such as in banking, booking systems, or inventory management. But if your app prioritizes speed over perfect accuracy — like real-time analytics or logging — transactions might not be the best fit.</p><p>References:</p><p>Kleppmann, Martin. Designing Data-Intensive Applications. O’Reilly Media, 2017</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=609a96b637fa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Data Warehouses and Columnar Storage Matter]]></title>
            <link>https://medium.com/@merveyayin/why-data-warehouses-and-columnar-storage-matter-8d59052da763?source=rss-d172a53c08c8------2</link>
            <guid isPermaLink="false">https://medium.com/p/8d59052da763</guid>
            <dc:creator><![CDATA[Merve Yayın]]></dc:creator>
            <pubDate>Wed, 04 Jun 2025 08:14:53 GMT</pubDate>
            <atom:updated>2025-06-04T08:14:53.238Z</atom:updated>
            <content:encoded><![CDATA[<p>When managing data, businesses face two primary types of workloads:</p><ul><li>💼 <strong>Online Transaction Processing (OLTP)</strong> systems</li><li>📊 <strong>Online Analytical Processing (OLAP)</strong> systems</li></ul><p>Historically, both transactional and analytical queries were run on the same databases. SQL’s flexibility made it possible to handle OLTP and OLAP queries within a single system. However, during the late 1980s and early 1990s, companies began separating analytics workloads from transaction processing systems, giving birth to the concept of the <strong>data warehouse</strong>.</p><h3>🔄 The Divergence Between OLTP Databases and Data Warehouses</h3><p>On the surface, data warehouses and OLTP relational databases look similar because both support SQL queries. Yet under the hood, they are quite different — optimized for vastly different query patterns.</p><ul><li>OLTP systems are designed for frequent, short, write-heavy transactional operations.</li><li>Data warehouses are built for scanning large volumes of data in complex, read-heavy analytical queries.</li></ul><p>Some database products like Microsoft SQL Server and SAP HANA support both OLTP and warehousing workloads, but typically through separate storage and query engines accessible via a common SQL interface.</p><p>Leading commercial data warehouse vendors include Teradata, Vertica, SAP HANA, and ParAccel (with Amazon Redshift as ParAccel’s cloud offering). In recent years, numerous open-source SQL-on-Hadoop projects like Apache Hive, Spark SQL, Facebook Presto, and Apache Drill have emerged, aiming to compete with these commercial systems.</p><h3>🌟Star and Snowflake Schemas: Common Analytics Data Models</h3><p>Many data warehouses adopt the <strong>star schema</strong> or dimensional modeling for organizing data:</p><ul><li><strong>Fact tables</strong> hold measurements or event data (e.g., sales transactions).</li><li><strong>Dimension tables</strong> contain descriptive attributes (e.g., products, dates, stores).</li></ul><p>A variation called the <strong>snowflake schema</strong> further normalizes dimensions into sub-dimensions — for example, separate tables for brands and product categories referenced by foreign keys in the product dimension. Snowflake schemas reduce redundancy but add complexity, while star schemas are simpler and often preferred by analysts.</p><h3>📁Columnar Storage: The Key to Analytical Query Performance</h3><p>Analytical queries typically scan millions or billions of rows, filtering and aggregating data. Traditional <strong>row-oriented</strong> storage reads entire rows from disk, including many columns irrelevant to the query, resulting in wasted I/O and CPU.</p><p><strong>Column-oriented storage</strong> solves this by storing data column-by-column, so only the columns required by a query are read and processed, greatly improving efficiency.</p><p>Because each column file contains rows in the same order, complete rows can be reconstructed by assembling values at the same position across columns.</p><h3>🔒 Compression &amp; 🚀 Speed Through Sorting</h3><p>Columnar formats enable highly effective compression since data within each column tends to be similar and repetitive. Techniques like run-length encoding or bitmap indexes reduce storage size and CPU usage.</p><p>Data is sorted by one or more columns (e.g., by date) at the row level. This ordering accelerates range queries and boosts compression, as repeated values appear in long runs.</p><p>It is possible to store data in multiple sorted arrangements, much like how row-based databases use multiple secondary indexes.</p><h3>✍️ Writing to Column Stores with LSM Trees</h3><p>Handling writes efficiently in column stores is challenging. Many modern systems use <strong>Log-Structured Merge-trees (LSM-trees)</strong>:</p><ul><li>Writes go first into an in-memory sorted structure.</li><li>When full, data is merged and flushed into sorted column files on disk in bulk.</li></ul><p>This approach turns random writes into sequential writes, improving write throughput and performance. Vertica is a notable example using this technique.</p><h3>🧮 Aggregation, Materialized Views &amp; Data Cubes</h3><p>Analytical queries often perform aggregate computations like COUNT, SUM, or AVG. Recomputing these on raw data for every query is expensive.</p><p><strong>Materialized views</strong> cache these aggregates for faster access. Updating materialized views incurs overhead, so they are more common in read-heavy data warehouses than in OLTP systems.</p><p>A special type of materialized view is the <strong>data cube (OLAP cube)</strong> — precomputed aggregates grouped by multiple dimensions. Data cubes speed up queries dramatically but reduce flexibility, as only predefined aggregates are available.</p><h3>✅ Summary: Why Warehouses Are Built Differently</h3><ul><li>OLTP and OLAP workloads have fundamentally different characteristics, requiring distinct optimizations.</li><li>Data warehouses use columnar storage, compression, and sorting to minimize disk I/O and CPU cycles.</li><li>Writing is optimized through log-structured methods like LSM-trees.</li><li>Materialized views and data cubes provide fast access to frequently needed aggregates, trading some flexibility for performance.</li></ul><p>Today’s analytical databases leverage these architectural choices to enable lightning-fast insights on massive data volumes — something traditional OLTP systems are not built to handle.</p><p>References:</p><p>Kleppmann, Martin. Designing Data-Intensive Applications. O’Reilly Media, 2017.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8d59052da763" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Is Knowledge Management? From Data to Innovation]]></title>
            <link>https://medium.com/@merveyayin/what-is-knowledge-management-from-data-to-innovation-da7ee6acb637?source=rss-d172a53c08c8------2</link>
            <guid isPermaLink="false">https://medium.com/p/da7ee6acb637</guid>
            <dc:creator><![CDATA[Merve Yayın]]></dc:creator>
            <pubDate>Thu, 22 May 2025 10:23:40 GMT</pubDate>
            <atom:updated>2025-05-22T10:33:43.605Z</atom:updated>
            <content:encoded><![CDATA[<p>This article breaks down the basics of Knowledge Management (KM), explains the difference between data and knowledge, and shows how innovative companies like Honda and Canon turn insights into action.</p><h3>🔍 Data, Information, Knowledge, Wisdom: What’s the Difference?</h3><p>These terms are often used interchangeably, but they mean different things:</p><p>🔢 <strong>Data</strong>: Raw facts without context.<br> → “It’s raining.”</p><p>📈 <strong>Information</strong>: Data put into context.<br> → “It started raining after the temperature dropped.”</p><p>🧠 <strong>Knowledge</strong>: Applying information to understand patterns.<br> → “When humidity is high and temperature drops, it often rains.”</p><p>🧓 <strong>Wisdom</strong>: Deep understanding shaped by values and experience.<br> → Using knowledge to make good decisions and predict outcomes.</p><h3>🧩 Types of Knowledge</h3><p>There are two main types of knowledge:</p><p>📄 <strong>Explicit Knowledge</strong>: Easily shared and written down. Think manuals, reports, how-to guides.</p><p>🤫 <strong>Tacit Knowledge</strong>: Personal know-how that comes from experience. It’s harder to express — like riding a bike or knowing how to negotiate.</p><h3>🏢 What Is Knowledge Management (KM)?</h3><p>Knowledge Management is the process of capturing, sharing, and using knowledge effectively within an organization.</p><p>According to researchers like Davenport and Wiig, KM helps to:</p><p>👀 Make knowledge visible</p><p>🤝 Encourage a culture of sharing</p><p>🧱 Build the right systems and tools to support it</p><p>KM involves four main steps:</p><p>📥 Collecting knowledge</p><p>🗂️ Storing it</p><p>📤 Distributing it</p><p>🚀 Applying it</p><h3>🔄 Nonaka’s SECI Model: Creating Knowledge in Action</h3><p>Ikujiro Nonaka introduced the SECI model to explain how organizations create knowledge continuously. The model has four stages:</p><ol><li><strong>🤝 Socialization</strong> — Sharing tacit knowledge through experience</li><li><strong>🗣️ Externalization</strong> — Turning tacit knowledge into explicit concepts</li><li><strong>🔗 Combination</strong> — Merging explicit knowledge into new systems</li><li><strong>📚 Internalization</strong> — Learning and applying new knowledge</li></ol><p>This forms a spiral where knowledge keeps growing and evolving.</p><h3>✅ Final Thoughts</h3><p>Knowledge Management isn’t just about storing information — it’s about turning what people know into what the company can do. Companies that manage both tacit and explicit knowledge well are more innovative, adaptable, and successful in the long run.</p><p>💡 In short:<br> 🧠 Learn from experience.<br> 📤 Share what you know.<br> ⚙️ Build systems to support it.<br> 🚀 Use it to innovate.</p><p>References:</p><p>Bellinger, G., Castro, D., &amp; Mills, A. (2004). Data, information, knowledge, and wisdom. <em>Systems Thinking, 1</em>.</p><p>Demarest, M. (1997). Understanding knowledge management. <em>Long Range Planning, 30</em>(3), 374–384. <a href="https://doi.org/10.1016/S0024-6301(97)00022-7">https://doi.org/10.1016/S0024-6301(97)00022-7</a></p><p>Farnese, M. L., Barbieri, B., Chirumbolo, A., &amp; Patriotta, G. (2019). Managing knowledge in organizations: A Nonaka’s SECI model operationalization. <em>Frontiers in Psychology, 10</em>, 2730. <a href="https://doi.org/10.3389/fpsyg.2019.02730">https://doi.org/10.3389/fpsyg.2019.02730</a></p><p>LaPlante, A. (1997, June 2). Sharing the wisdom. <em>Computerworld, 31</em>(22), 73(2).</p><p>Laberis, B. (1998, February 2). One big pile of knowledge. <em>Computerworld, 32</em>(5), 97.</p><p>Mårtensson, M. (2000). A critical review of knowledge management as a management tool. <em>Journal of Knowledge Management, 4</em>(3), 204–216. <a href="https://doi.org/10.1108/13673270010350729">https://doi.org/10.1108/13673270010350729</a></p><p>Nonaka, I., &amp; Takeuchi, H. (2007). The knowledge-creating company. <em>Harvard Business Review, 85</em>(7/8), 162–171.</p><p>Ostro, N. (1997, May). The corporate brain. <em>Chief Executive, 123</em>, 58–62.</p><p>Papows, J. (1998). <em>Enterprise.com</em>. Nicholas Breadly Publishing.</p><p>Prusak, L., &amp; Davenport, T. (1998). <em>Working knowledge: How organizations manage what they know</em>. Harvard Business School Press.</p><p>Sohrabi, S., &amp; Naghavi, M. S. (2014, November). The interaction of explicit and tacit knowledge. In <em>Proceedings of the International Conference on Intellectual Capital and Knowledge Management and Organisational Learning</em> (pp. 363–369). United Kingdom.</p><p>Wiig, K. M. (1997). Knowledge management: An introduction and perspective. <em>Journal of Knowledge Management, 1</em>(1), 6–14. <a href="https://doi.org/10.1108/13673279710182587">https://doi.org/10.1108/13673279710182587</a></p><p>Zins, C. (2007). Conceptual approaches for defining data, information, and knowledge. <em>Journal of the American Society for Information Science and Technology, 58</em>(4), 479–493. <a href="https://doi.org/10.1002/asi.20508">https://doi.org/10.1002/asi.20508</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=da7ee6acb637" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Modern Leadership Theories: From Transformation to Innovation]]></title>
            <link>https://medium.com/@merveyayin/modern-leadership-theories-from-transformation-to-innovation-5d360a9760a3?source=rss-d172a53c08c8------2</link>
            <guid isPermaLink="false">https://medium.com/p/5d360a9760a3</guid>
            <dc:creator><![CDATA[Merve Yayın]]></dc:creator>
            <pubDate>Thu, 22 May 2025 10:11:56 GMT</pubDate>
            <atom:updated>2025-05-22T10:31:03.208Z</atom:updated>
            <content:encoded><![CDATA[<p>In today’s fast-changing world, effective leadership is key to employee motivation, loyalty, and organizational success. As workplace dynamics evolve, leaders must adopt new approaches. Here’s a breakdown of the most impactful leadership theories — simplified and enriched with real-world meaning.</p><h3>🔄 1. Transformational Leadership</h3><p>Transformational leaders focus on positive change — for individuals and organizations alike. Their mission isn’t just management, but inspiration.</p><p>🎯 Key Dimensions (James C. Sarros &amp; Joseph C. Santora):</p><ul><li>💬 Individualized Consideration: Coaching, mentoring, and supporting each employee’s growth.</li><li>🌟 Inspirational Motivation: Inspiring employees with a clear vision and meaningful mission.</li><li>🧠 Intellectual Stimulation: Encouraging rational problem-solving and creativity during challenges.</li><li>✨ Idealized Influence: Acting as a role model through trust, respect, and charisma.</li></ul><p>Transformational leaders foster personal growth, boost morale, and ultimately elevate organizational success.</p><h3>🌟 2. Charismatic Leadership</h3><p>Charisma became a leadership buzzword in the 1960s and 70s. Max Weber defined it as the power to inspire through extraordinary presence and timing.</p><p>📌 Traits of Charismatic Leaders:</p><ul><li>⚡ Unique personality</li><li>⏳ Awareness of critical timing</li><li>🧩 Creative crisis-solving</li><li>💡 Followers’ belief in the leader’s vision</li></ul><p>🔍 Real-World Examples: Martin Luther King Jr., Gandhi, and leaders who inspire during change.</p><p>While charisma seems innate, it can be developed through self-awareness, strong communication, and bold vision. Charismatic leaders often spark confidence, loyalty, and high performance among followers.</p><h3>🤝 3. Leader–Member Exchange (LMX) Theory</h3><p>LMX theory focuses on the unique relationships leaders build with each team member. Unlike traditional leadership, LMX recognizes that one-size-fits-all doesn’t work.</p><p>👥 Two Relationship Types:</p><ul><li>🟢 In-Group: High trust, mutual respect, and increased opportunity.</li><li>🔴 Out-Group: Formal, limited interaction, and fewer resources.</li></ul><p>🔑 The goal: Turn more relationships into high-quality ones. Studies show strong LMX bonds improve satisfaction, loyalty, and performance. Think of it as leadership through connection — not control.</p><h3>💡 4. Innovative Leadership</h3><p>Innovative leadership combines multiple leadership styles to solve modern challenges with creativity and vision.</p><p>🎯 What Sets Innovative Leaders Apart:</p><ul><li>🧠 Broad knowledge beyond their field</li><li>🔮 Future-focused problem-solving</li><li>🌱 Encouragement of experimentation and new ideas</li><li>🔗 Deep understanding of both current and future challenges</li></ul><p>✨ Notable Examples: Atatürk, Gandhi, Martin Luther King Jr.</p><p>📚 Innovation starts with learning — but also depends on followers’ willingness to embrace change. Innovative leaders empower teams to think differently and take smart risks.</p><p>🌐 Bonus: Strong LMX relationships are key to promoting innovation in teams!</p><h3>⚖️ 5. Transactional Leadership</h3><p>Transactional leadership is all about performance-based rewards or consequences. Originally introduced by Max Weber and later expanded by Bernard Bass, it includes:</p><p>💼 3 Key Styles:</p><ul><li>🎁 Contingent Reward: Employees are rewarded when goals are met.</li><li>🧾 Management by Exception: Leaders step in only when things go wrong. Employees are given responsibility, but issues must be reported.</li><li>🙈 Laissez-Faire: Leaders stay hands-off — often resulting in poor outcomes.</li></ul><p>📉 Laissez-faire isn’t really leadership. It signals disengagement and often harms team morale.</p><p>✅ When used wisely, transactional leadership can bring structure — but it should be balanced with vision and empowerment to avoid becoming overly rigid.</p><h3>🧭 Conclusion: Mix to Lead Better</h3><p>Each leadership theory offers tools for different contexts:</p><ul><li>🌈 Transformational: Inspire, grow, and build trust.</li><li>💫 Charismatic: Influence through vision and personality.</li><li>🫂 LMX: Lead through relationships and tailored support.</li><li>🧠 Innovative: Think ahead, think differently.</li><li>💼 Transactional: Motivate with rewards, but balance it with vision and trust.</li></ul><p>Great leaders mix and adapt styles depending on their team, goals, and the challenges they face. Leadership isn’t static — it evolves just like the world around us.</p><p>References:</p><p>Achua, C. F., &amp; Lussier, R. N. (2010). <em>Effective leadership</em>. Cengage Learning.</p><p>Amabile, T. M., Schatzel, E. A., Moneta, G. B., &amp; Kramer, S. J. (2004). Leader behaviors and the work environment for creativity: Perceived leader support. <em>The Leadership Quarterly, 15</em>(1), 5–32. <a href="https://doi.org/10.1016/j.leaqua.2003.12.003">https://doi.org/10.1016/j.leaqua.2003.12.003</a></p><p>Ancona, D. G., &amp; Caldwell, D. F. (1992). Bridging the boundary: External activity and performance in organizational teams. <em>Administrative Science Quarterly, 37</em>(4), 634–665. <a href="https://doi.org/10.2307/2393475">https://doi.org/10.2307/2393475</a></p><p>Basu, R., &amp; Green, S. G. (1997). Leader–member exchange and transformational leadership: An empirical examination of innovative behaviors in leader–member dyads. <em>Journal of Applied Social Psychology, 27</em>(6), 477–499. <a href="https://doi.org/10.1111/j.1559-1816.1997.tb00643.x">https://doi.org/10.1111/j.1559-1816.1997.tb00643.x</a></p><p>Bauer, T. N., &amp; Green, S. G. (1996). Development of leader–member exchange: A longitudinal test. <em>Academy of Management Journal, 39</em>(6), 1538–1567. <a href="https://doi.org/10.5465/257068">https://doi.org/10.5465/257068</a></p><p>Bennis, W., &amp; Nanus, B. (1985). <em>Leaders: The strategies for taking charge</em>. Harper &amp; Row.</p><p>Boal, K. B., &amp; Hooijberg, R. (2000). Strategic leadership research: Moving on. <em>The Leadership Quarterly, 11</em>(4), 515–549. <a href="https://doi.org/10.1016/S1048-9843(00)00057-6">https://doi.org/10.1016/S1048-9843(00)00057-6</a></p><p>Bowen, D. E., &amp; Ostroff, C. (2004). Understanding HRM–firm performance linkages: The role of the “strength” of the HRM system. <em>Academy of Management Review, 29</em>(2), 203–221. <a href="https://doi.org/10.5465/amr.2004.12736076">https://doi.org/10.5465/amr.2004.12736076</a></p><p>Bradford, D. L., &amp; Cohen, A. R. (1984). <em>Managing for excellence: The guide to developing high performance organizations</em>. John Wiley &amp; Sons.</p><p>Demircioğlu, E. C. (2015). Karizmatik liderliğin yönetsel açıdan değerlendirilmesi. <em>Uluslararası Akademik Yönetim Bilimleri Dergisi, 1</em>(1), 52–69.</p><p>Dorfman, P. W., Howell, J. P., Cotton, B. C. C., &amp; Tate, U. (1992). Leadership within the “discontinuous hierarchy” structure of the military. In K. E. Clark, M. B. Clark, &amp; D. P. Campbell (Eds.), <em>Impact of leadership</em> (pp. 399–416). Center for Creative Leadership.</p><p>Druskat, V. U., &amp; Wheeler, J. V. (2003). Managing from the boundary: The effective leadership of self-managed work teams. <em>Academy of Management Journal, 46</em>(4), 435–457. <a href="https://doi.org/10.5465/30040637">https://doi.org/10.5465/30040637</a></p><p>Edmondson, A. C. (2003). Speaking up in the operating room: How team leaders promote learning in interdisciplinary action teams. <em>Journal of Management Studies, 40</em>(6), 1419–1452. <a href="https://doi.org/10.1111/1467-6486.00386">https://doi.org/10.1111/1467-6486.00386</a></p><p>Ellis, S., Mendel, R., &amp; Nir, M. (2006). Learning from successful and failed experience: The moderating role of kind of after-event review. <em>Journal of Applied Psychology, 91</em>(3), 669–680. <a href="https://doi.org/10.1037/0021-9010.91.3.669">https://doi.org/10.1037/0021-9010.91.3.669</a></p><p>Gelade, G. A., &amp; Ivery, M. (2003). The impact of human resource management and work climate on organizational performance. <em>Personnel Psychology, 56</em>(2), 383–404. <a href="https://doi.org/10.1111/j.1744-6570.2003.tb00155.x">https://doi.org/10.1111/j.1744-6570.2003.tb00155.x</a></p><p>Gilmore, D. C., Beehr, T. A., &amp; Richter, D. J. (1979). Effects of leader behaviors on subordinate performance and satisfaction: A laboratory experiment with student employees. <em>Journal of Applied Psychology, 64</em>(2), 166–172. <a href="https://doi.org/10.1037/0021-9010.64.2.166">https://doi.org/10.1037/0021-9010.64.2.166</a></p><p>Kanter, R. M. (1983). <em>The change masters: Innovation and entrepreneurship in the American corporation</em>. Simon &amp; Schuster.</p><p>Keller, R. T. (2006). Transformational leadership, initiating structure, and substitutes for leadership: A longitudinal study of research and development project team performance. <em>Journal of Applied Psychology, 91</em>(1), 202–210. <a href="https://doi.org/10.1037/0021-9010.91.1.202">https://doi.org/10.1037/0021-9010.91.1.202</a></p><p>Kim, H., &amp; Yukl, G. (1995). Relationships of self-reported and subordinate-reported leadership behaviors to managerial effectiveness and advancement. <em>Leadership Quarterly, 6</em>(3), 361–377. <a href="https://doi.org/10.1016/1048-9843(95)90016-0">https://doi.org/10.1016/1048-9843(95)90016-0</a></p><p>Kotter, J. P., &amp; Cohen, D. S. (2002). <em>The heart of change: Real-life stories of how people change their organizations</em>. Harvard Business School Press.</p><p>Kouzes, J. M., &amp; Posner, B. Z. (2008). We lead from the inside out. <em>The Journal of Values-Based Leadership, 1</em>(1), 5.</p><p>Liden, R. C., &amp; Maslyn, J. M. (1998). Multidimensionality of leader–member exchange: An empirical assessment through scale development. <em>Journal of Management, 24</em>(1), 43–72. <a href="https://doi.org/10.1016/S0149-2063(99)80053-1">https://doi.org/10.1016/S0149-2063(99)80053-1</a></p><p>Lieberson, S., &amp; O’Connor, J. F. (1972). Leadership and organizational performance: A study of large corporations. <em>American Sociological Review, 37</em>(1), 117–130. <a href="https://doi.org/10.2307/2094020">https://doi.org/10.2307/2094020</a></p><p>McDonough, E. F., &amp; Barczak, G. (1991). Speeding up new product development: The effects of leadership style and source of technology. <em>Journal of Product Innovation Management, 8</em>(3), 203–211. <a href="https://doi.org/10.1016/0737-6782(91)90019-5">https://doi.org/10.1016/0737-6782(91)90019-5</a></p><p>Madanchian, M., Hussein, N., Noordin, F., &amp; Taherdoost, H. (2017). Leadership effectiveness measurement and its effect on organization outcomes. <em>Procedia Engineering, 181</em>, 1043–1048. <a href="https://doi.org/10.1016/j.proeng.2017.02.505">https://doi.org/10.1016/j.proeng.2017.02.505</a></p><p>Phillips, A. S., &amp; Bedeian, A. G. (1994). Leader–follower exchange quality: The role of personal and interpersonal attributes. <em>Academy of Management Journal, 37</em>(4), 990–1001. <a href="https://doi.org/10.5465/256606">https://doi.org/10.5465/256606</a></p><p>Sarros, J. C., &amp; Santora, J. C. (2001). The transformational–transactional leadership model in practice. <em>Leadership &amp; Organization Development Journal, 22</em>(8), 383–394. <a href="https://doi.org/10.1108/01437730110411006">https://doi.org/10.1108/01437730110411006</a></p><p>Sultan, A. (2020). <em>Effective leadership and its impact on organisational performance: Retail industry (Tesco)</em> [Doctoral dissertation, University of the West of Scotland].</p><p>Van Breukelen, W., Schyns, B., &amp; Le Blanc, P. (2006). Leader–member exchange theory and research: Accomplishments and future challenges. <em>Leadership, 2</em>(3), 295–316. <a href="https://doi.org/10.1177/1742715006066023">https://doi.org/10.1177/1742715006066023</a></p><p>Van Fleet, D. D., &amp; Yukl, G. (1986). <em>Military leadership: An organizational perspective</em>. JAI Press.</p><p>Wikoff, M., Anderson, D. G., &amp; Crowell, C. R. (1983). Behavior management in a factory setting: Increasing work efficiency. <em>Journal of Organizational Behavior Management, 4</em>(1), 97–128. <a href="https://doi.org/10.1300/J075v04n01_07">https://doi.org/10.1300/J075v04n01_07</a></p><p>Yammarino, F. J. (2013). Leadership: Past, present, and future. <em>Journal of Leadership &amp; Organizational Studies, 20</em>(2), 149–155. <a href="https://doi.org/10.1177/1548051812471559">https://doi.org/10.1177/1548051812471559</a></p><p>Yukl, G. (1999). An evaluative essay on current conceptions of effective leadership. <em>European Journal of Work and Organizational Psychology, 8</em>(1), 33–48. <a href="https://doi.org/10.1080/135943299398429">https://doi.org/10.1080/135943299398429</a></p><p>Yukl, G. (2008). How leaders influence organizational effectiveness. <em>The Leadership Quarterly, 19</em>(6), 708–722. <a href="https://doi.org/10.1016/j.leaqua.2008.09.008">https://doi.org/10.1016/j.leaqua.2008.09.008</a></p><p>Yukl, G., Wall, S., &amp; Lepsinger, R. (1990). Preliminary report on validation of the managerial practices survey. In K. E. Clark &amp; M. B. Clark (Eds.), <em>Measures of leadership</em> (pp. 223–238). Leadership Library of America.</p><p>Şen, A., &amp; Eren, E. (2012). Innovative leadership for the twenty-first century. <em>Procedia — Social and Behavioral Sciences, 41</em>, 1–14. <a href="https://doi.org/10.1016/j.sbspro.2012.04.001">https://doi.org/10.1016/j.sbspro.2012.04.001</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5d360a9760a3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Leadership Effectiveness]]></title>
            <link>https://medium.com/@merveyayin/leadership-effectiveness-0af2c7a2bbe0?source=rss-d172a53c08c8------2</link>
            <guid isPermaLink="false">https://medium.com/p/0af2c7a2bbe0</guid>
            <dc:creator><![CDATA[Merve Yayın]]></dc:creator>
            <pubDate>Thu, 22 May 2025 07:57:20 GMT</pubDate>
            <atom:updated>2025-05-22T10:32:10.058Z</atom:updated>
            <content:encoded><![CDATA[<p>Leadership plays a key role in shaping how well an organization performs. While many factors influence success — like employee performance, clear goals, and smart decisions — strong leadership is often what ties everything together</p><h3>So, what does it mean to be an effective leader?</h3><p>To understand this better, we can look at Gary Yukl’s work on leadership behavior (2008). He identified three types of behaviors that help leaders succeed:</p><p>🛠️Task-Oriented Behaviors</p><p>These are about getting things done — setting goals, organizing work, and solving problems to improve efficiency.</p><p>🤝Relations-Oriented Behaviors</p><p>These focus on people — building trust, supporting team members, and creating a positive and collaborative environment.</p><p>🔄 Change-Oriented Behaviors</p><p>These help organizations adapt — encouraging innovation, leading through uncertainty, and preparing for the future.</p><p>🌍 External Leadership Behaviors</p><p>These behaviors focus on interactions with external stakeholders and the broader environment.</p><h3>🛠️ Task- Oriented Behaviors</h3><p>According to Gary Yukl (2008), task-oriented behaviors focus on using resources — such as human capital, time, and equipment — to help the team achieve its goals. These behaviors include planning and scheduling tasks, assigning responsibilities, clarifying priorities, coordinating work, solving daily problems, and monitoring operations.</p><p>​​The main goal is to improve productivity — getting more done with fewer resources. This means eliminating unnecessary steps in a process, reducing errors, and making sure resources are used efficiently.</p><p>To manage task-oriented behaviors effectively, the organization’s structure and the tools used (such as management software) matter. These tools help leaders assign tasks properly, communicate goals clearly, and track progress. However, there’s no “one-size-fits-all” solution — each company needs to choose systems and structures that fit its unique needs</p><h3>🤝 Relation-Oriented Behaviors</h3><p>Gary Yukl (2008) describes relation-oriented behaviors as actions that focus on building strong interpersonal relationships within a team. These behaviors play a critical role in leadership effectiveness, as they directly influence trust, collaboration, and ultimately, organizational performance. Yukl groups them into four key categories: supporting, developing, recognizing, and empowering.</p><p>🔹 Supporting<br> Supportive behaviors involve building trust, encouraging team members, and offering emotional support — especially during challenging or stressful times. They also include resolving interpersonal conflicts. (e.g., Kim &amp; Yukl, 1995; Druskat &amp; Wheeler, 2003).</p><p>🔹 Developing<br> Developing behaviors are about helping team members grow. This includes offering career advice, sharing learning opportunities, and allowing employees to apply new skills. Training new team members is also part of this. Leaders who invest in development tend to foster stronger, more capable teams (e.g., Tannenbaum et al., 1998).</p><p>🔹 Recognizing<br> Recognition involves acknowledging good work — whether through bonuses, promotions, or simple words of appreciation. When employees feel recognized, their motivation and performance often improve significantly (Wikoff, Anderson &amp; Crowell, 1983).</p><p>🔹 Empowering<br> Empowering behaviors give employees a voice in decision-making. This can boost confidence and engagement — but only when done thoughtfully. Giving too much responsibility too soon, or ignoring team input, can backfire. (e.g., Shipper &amp; Wilson, 1992).</p><p>In summary, relation-oriented leaders build trust, help people grow, celebrate progress, and involve their teams in meaningful ways. These human-focused behaviors are essential for long-term success — not just for the team, but for the entire organization.</p><h3>🔄 Change-Oriented Behaviors</h3><p>Change is inevitable — and how an organization responds to it often defines its success. Change-oriented leadership is all about helping a company adapt to new conditions, embrace innovation, and continuously improve. According to Gary Yukl (2012), there are four key behaviors that define this leadership style: advocating change, envisioning change, encouraging innovation, and facilitating collective learning.</p><p>🔹 Advocating Change<br> One of the most critical roles of a leader is to explain why change is necessary — and to help the team understand and embrace it. Resistance to change is one of the most common challenges in organizations. Effective leaders reduce that resistance by communicating the urgency of the situation clearly and involving employees in the process.</p><p>🔹 Envisioning Change<br> Great leaders are forward-thinkers. They anticipate future shifts and plan for them thoughtfully. While setting bold visions is important, it’s equally critical to remain realistic. Emotional and inspiring communication helps teams connect with a shared vision. (Kotter &amp; Cohen, 2002).</p><p>🔹 Encouraging Innovation<br> Innovation doesn’t happen by accident — it needs to be nurtured. Leaders can inspire creativity by encouraging team members to share new ideas, and take calculated risks. Over time, this mindset can become part of the company culture. Studies have shown that innovative teams often emerge under leaders who actively promote creative thinking (Keller, 2006).</p><p>🔹 Facilitating Collective Learning<br> Change-oriented leaders also help teams grow by learning together. This can take many forms — from research initiatives and pilot experiments to learning from mistakes and conducting benchmarking studies. Creating a culture where the team learns as a unit strengthens both resilience and performance (Ellis et al., 2006).</p><p>In short, change-oriented leaders prepare their organizations not just to survive change — but to grow through it. They create space for new ideas, align teams around a shared vision, and build a culture of continuous learning.</p><h3>🌍 External Leadership Behaviors</h3><p>External leadership behaviors are essential for leaders to effectively perceive and respond to external influences. These behaviors are especially critical in industries with fast-paced competition and constant change. Gary Yukl (2012) identifies three key behaviors in this category: <strong>Networking</strong>, <strong>External Monitoring</strong>, and <strong>Representing</strong>.</p><p>🔹 Networking<strong><br> </strong>Networking is about expanding relationships both within and outside the organization. Leaders can encourage employees to attend professional conferences or informal meet-ups to connect with others in the industry. Expanding the network provides valuable insights and fosters information exchange. (Amabile et al., 2004).</p><p>🔹 External Monitoring<strong><br> </strong>External monitoring involves staying updated on industry trends, competitor behavior, and changes in the external environment. Leaders gather information from industry reports, publications, and their professional networks. A deep understanding of these external changes is essential for making informed decisions and is associated with improved company performance (Druskat &amp; Wheeler, 2003).</p><p>🔹<strong> </strong>Representing<strong><br> </strong>Leaders must also represent their team effectively. This involves advocating for the team within the organization and externally to clients, suppliers, and stakeholders. Leaders need to defend their team’s interests when making decisions with senior management and other external parties. Research shows that leaders who can effectively represent their teams are more likely to be successful in their roles (e.g., Ancona &amp; Caldwell, 1992; Yukl, Wall, &amp; Lepsinger, 1990).</p><p>In summary, external leadership behaviors are all about building relationships, staying informed, and representing the team to ensure success in a competitive environment.</p><p>References:</p><p>Achua, C. F., &amp; Lussier, R. N. (2010). <em>Effective leadership</em>. Cengage Learning.</p><p>Amabile, T. M., Schatzel, E. A., Moneta, G. B., &amp; Kramer, S. J. (2004). Leader behaviors and the work environment for creativity: Perceived leader support. <em>The Leadership Quarterly, 15</em>(1), 5–32. <a href="https://doi.org/10.1016/j.leaqua.2003.12.003">https://doi.org/10.1016/j.leaqua.2003.12.003</a></p><p>Ancona, D. G., &amp; Caldwell, D. F. (1992). Bridging the boundary: External activity and performance in organizational teams. <em>Administrative Science Quarterly, 37</em>(4), 634–665. <a href="https://doi.org/10.2307/2393475">https://doi.org/10.2307/2393475</a></p><p>Basu, R., &amp; Green, S. G. (1997). Leader–member exchange and transformational leadership: An empirical examination of innovative behaviors in leader–member dyads. <em>Journal of Applied Social Psychology, 27</em>(6), 477–499. <a href="https://doi.org/10.1111/j.1559-1816.1997.tb00643.x">https://doi.org/10.1111/j.1559-1816.1997.tb00643.x</a></p><p>Bauer, T. N., &amp; Green, S. G. (1996). Development of leader–member exchange: A longitudinal test. <em>Academy of Management Journal, 39</em>(6), 1538–1567. <a href="https://doi.org/10.5465/257068">https://doi.org/10.5465/257068</a></p><p>Bennis, W., &amp; Nanus, B. (1985). <em>Leaders: The strategies for taking charge</em>. Harper &amp; Row.</p><p>Boal, K. B., &amp; Hooijberg, R. (2000). Strategic leadership research: Moving on. <em>The Leadership Quarterly, 11</em>(4), 515–549. <a href="https://doi.org/10.1016/S1048-9843(00)00057-6">https://doi.org/10.1016/S1048-9843(00)00057-6</a></p><p>Bowen, D. E., &amp; Ostroff, C. (2004). Understanding HRM–firm performance linkages: The role of the “strength” of the HRM system. <em>Academy of Management Review, 29</em>(2), 203–221. <a href="https://doi.org/10.5465/amr.2004.12736076">https://doi.org/10.5465/amr.2004.12736076</a></p><p>Bradford, D. L., &amp; Cohen, A. R. (1984). <em>Managing for excellence: The guide to developing high performance organizations</em>. John Wiley &amp; Sons.</p><p>Demircioğlu, E. C. (2015). Karizmatik liderliğin yönetsel açıdan değerlendirilmesi. <em>Uluslararası Akademik Yönetim Bilimleri Dergisi, 1</em>(1), 52–69.</p><p>Dorfman, P. W., Howell, J. P., Cotton, B. C. C., &amp; Tate, U. (1992). Leadership within the “discontinuous hierarchy” structure of the military. In K. E. Clark, M. B. Clark, &amp; D. P. Campbell (Eds.), <em>Impact of leadership</em> (pp. 399–416). Center for Creative Leadership.</p><p>Druskat, V. U., &amp; Wheeler, J. V. (2003). Managing from the boundary: The effective leadership of self-managed work teams. <em>Academy of Management Journal, 46</em>(4), 435–457. <a href="https://doi.org/10.5465/30040637">https://doi.org/10.5465/30040637</a></p><p>Edmondson, A. C. (2003). Speaking up in the operating room: How team leaders promote learning in interdisciplinary action teams. <em>Journal of Management Studies, 40</em>(6), 1419–1452. <a href="https://doi.org/10.1111/1467-6486.00386">https://doi.org/10.1111/1467-6486.00386</a></p><p>Ellis, S., Mendel, R., &amp; Nir, M. (2006). Learning from successful and failed experience: The moderating role of kind of after-event review. <em>Journal of Applied Psychology, 91</em>(3), 669–680. <a href="https://doi.org/10.1037/0021-9010.91.3.669">https://doi.org/10.1037/0021-9010.91.3.669</a></p><p>Gelade, G. A., &amp; Ivery, M. (2003). The impact of human resource management and work climate on organizational performance. <em>Personnel Psychology, 56</em>(2), 383–404. <a href="https://doi.org/10.1111/j.1744-6570.2003.tb00155.x">https://doi.org/10.1111/j.1744-6570.2003.tb00155.x</a></p><p>Gilmore, D. C., Beehr, T. A., &amp; Richter, D. J. (1979). Effects of leader behaviors on subordinate performance and satisfaction: A laboratory experiment with student employees. <em>Journal of Applied Psychology, 64</em>(2), 166–172. <a href="https://doi.org/10.1037/0021-9010.64.2.166">https://doi.org/10.1037/0021-9010.64.2.166</a></p><p>Kanter, R. M. (1983). <em>The change masters: Innovation and entrepreneurship in the American corporation</em>. Simon &amp; Schuster.</p><p>Keller, R. T. (2006). Transformational leadership, initiating structure, and substitutes for leadership: A longitudinal study of research and development project team performance. <em>Journal of Applied Psychology, 91</em>(1), 202–210. <a href="https://doi.org/10.1037/0021-9010.91.1.202">https://doi.org/10.1037/0021-9010.91.1.202</a></p><p>Kim, H., &amp; Yukl, G. (1995). Relationships of self-reported and subordinate-reported leadership behaviors to managerial effectiveness and advancement. <em>Leadership Quarterly, 6</em>(3), 361–377. <a href="https://doi.org/10.1016/1048-9843(95)90016-0">https://doi.org/10.1016/1048-9843(95)90016-0</a></p><p>Kotter, J. P., &amp; Cohen, D. S. (2002). <em>The heart of change: Real-life stories of how people change their organizations</em>. Harvard Business School Press.</p><p>Kouzes, J. M., &amp; Posner, B. Z. (2008). We lead from the inside out. <em>The Journal of Values-Based Leadership, 1</em>(1), 5.</p><p>Liden, R. C., &amp; Maslyn, J. M. (1998). Multidimensionality of leader–member exchange: An empirical assessment through scale development. <em>Journal of Management, 24</em>(1), 43–72. <a href="https://doi.org/10.1016/S0149-2063(99)80053-1">https://doi.org/10.1016/S0149-2063(99)80053-1</a></p><p>Lieberson, S., &amp; O’Connor, J. F. (1972). Leadership and organizational performance: A study of large corporations. <em>American Sociological Review, 37</em>(1), 117–130. <a href="https://doi.org/10.2307/2094020">https://doi.org/10.2307/2094020</a></p><p>McDonough, E. F., &amp; Barczak, G. (1991). Speeding up new product development: The effects of leadership style and source of technology. <em>Journal of Product Innovation Management, 8</em>(3), 203–211. <a href="https://doi.org/10.1016/0737-6782(91)90019-5">https://doi.org/10.1016/0737-6782(91)90019-5</a></p><p>Madanchian, M., Hussein, N., Noordin, F., &amp; Taherdoost, H. (2017). Leadership effectiveness measurement and its effect on organization outcomes. <em>Procedia Engineering, 181</em>, 1043–1048. <a href="https://doi.org/10.1016/j.proeng.2017.02.505">https://doi.org/10.1016/j.proeng.2017.02.505</a></p><p>Phillips, A. S., &amp; Bedeian, A. G. (1994). Leader–follower exchange quality: The role of personal and interpersonal attributes. <em>Academy of Management Journal, 37</em>(4), 990–1001. <a href="https://doi.org/10.5465/256606">https://doi.org/10.5465/256606</a></p><p>Sarros, J. C., &amp; Santora, J. C. (2001). The transformational–transactional leadership model in practice. <em>Leadership &amp; Organization Development Journal, 22</em>(8), 383–394. <a href="https://doi.org/10.1108/01437730110411006">https://doi.org/10.1108/01437730110411006</a></p><p>Sultan, A. (2020). <em>Effective leadership and its impact on organisational performance: Retail industry (Tesco)</em> [Doctoral dissertation, University of the West of Scotland].</p><p>Van Breukelen, W., Schyns, B., &amp; Le Blanc, P. (2006). Leader–member exchange theory and research: Accomplishments and future challenges. <em>Leadership, 2</em>(3), 295–316. <a href="https://doi.org/10.1177/1742715006066023">https://doi.org/10.1177/1742715006066023</a></p><p>Van Fleet, D. D., &amp; Yukl, G. (1986). <em>Military leadership: An organizational perspective</em>. JAI Press.</p><p>Wikoff, M., Anderson, D. G., &amp; Crowell, C. R. (1983). Behavior management in a factory setting: Increasing work efficiency. <em>Journal of Organizational Behavior Management, 4</em>(1), 97–128. <a href="https://doi.org/10.1300/J075v04n01_07">https://doi.org/10.1300/J075v04n01_07</a></p><p>Yammarino, F. J. (2013). Leadership: Past, present, and future. <em>Journal of Leadership &amp; Organizational Studies, 20</em>(2), 149–155. <a href="https://doi.org/10.1177/1548051812471559">https://doi.org/10.1177/1548051812471559</a></p><p>Yukl, G. (1999). An evaluative essay on current conceptions of effective leadership. <em>European Journal of Work and Organizational Psychology, 8</em>(1), 33–48. <a href="https://doi.org/10.1080/135943299398429">https://doi.org/10.1080/135943299398429</a></p><p>Yukl, G. (2008). How leaders influence organizational effectiveness. <em>The Leadership Quarterly, 19</em>(6), 708–722. <a href="https://doi.org/10.1016/j.leaqua.2008.09.008">https://doi.org/10.1016/j.leaqua.2008.09.008</a></p><p>Yukl, G., Wall, S., &amp; Lepsinger, R. (1990). Preliminary report on validation of the managerial practices survey. In K. E. Clark &amp; M. B. Clark (Eds.), <em>Measures of leadership</em> (pp. 223–238). Leadership Library of America.</p><p>Şen, A., &amp; Eren, E. (2012). Innovative leadership for the twenty-first century. <em>Procedia — Social and Behavioral Sciences, 41</em>, 1–14. <a href="https://doi.org/10.1016/j.sbspro.2012.04.001">https://doi.org/10.1016/j.sbspro.2012.04.001</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0af2c7a2bbe0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Moving Beyond Primary Indexes: Introducing Secondary Indexes]]></title>
            <link>https://medium.com/@merveyayin/moving-beyond-primary-indexes-introducing-secondary-indexes-6ab6291b5e6f?source=rss-d172a53c08c8------2</link>
            <guid isPermaLink="false">https://medium.com/p/6ab6291b5e6f</guid>
            <dc:creator><![CDATA[Merve Yayın]]></dc:creator>
            <pubDate>Thu, 15 May 2025 10:51:07 GMT</pubDate>
            <atom:updated>2025-05-15T13:55:05.311Z</atom:updated>
            <content:encoded><![CDATA[<p>Up until now, we’ve focused on the data structures used for primary indexes. However, real-world business requirements often call for indexing across multiple columns — something primary indexes alone cannot efficiently support. In such scenarios, secondary indexes come into play.</p><p>Secondary indexes are also built using key-value indexing techniques, but they differ from primary indexes in one key way: they allow multiple values to be associated with the same key. This is because the column used for a secondary index doesn’t need to contain unique values for every row.</p><p>📦 How Is Data Stored in Secondary Indexes?</p><p>Just like primary indexes, secondary indexes can be implemented using B-Trees or log-structured approaches such as LSM-Trees. When storing data in an index, it’s not common to store the full data record as the value. Instead, most systems store a pointer to the actual data in the heap. This design avoids duplication — especially when a single row is referenced by multiple indexes — and keeps the index size minimal.</p><p>There are typically two strategies:</p><ul><li>Key-Value Approach: The index stores (key, value) pairs, where value is the full record or relevant fields.</li><li>Key-Pointer Approach: The index stores a (key, pointer) pair, where the pointer leads to the data in the heap.</li></ul><p>Using pointers has advantages: when a data update occurs, the record can be overwritten directly in the heap without modifying the index. However, if the updated data no longer fits in its original location, the heap address must change — requiring an index update.</p><p>One downside of using pointers is that every read operation involves a lookup in the index followed by a jump to the heap, which can hurt performance. A common optimization is to store the primary key in secondary indexes. This way, lookups can first resolve to the primary key, and from there quickly find the full data without needing to access memory twice — improving read efficiency significantly.</p><p>​​🔗 Multi-Column Indexes: Combining Keys for Smarter Lookups</p><p>In some cases, filtering or sorting based on multiple columns is essential — for example, retrieving users by (last_name, first_name). While key-value indexes are typically built on a single column, multi-column (or concatenated) indexes allow us to combine multiple columns into a single index key. These indexes are sorted first by the leading column, and then by subsequent columns. For instance, an index on (last_name, first_name) is ordered by last_name; within each last_name group, entries are sorted by first_name. This structure significantly improves performance for queries that filter or sort by both fields.</p><h3>However, it’s important to note that these indexes are most effective when the query includes the leading column — skipping it may render the index unusable.</h3><p>References:</p><p>Kleppmann, Martin. Designing Data-Intensive Applications. O’Reilly Media, 2017.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6ab6291b5e6f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>