Conceptual model focuses on data requirements of business and consists of the following three models (ER, EER and UML) which builds upon each other. Its focus is to collect business data requirements, so it is implementation independent. This is the first model that must be created before moving onto logical model and external data model.
Let’s go over the ER (entity relationship) model first, which is comprised of rectangles, ellipses, and rhombus. Rectangles are entity type, ellipses are attributes of entity types, and rhombuses are relationships. Entity is literally in the model name and it is simply a thing or a being like wine or a person. Entity type is a term used to define collection of entities with similar characteristics. For example, people is an entity type and entities within it can be bob, sally, and joe. Attributes are properties of entity types. For example, people entity type can have things like name, address, phone number, marital status, and so on.
Unique attributes like social security number are considered key attribute type, since they are distinct from each individual entity. Things like shoe size of a person isn’t a key attribute since other entity can have the same shoe size and aren’t unique. If the entity doesn’t have a key attribute type of its own, it is a weak entity type and it borrows it from a strong entity which has a key attribute type. Composite attribute type like address can be broken down into simple or atomic attribute type, for example, address can be broken down into zip code, country, street name, and apartment numbers. There are also attributes that are multi valued and not single valued, for example, phone number attribute can have multiple variables since one person can technically have more than one phone number. There is also a derived attribute like age, which means it can be pulled from other attribute like date of birth.
Relationships are represented using a rhombuses and they present association between one or more entities. For example, entity type business and customer. Entity customer “buys” something from a entity “business”, so a relationship can be created between the two. Rhombus can be seen as two arrows pointing from one entity to another. The degree corresponds to number of entity types in the relationship, unary means only one entity is involved and binary means two are involved. The roles are also added for clarification, for example, teaches and taught by entity types teacher and student.
Relationship type can be characterized with cardinalities, which is basically minimum and maximum number of relationship instances that an entity can participate in. There’s partial participation and total participation, where partial means some entities may not participate in the relationship while total participation means all entities need to participate in the relationship, resulting in existence dependency. Minimum cardinality can be either 0 or 1 while maximum can be either 1 or N. 0 means that an entity can exists without being connected to another entity while 1 means entity can only be involved in only one instance. N means any integer bigger than 1 and it can also be called M. This gives four combination, 1:1, 1:N, N:1, and M:N maximum cardinality relationships, since relationship types are characterized per their maximum cardinality for each of their roles. Additionally, relationship rhombus can also have attribute, just like an entity. If it is 1:1 or 1:N, it can be moved to participating entity types, but for M:N, it belongs to relationship rhombus.
ER model does have its limitations, like temporal constraints, no consistency across multiple relationship types, no support for definition of functions, and inability to specify domains that can be assigned to attributes.
EER is simply an ER model with three new concepts: specialization, categorization, and aggregation. . Specialization is simply a set of subclasses of entity type, for example, sports player superclass will have subclass football player, soccer player, and tennis player. Opposite of specialization is generalization, where you go from singer and painter to artist entity type and make it more abstract.
Specialization can be defined based on its dis-jointness and completeness constraints where dis-jointness constraint specifies the subclasses an entity of the superclass belong, while completeness constraint defines whether all entities of superclass belong to one of the subclasses or not. Dis-jointness constraint can be set to either disjoint or overlap specialization, where disjoint means entity can be a member of at most one of the subclass and overlap means entity can be member of more than one subclass. For completeness constraint, it can be either total or partial where total specialization means every entity must belong to the superclass and none of the subclasses and partial means entity can only belong to superclass and to none of the subclasses.
Then we have categorization concept, where category means it has subclass that has several potential superclasses and each superclass is a different entity type. Category is basically a collection of entities that’s a subset of the union of the superclasses and is represented using a circle with a U in it. Inheritance in this case means member entity inherits only the attributes and relationships of that superclass. Just like specialization, it can be total or partial where total means all entities of the superclasses belong to the subclass and partial means not all entities belong to the subclass.
Lastly we have aggregation, which is the third concept that’s introduced by EER model. Aggregation basically combines entity type that are related by a particular relationship type. The aggregated type will have its own attributes and also participates in a relationship.
The last conceptual model is the UML (unified modeling language) which is simply an object oriented system modeling notation. UML has a different naming convention but is pretty much similar to ER/EER. Class is basically entity type in UML and object is entity in UML. Just like ER/EER, class (entity type) is represented as a rectangle, but it is broken down into three parts or sections. Upper part has the entity type name, middle part has the attributes, and the bottom part has the getter/setter methods which are basically ways to get the objects. Access methods can have access modifiers which are -, +, and # signs that specify who can access it. – means it can only be accessed by the class itself, + means it can be accessed by any other class, and # means it can be accessed by both the class and its subclasses. This is all to enforce information hiding, which is for security.
In UML, relationships are called associations and instead of using N for cardinalities, you utilize * sign to denote the value N. The association can be unidirectional or bidirectional and it shows how one navigates to another. If it’s bidirectional, you won’t see an arrow and if its unidirectional, you will see an arrow pointing from one to another. The hollow arrow represents a specialization in UML and details like total/partial or disjoint/overlap can be added next to it. Aggregation is also possible in UML and can be either shared or composite aggregation, where shared means the part object can simultaneously belong to multiple composite objects and composite aggregation means the part object can only belong to one composite. Shared is represented by a hollow diamond while composite is represented by a filled diamond and they’ll be marked closer to the aggregated entity.