he00273 wrote:
PS: I Understand the ORM model. I think it is a very good technique but what I am missing is how this translates to an actual database schema. Having access to this should help clarify things a lot.
Don't worry about the above request (although it would be nice) I think I have it figured out now. I created an employee table as such
CREATE TABLE [dbo].[Employee](
[EmployeeID] [bigint] IDENTITY(1,1) NOT NULL,
[EmployeeName] nvarchar NOT NULL,
[EmployeeAddress] nvarchar NOT NULL,
[EmployeeDOB] [date] NOT NULL,
[EmployeeGender] char NOT NULL,
[EmployeeType] [smallint] NOT NULL,
[DepartmentID] [bigint] NULL,
[CarTypeID] [bigint] NULL,
CONSTRAINT [PK_Employee] PRIMARY KEY CLUSTERED
(
[EmployeeID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
The discrimination field is EmployeeType
Managers have DepartmentID mapped
BoardMembers have CarTypeID mapped
I presume one should index the discrimination field (attribute).
I am very interested in this as I have a very good use for it.
I think a tutorial walking one through this would be great (in addition to the video).
Its hard work learning this stuff.
When you talk about a cabrio I presume you mean something like a Mini Cooper Cabrio (I am not up with sports cars).