I've got 3 C# classes: Circle, Square and Shape. Circle and square are both derived from shape.
In my database I have a table for each, referencing the base table to show their inheritance.
At the moment I am only ever accessing a circle or a square, never going directly to a shape
But in my shape table should I store a "Type" which shows that this shape is of type circle?
My tables are like this
CREATE TABLE [dbo].[Shape](
[Id] [int] IDENTITY(1,1) NOT NULL,
[ShapeType] [int] NOT NULL, //This is the column I'm not sure on
[sides] [int] NOT NULL
Then I have a square and circle table for the unique properties
I feel like the ShapeType column is a good idea, although I've been told before that building for "Just in case" scenarios is bad practice