#DatabaseDesign

2025-04-19

Managing Multi-Tenant User Access with T-SQL Constraints
Master Multi-Tenant User Access in SQL Server using partial unique indexes! Maintain data integrity & flexibility with unique constraints, even when allowing default/null values.
tech-champion.com/database/sql
...

2025-04-19

SQL Non-Unique Identity Column: Auto-Assignment in Microsoft SQL Server
Learn how to implement SQL Non-Unique Identity columns in SQL Server using sequences and triggers. This ensures data integrity & efficient database operations.
tech-champion.com/database/sql
...

2025-03-29

Managing Multi-Tenant User Access with T-SQL Constraints
Master Multi-Tenant User Access in SQL Server using partial unique indexes! Maintain data integrity & flexibility with unique constraints, even when allowing default/null values.
tech-champion.com/database/sql
...

2025-03-29

SQL Non-Unique Identity Column: Auto-Assignment in Microsoft SQL Server
Learn how to implement SQL Non-Unique Identity columns in SQL Server using sequences and triggers. This ensures data integrity & efficient database operations.
tech-champion.com/database/sql
...

2025-02-24

Database Design Best Practices: Stored Procedures and Triggers
Database Design Best Practices: Learn how stored procedures & triggers enhance performance, security, and data integrity. A balanced approach is key for efficient, maintainable systems.
tech-champion.com/database/dat
Learn about database design best practices incl...

2025-02-24

Building an XML Tree with SQL Server Stored Procedures
Mastering SQL Server XML Stored Procedures for hierarchical data is key! Learn effective strategies for generating nested XML structures, optimizing performance, and ensuring maintainability.
tech-champion.com/database/bui
Learn how to create a SQL Server stored procedure that generates an XML tree...

2025-02-24

Best Practices for Database Procedure Naming Conventions
Database Procedure Naming: Improve code readability & collaboration with consistent naming conventions. Learn best practices for maintainable database code! SQLProcedureNaming
tech-champion.com/database/bes
Learn best practices for database procedure naming conventions. Improve databa...

Neighbourhoodie Softwareneighbourhoodie@toot.berlin
2025-02-20

When starting with a new @couchdb #DatabaseDesign, you’ll need to consider document size and attachment size. Get them wrong… and, you’ll feel it later! 📏 💾

We’ve put together two #DataModelling tips that expand on why we recommend keeping it small.

Start with our post on attachment size:
neighbourhood.ie/blog/2025/02/

2025-02-20

Composite Primary Keys: When Simplicity Trumps Complexity in Database Design
Optimizing database design: Single vs. composite primary keys. For smaller databases, a single, auto-incrementing primary key often offers superior performance & maintainability. Simplicity trumps complexity! Composite primary keys add complexity to updates & queries.
tech-champion.com/database/db2

Abdullah1xcoder
2025-02-17

🧠 SQL Mindmap & Daily Life SQL Commands for Developers 🧠

SQL (Structured Query Language) is a powerful tool used by developers to manage and manipulate databases. Whether you're querying data, updating records, or performing complex joins, SQL is essential in daily development tasks. Let’s break it down!

Chris Woody Woodruffcwoodruff
2025-02-13

Not every query needs a primary key.

Keyless Entity Types in EF Core let you query database views, raw SQL results, and reports without requiring a unique identifier. Perfect for read-only scenarios and complex data models.

woodruff.dev/keyless-entity-ty

Chris Woody Woodruffcwoodruff
2025-02-05

Many-to-Many relationships in EF Core is just easier! No more manual join tables—EF Core handles it all!

Learn how to set up, query, and navigate many-to-many relationships without causing any trouble.

Read more: woodruff.dev/many-to-many-made

2025-01-21

I've been working on this a bit lately, but getting stuck on the database side of the IPAM relationships. Specifically, how to get a one-to-many relationship working between the network (e.g. 192.168.1.0/24) and the IP entries (192.168.1.[1..254]). Pydantic usually complains about the relationship in some form or other, saying it can't generate the schema.

One thing that definitely doesn't help is that I define the return types in one file and the Pydantic models in another, so any change I make in one I have to make in another.

For that reason, I might look at replacing how I interface with the database.

Thankfully, the testing I have in place will let me change things out easily.

#rackroot #programming #backend #webdev #databasedesign

2025-01-11

Gateway stuff is done for now, so it's time to work on the DHCP range data.

A network can have 0..n DHCP ranges and each DHCP range should be editable with the CRUD operations.

C - create: add a new DHCP range, make sure it doesn't overlap with another DHCP range already present on this network. All IPs should be in range, too.
R - read: render DHCP range information and overall IPAM utilization of the network. A DHCP range covering 200 IPs on a /24 should, for example, show roughly 80% of the IPs are used. Vuetify has UI elements to render stuff like this.
U - update: change data about the range such as the start/end addresses, name, or description.
D - delete: remove a DHCP range <--> network association and the associated record(s) from the db.

Validations:
DHCP range doesn't overlap other IPs in use on the network, such as the gateway, static IP assignments on that network (which I haven't even gotten to), or other DHCP ranges.

There's going to be a LOT of testing to go into this and I think that's why I like this kind of stuff. It forces me to think of all the use cases, write tests, add code, and balance all of it together.

#rackroot #programming #networking #fastapi #python #webdev #fullstackdevelopment #fullstack #vuetify #databasedesign

Ashley Rolfmore (leymoo)leymoo@hachyderm.io
2025-01-07

Also; if your previous technology choices made this hard... That means a wider discussion to fix it, and don’t let outside people pressure you into compromising on data intregity in systems that need auditing. The bad ones will throw your reputation away anyway if they pressure you to do bad work and it messes up later #databasedesign #DatabaseDevelopers #systemDesign #Accountancy #Audit

Ashley Rolfmore (leymoo)leymoo@hachyderm.io
2025-01-07

The nuance that seems to come up is parent records with child records - ie if you remove the association, the associated child audit entries disappear.

Its easier to see the issue if you remove this type of record keeping to other situations- ie if a foster parent looks after a child, say the kid breaks a leg playing football while under the care of the carer, then the kid moves on…. You’d want to know that both the kid had the accident with the carer and that the carer looked after a kid that had an accident while with them. Both sets of information either end are needed. The accident shouldn’t disappear from the carer’s record.

Yet you hear this from system designers or developers.

#databasedesign #DatabaseDevelopers #systemDesign #Accountancy #Audit

Ashley Rolfmore (leymoo)leymoo@hachyderm.io
2025-01-07

I’m starting to think that anyone who designs or builds systems that handle data should do a basic bookkeeping course that covers how double entry works.

The accountants managed to work out for us since the 13th Century that if you move money from A to B, both A and B need an audit entry describing the movement each way. Write only - nothing is removed. Yet I don’t see an equivalent teaching in the various system design books, despite this concept being fundamental to any system that needs (financial and non-financial) auditing capabilities.

#databasedesign #DatabaseDevelopers #systemDesign #Accountancy #Audit

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst