Share E-Book

Vector Databases A Practical Introduction (Nitin Borwankar) (z-library.sk, 1lib.sk, z-lib.sk) (1)

Author Nitin Borwankar

Database
Language English

In this hands-on guide, author Nitin Borwankar takes you through the why, what, and how of vector databases, starting with the basic theory behind vector embeddings and progressing to building applications with real-world tools. You'll learn about Word2vec, how to convert open source SQL databases like SQLite3 and PostgreSQL into vector databases, and integrate them into retrieval-augmented generation (RAG) applications. Whether you're a Python developer, data engineer, or ML practitioner, this book gives you the foundation to leverage vector databases confidently in your AI projects.

Format EPUB
Size 5.7 MB
4
Views
0
Downloads
0.00
Total Donations

AI Guide

AI Reading Assistant

Whole-book reading guide from stratified index samples; jump to passages in the text

Full assistant
AI guide
【One-Line Pitch】 A hands-on guide for Python developers, data engineers, and ML practitioners who want to understand vector embeddings and build practical semantic search and RAG applications by extending familiar SQL databases like SQLite and PostgreSQL with vector capabilities. 【Book Arc】 - **Opening (~0%–12%)**: Introduces the book's mission—bridging the gap between traditional relational databases and AI-driven semantic search. The author establishes a clear philosophy: rather than adopting specialized vector databases, the book focuses on adding vector extensions to well-known open source SQL databases (SQLite3, PostgreSQL) to minimize onboarding friction. Applications are explicitly positioned as learning tools, not web-scale production systems. - **Early (~16%–24%)**: Lays the conceptual foundation. Chapter 1 explains why unstructured data (text, images, audio) requires semantic search over keyword matching, introducing the vector data type, similarity search, and core operations like cosine similarity and nearest-neighbor search. Chapter 2 dives into embeddings—their history, mathematical basis, and how proximity in vector space captures semantic meaning—bridging raw data and machine-processable representations. - **Early (~27%–35%)**: Moves into practical implementation with FAISS (Facebook AI Similarity Search), treating it as both a production search engine and a flexible toolkit for building custom vector databases. The focus is on CPU-based implementations for accessibility, covering the internals of efficient similarity search at scale and how to extend systems like sqlite-vss. - **Middle (~39%–47%)**: Transitions to building applications, with chapters on semantic search and RAG systems. The book emphasizes integrating vector search with relational databases, using local LLMs for RAG, and building personal-scale systems that combine structured metadata with vector similarity. It culminates in a forward-looking proposal for a Vector Query Language (VQL) to standardize the fragmented vector database landscape. - **Late (~57%–76%)**: Returns to fundamentals with deeper explanations of vector data as a new data type, contrasting it with BLOBs and keyword search. It explores why relational databases are built on "accounting arithmetic" and why they lack native vector operations, then surveys NoSQL extensions (Redis, MongoDB, Elasticsearch, Cassandra) and their limitations, ultimately advocating for hybrid architectures using PostgreSQL with pgvector for department-level applications. 【Key Takeaways】 - **Semantic search solves intent, not just keywords** (Early): Unlike keyword matching, which fails when wording differs (e.g., "get my money back" vs. "refund policy"), semantic search maps meaning to find relevant answers even with different phrasing. This is the core motivation for vector databases. - **Embeddings preserve context through vector proximity** (Early): The embedding process converts unstructured data into lists of floats where semantic closeness corresponds to geometric closeness. This enables operations like the famous analogy: Vec("Queen") ≈ Vec("King") – Vec("Man") + Vec("Woman"). - **Vector operations go beyond storage** (Late): The vector data type introduces specialized operations—cosine similarity for meaning comparison, approximate nearest-neighbor (ANN) search for finding close vectors, and vector arithmetic for discovering relationships. ANN is sufficient for GenAI because these applications are inherently probabilistic. - **SQL databases lack native vector support** (Late): Storing vectors as float arrays in traditional RDBMS is inefficient because standard indexes aren't optimized for similarity search, and SQL lacks vector-specific operations. This is why extensions like pgvector are necessary. - **Hybrid architectures combine the best of both worlds** (Late): Real-world systems need both structured business data and vector data. The book advocates for hybrid designs—using PostgreSQL with pgvector for enterprise department-level applications, which handles small to midsize systems without requiring billion-vector scale. - **NoSQL vector extensions are retrofits, not solutions** (Late): While Redis, MongoDB, Elasticsearch, and Cassandra offer vector capabilities, they suffer from performance issues, limited functionality, scalability problems, and integration complexity compared with purpose-built systems. Choose them only when vectors are a secondary concern. - **A standardized Vector Query Language is needed** (Middle): The book proposes VQL, an SQL-inspired language for vector databases, to serve application developers, database maintainers, and AI researchers. It defines a data model and query syntax covering similarity, hybrid, range, and batch operations, aiming to start community consensus. 【Reading Tips】 - **Skim the front matter and chapter overviews** (Early ~24%): The "What's in This Book" section provides an excellent roadmap. Use it to decide which chapters matter most for your goals—whether you're focused on RAG, FAISS internals, or hybrid database design. - **Deep-read Chapters 1–2 for conceptual grounding** (Early): The distinction between keyword and semantic search, plus the embedding process, is essential for everything that follows. Pay special attention to the "money back" and "laptop won't turn on" examples—they crystallize the value proposition. - **Treat code examples as learning tools, not production templates** (Opening): The author explicitly warns these applications are for hands-on learning. Expect to modify and extend them. Download the supplemental code from GitHub to follow along. - **Focus on the hybrid database philosophy** (Late): The book's opinionated stance—adding vector extensions to SQLite and PostgreSQL rather than adopting specialized databases—is its unique angle. Understand why this matters for your own projects before diving into implementation details. - **Watch for the VQL proposal** (Middle ~47%): Chapter 9 is forward-looking and somewhat experimental. If you're building cross-vendor tools or want to influence standardization, this is worth careful reading; otherwise, skim it for awareness. 【Coverage Limits】 This guide synthesizes excerpts covering roughly the first 76% of the book, including front matter, chapter overviews, and core conceptual material. Detailed walkthroughs of specific RAG application chapters and the complete VQL specification are not fully covered in the available excerpts.

Passage locations

Excerpt 1
d related trade dress are trademarks of O’Reilly Media, Inc. The views expressed in this work are those of the author and do not represent the publisher’s vi...
View in text
Excerpt 2
ke them your own. And now let’s dive into the contents.
View in text
Excerpt 3
re semantic relationships that keyword search misses (e.g.
View in text
Excerpt 4
ntic relationships that keyword search misses (e.g., connecting “neural network optimization” with “gradient descent improvements”) Leverages PostgreSQL with...
View in text

Recommended for You

Loading recommended books...
Failed to load, please try again later

Tip the Site

Scan the WeChat Pay or Alipay code to tip. No login required.

WeChat Pay
Alipay
Back to List