Tag Info

New answers tagged

0

I am going to have to target this wildly inaccurate and naive statement: Perhaps a user-friendly ID is useless in this case; after all, VoIP providers are companies whose names tend to be distinct in the computer sense and even distinct enough in the human sense for business reasons. Names are terrible as keys, as they are frequently changing. A ...


1

When issuing an identifier for an external system, you should only give URIs, or alternatively a key or a set of keys that have the same properties as a URI, rather than exposing the database primary key directly (from here onwards I'll refer to both URI or a key or a set of keys that have the same properties as URI as just URI, in other word a URI below ...


4

The reason we use a non-business related PK is to ensure that our system has an easy and consistent method of determining what the user wants. I see you replied with a comment: MessageSender, MessageRecipient, TimeSent (for a message). You can STILL have ambiguity this way (for example, with system generated messages triggering on something that happens ...


31

This is the way how we solve this (since more than 15 years, when even the term "domain driven design" was not invented): when mapping the domain model to a database implementation or a class model in a specific programming language, you have a simple, consistent rule like "for each domain object mapped to a relational table, the primary key is ...


4

Without primary keys in the frontend there is no easy way for the backend to know what you are sending. To fix that you would need a ton of extra work parsing the data, which would hurt performance and probably take more time and be more ugly than attaching a key to every item. As an example, lets say that I want to edit a message in an app; how would the ...


4

You need to be able to identify many objects by some unique index, and isn't that what a primary key is (or at least implies one is present). Unique indexes are available so you can further constrain your DB schema, not as a wholesale replacement for PKs. If you're not exposing PKs becuase they;re ugly, but are exposing an unique key instead... you're not ...



Top 50 recent answers are included