is it bad practice to store more than one kind of id in a single column for a database?
Jump to turn (10)
- 1is it bad practice to store more than one kind of id in a single column for a da
- 2are there exceptions where the atomicity should be violated?
- 3is big query mean to be acid compliant?
- 4sorry I think the question was poorly phrased. to be clear, I did not mean stori
- 5if I am doing a table in big query which is not normalised, is this okay then?
- 6let's stay specific to the question about storing more than one kind of ID in co
- 7apart from normalisation as a principle, are there are other best practices that
- 8expand the list by another 3 reasons
- 9how about from the perspective of data modelling? How can this negatively impact
- 10are there cases where this is fine?
- User
is it bad practice to store more than one kind of id in a single column for a database?
- Assistant
In general, it is considered bad practice to store more than one kind of ID in a single column for a database.
The main reason is that it violates the principle of atomicity in database design, which states that a database field should contain only one piece of data. When you store multiple IDs in a single column, it makes it difficult to perform queries and retrieve the data you need, since you would have to parse the IDs from the column and match them to the appropriate type of ID.
In addition, storing multiple IDs in a single column can also make it difficult to maintain data integrity and enforce referential integrity constraints. For example, if you store both customer and order IDs in a single column, it becomes harder to ensure that each order is associated with a valid customer.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.