Wednesday, April 29, 2015

Data Modeling in Unified Modeling Language (UML)


Data modeling is how we represent data in an application.
Data in databases can be represented by:

  • Relational model
  • XML
  • Database design model. 


To create a design model we can implement a higher level model which can be a Unified Modeling Language (UML). The data modeling subset of the UML is based on 5 concepts:


1-Classes: In UML the class consists of class name, attributes and methods. There is a primary key assigned to the attributes and the method is normally dropped.

2-Associations: are the relationships between objects of two classes. Inside the associations we have multiplicity. The multiplicity of associations explains how many objects of one class can be related to an object of another class. The types of multiplicity associations are:
  • One-to-one: Each object on each class is related to at most one object on the other class.
  • Many-to-one: Each object in class 1 is related to at most one object in the class 2, but each object in class 2 can be related to several objects in class 1.
  • Many-to-many: There are no relationships on the relationships, multiple objects of each class can be associated to several objects of another class.
  • Complete: Every object must participate in 1 relationship.
3-Association classes: are the relationships between the objects of two classes with attributes on relationships.Inside the association classes we can also find self associations which refer to associations of class with itself.

4-Sub classes: are also known as specialization and they derive form the super classes. They can be incomplete, complete exclusive or overlapping. 

5-Composition and Aggregation: Composition is the term used when objects of one class belong  to another class. Aggregation indicates when an object of one class can belong or not to another class.

The definition of relations on databases is a key factor in managing data. There can be multiple associations that determine how the different tables relate one to another. Database design is a really valuable skill, as a student in a sustainability/ environmental studies field I lacked any background in computer science and business. I hope the above description will provide you a simple insight in to basic database relationships.

Things to consider...

What happens when we have massive amounts of data? How can we determine the multiple associations when we have too much information, Is there a tool that can help us link the tables?

No comments:

Post a Comment