Concatenating ids with extension to keep multiple rows related to an entity in a single Column Family?

Most databases come with a built-in way to create IDs automatically, and your app doesn't need to care about it. I'm most familiar with Postgres, where I create a sequence for each table and use that for the Id column, but I know that Oracle and MSSQL have their own way of accomplishing the same thing In general, however, each column in your database should store a single piece of information. Taking two pieces of info and concatenating them together as you're suggesting goes against "proper" database design according to "book learning."

By which I mean: you should only do it if you have a very, very good reason for doing so (and even then, you should think two or three times about it before actually doing it. ) If you don't have a good reason for doing it, then don't do it.

Most databases come with a built-in way to create IDs automatically, and your app doesn't need to care about it. I'm most familiar with Postgres, where I create a sequence for each table and use that for the @Id column, but I know that Oracle and MSSQL have their own way of accomplishing the same thing. In general, however, each column in your database should store a single piece of information.

Taking two pieces of info and concatenating them together as you're suggesting goes against "proper" database design according to "book learning. " By which I mean: you should only do it if you have a very, very good reason for doing so (and even then, you should think two or three times about it before actually doing it. ) If you don't have a good reason for doing it, then don't do it.

This is not a good design. It should be two different columns having composite constraint. You can have a another generated Unique ID for as a primary key.

Aside from the primary key, You can also create a composite index on two columns to speed up the queries if most queries will filter based on these two values.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions