{"repo":"alextanhongpin/database-design","free":true,"listed":false,"github":"https://github.com/alextanhongpin/database-design","clone":"git clone https://github.com/alextanhongpin/database-design.git","description":"Ideas on better database design","language":"Go","stars":500,"topics":["database","design","nodejs","mysql","golang"],"license":null,"category":"databases-storage","readme_excerpt":"Database Design I'm trying to spend more time to organize and write higher quality content. Would be great if you could support me! Book https://alextanhongpin.github.io/practical-postgresql/ Posgres 15 - Merge command - public schema no longer recommended, namespace instead? - use BRIN index for created at column? Postgres 14 in 2023 - use identity columns instead of serial - use generated columns instead of triggers if you need a column with computed values within the same table - tstzrange and tstzrmultirange becomes a superpower for time-based applications (appointments, scheduling, temporal, slowly-changing-dimensions etc) - array/jsonb defies the 1NF but leads to evolution in db schema - triggers are not evil - it's a superpower to those who masters it - embedding custom domain and types should be a norm and preferred over jsonb (except for highly unstructured data) About Useful tips for designing a robust database schema. This guide is more of a decision reference (1) for people wanting to design better database schemas for startups (2). - Decision reference: You will probably come across any one of the problems below when designing database schema (e.g. should I use JSONB ? How do I design tagging schema? How do I keep historical records?) and be presented with different options and trade-offs. If two standards are equal (should table name be singular or plural), then it's up to you to pick one and make it a standard and keeping it consistent. Rather than giving you a","default_branch":null,"files":null,"tree":[],"storefront":"/r/alextanhongpin","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/alextanhongpin/database-design/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}