Get the latest tech news

How can you represent inheritance in a database? (2010)


I'm thinking about how to represent a complex structure in a SQL Server database. Consider an application that needs to store details of a family of objects, which share some attributes, but have ...

For example, a commercial insurance package may include liability, motor, property and indemnity cover within the same policy record. Because SQL is SET based, it's rather alien to procedural/OO programming concepts & requires code to transition from one realm to the other. 2Alternatively, consider using a document databases (such as MongoDB) which natively support rich data structures and nesting.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of database

database

Photo of inheritance

inheritance

Related news:

News photo

Run Database in GitHub Actions, Persisting Data to S3, and Access It Publicly

News photo

Database full of 1000+ validated problems that can be turned into applications

News photo

Show HN: Fireproof – local-first database with Git-like encrypted sync