# BigAl > PostgreSQL-optimized TypeScript ORM Built exclusively for Postgres. Type-safe fluent query builder, decorator-based models, and queries tuned for Postgres performance. ## Table of Contents ### Introduction - [Getting Started](/getting-started.md): Install BigAl, define your first model with decorators, initialize a repository, and run type-safe PostgreSQL queries. ### Guide - [Models](/guide/models.md): Define PostgreSQL tables as TypeScript classes with decorators for columns, primary keys, relationships, and automatic timestamps. - [Querying](/guide/querying.md): Fluent query builder for find, findOne, and count with filters, pagination, sorting, opt-in row locks, DISTINCT ON, and populate. - [CRUD Operations](/guide/crud-operations.md): Create, update, and destroy records with RETURNING support, query projection, and ON CONFLICT upserts. - [Transactions](/guide/transactions.md): Run managed PostgreSQL transactions with typed repositories, explicit row locks, isolation levels, and transaction-local timeouts. - [Relationships](/guide/relationships.md): Many-to-one, one-to-many, and many-to-many relationships with decorators, QueryResult type narrowing, and populate options. - [Subqueries and Joins](/guide/subqueries-and-joins.md): Type-safe subqueries for WHERE IN, EXISTS, and scalar comparisons. Model joins, subquery joins, aggregates, GROUP BY, and HAVING. - [Views and Readonly Repositories](/guide/views.md): Map PostgreSQL views to readonly models with ReadonlyRepository. Supports inheritance, schema options, and all query features. ### Reference - [API Reference](/reference/api.md): Complete API reference for BigAl - initialization, transactions, repositories, query builders, subqueries, decorators, and types. - [Configuration](/reference/configuration.md): Configure connection pools (postgres-pool, pg, Neon), read replicas, multiple databases, and debug logging. ### Compare - [BigAl vs Prisma](/compare/bigal-vs-prisma.md): Compare BigAl and Prisma ORM 7 for PostgreSQL - schema definition, migrations, JSONB, pgvector, row locks, transactions, and runtime support. - [BigAl vs Drizzle](/compare/bigal-vs-drizzle.md): Compare BigAl and Drizzle ORM for PostgreSQL - query style, schema definition, migrations, JSONB, pgvector, row locks, and runtimes. - [BigAl vs TypeORM](/compare/bigal-vs-typeorm.md): Compare BigAl and TypeORM 1.x for PostgreSQL - decorator models, migrations, JSONB, pgvector, row locks, type safety, and dependencies. - [BigAl vs Kysely](/compare/bigal-vs-kysely.md): Compare BigAl and Kysely for PostgreSQL - ORM vs query builder, relationships, migrations, JSONB, pgvector, row locks, CTEs, and runtimes. ### Advanced - [BigAl vs Raw SQL](/advanced/bigal-vs-raw-sql.md): When to use BigAl vs raw SQL, with a side-by-side translation table mapping common SQL queries to BigAl's fluent API. - [Known Issues](/advanced/known-issues.md): Known issues and workarounds - optional collections, NotEntity for JSON objects with id fields, and DEBUG_BIGAL logging.