Task list

Image

Your final conceptual models will, of course, be as different as the applications you build, but (fortunately for technical writers) just a few techniques are necessary to build the vast majority of conceptual architectures, and we’ll examine them in this chapter.

Complex types

Image

Sometimes you’ll want to abstract a group of entity properties as a separate class (think of the properties that comprise an address, for example). In the Entity Framework, you’ll do this by declaring them as a COMPLEX TYPE. It’s simple to do, and we’ll start our exploration of complex architectures there.

Split & partitioned entities

Image

Next we’ll explore models that have a one-to-many relationship between entities and tables. ENTITY SPLITTING lets you create a single entity that contains properties in multiple tables, while ENTITY PARTITIONING (sometimes called TABLE SPLITTING or HORIZONTAL SPLITTING) lets you split a single table into multiple entities.

Table-per-type inheritance

Image

Since relational databases don’t directly support inheritance, these sort of relationships are typically modelled using a technique called TPT INHERITANCE in Entity Framework, whereby child types are modelled in a separate table with a one-to-one relationship with its parent. TPT is well supported in Entity Framework, and we’ll begin our examination of inheritance with it.

Table-per-hierarchy inheritance

Image

The second common way of modelling inheritance in a relational database is to use a single table with one or more fields that identify the type of entity being represented. This is TPH INHERITANCE, and we’ll look at that at the end of the chapter. (If it sounds a lot like a partitioned entity, it is. Only the logical relationship is different.)

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset