Suppose in the ER diagram there is an associative entity named makes call which connects the entities External entity and Internal entity. Is it possible for the associative entity to be inherited as shown in the following picture?
Related
Occasionally Salesforce Object have polymorphic relationships with other Salesforce Objects. In a polymorphic relationship, the referenced object of the relationship can be one of several different types of object. These polymorphic relationships are defined using polymorphic fields contained in a Salesforce Object. A polymorphic field is one where the related object might be one of several different types of objects. For example, the Who relationship field of a Task can be a Contact or a Lead. Similarly the What relationship field of a Task can be any non-Person Object in Salesforce.
What is the best way to model these Salesforce polymorphic relationship in the Data Vault methodology?
we also use Salesforce at Scalefree internally and turn this into a Data Vault 2.0 model. In a data-driven Data Vault 2.0 model (that is what we teach and preach) you have two choices - either you consider the Who -related object as a generalized object. That would require a generalized hub, which is later linked (in the Business Vault ) to the Contact or Lead hub (in the Raw Data Vault) by using business logic (that is why the link belongs into the Business Vault).
The other option is to store the Salesforce ID (the char(18)) into a satellite and just ignore that this is a relationship - at least in the Raw Data Vault. In the Business Vault you calculate the links between task and contact or lead based on the satellite data and with business logic (how to distinguish leads from contacts essentially, which is simple).
Hope that helps,
Michael Olschimke
When you do you modelization with data vault, do not rely on the modelization of the source system, but rather on business entity and process.
In this particular case, " For example, the Who relationship field of a Task can be a Contact or a Lead.", the keyword is "relationship", meaning a link.
Based on what you describe, I will expected that you have a hub Task, a hub Contact and a hub Lead. Depending on what is you business process and the unit of work, you might have a link Task-Contact and another link Task-Lead.
then, when you fetch the data, simply insert into the right link (if it doesn't already exists).
I've created this ERD:
But now I want to add some more information to my diagram, but I do not how I should do that.
I want to modify my previous ERD, I need to register what recipe was made by what chef in each program. Also, I want to identify what ingredient and tool were used in each step of the recipe.
I think implementing your Entity Relationship Diagram into Microsoft Access can be a good start. You've clearly defined the relations between each entity and have declared attributes for each entity. I would say that you first make each entity into a table in MS Access then add the fields and set up the relationships and see how the work together.
Make sure that your relationships are working before you start filling the database with records.
I have an assignment for developing a hotel reservation system!
One of tasks is to develop UML class diagram! However, in the task description it is written
"Class diagram should represent your database"
I am a bit confused about the rules, notations and etc... because I can't find any official UML class diagrams specifically for databases!
Could you help me please?
Yes, the latest UML standards threw off the data diagram. Nowadays Entity Relationship Diagram is NOT the part of UML. But the Class diagram still is there in UML and it will be enough.
Simply make a usual class diagram. The only difference is that you shouldn't use n-to-m dependencies, instead make a new class between the ends and you'll have n-to-1 and 1-to-m dependencies instead. Such class diagram can be realized in a database. For better understanding in every class you can set an attribute id to be used in the DB later.
The other thing for such class diagram is that you need not to describe any methods - they don't belong to DB tables. But in the reality you need them - so, I'd create one easier diagram - with instantiable classes and without methods, and the other, more thorough - that one will include also abstract classes, interfaces and methods.
Also, on the first one you needn't put classes that belong to the UI - classes, that show your data and edit them.
First I would like to brief you about the different types of classes for a class diagram into which one can view the entire system in a static view.
Some classes are entity(model) classes which define the database model for application domain persist for longer duration. In the above mentioned case it can be customer, hotel staff, hotel menu, seating info.
Some classes define the GUI & presentation to the user such as view classes.
Some classes define the control the program logic, process user events which can be called as control classes.
Some classes can be viewed as the resource classes which are responsible for communication with external data resources.
For all the mentioned classes above the notations, rules followed in UML will be same but their usage, intent will be different.
For your problem, you need to capture these entity classes for the mentioned system through which you can model the database for your system.
I hope it will help you a bit.
The language of UML class diagrams can be used for many different purposes. For instance, for making
conceptual information models
platform-independent information design models
platform-specific data models for all kinds of executable languages dealing with data structures (including SQL and OO programming languages)
Each of these different types of models uses only certain UML class modeling elements, and not others. For instance, in SQL data models we don't use
visbility
interfaces
attributes whose type/range is another class
many-to-many (non-functional) associations
generalization
In fact, since SQL does not really have any explicit association concept, but only the concept of foreign key dependencies, which can be used for representing functional associations, we better shouldn't use any association in an SQL data model, but rather dependency arrows corresponding to foreign key dependencies.
It also makes sense to define two stereotypes for use in SQL data models:
«pkey» as an attribute stereotype for primary key attributes
«fkey» as a dependency stereotype for foreign key dependencies
See this tutorial for more information.
A friend is developing a website, and has to make a database using SQL. He asks why do you need "has-a" or "is-a" relationships since you can take the primary keys of a one entity set and place it in the other appropriate entity set (and vice-versa) to find the relations.
I could not answer the question because I was just taught that relational sets are just how database works.
Edit: I did not want to go into normalization. He made a point that the information is replicated in the relationship set.
Your question mixes two different levels of abstraction together, namely the conceptual level and the logical level.
At the conceptual level, one is interested in describing the information requirements on the proposed database. It's useful to do this without tilting the description towards one solution or another. One model that is useful for this purpose is the Entity-Relationship (ER) model. In this model, the subject matter is broken down into entities (subjects) and relationships among those entities. All data is seen as describing some aspect of one of the entites or one of the relationships.
"Is-a" and "has-a" relationships are relevant at this level of abstraction. At this level, relationships are identified, but not implemented.
After creating a conceptual model of the database, but before creating the database itself, it's useful to go through a logical design phase, resulting in a logical model of the database. If the database is to be relational, it's useful to make the logical model a relational one. The relational model is the next level of abstraction.
This is where primary keys and foreign keys come in. These keys implement the relationships that were identified at the conceptual stage. This is how the relational model implements relationships. At this stage, you get involved with design issues like junction tables, table composition, and normalization.
In addition to the conceptual level and the logical level, there are the physical level and the script level. But these are outside the scope of your question.
The two kinds of relationships are features of the problem to be solved. foreign key references to primary keys are features of the proposed solution.
I am building a application with these patterns: Silverlight, RIA, EF, Prism, SL Unit Testing.
This project will have lots of entities and lots of modules referencing those entities. Each entity is in its own RIA Service Library along with the RIA domain service and associated metadata.
I am running into problems when I reference a certain table in two different entities. For example table bar exists in entity1 and entity2.
My Question: Is it good practice to have the same table in multiple entities (.edmx files)?
If so what are good ways to avoid them causing a mulitple reference error?
If not what do I do when I need that table in another entity?
Normally, when you start working with EF (and most ORMs), you tend towards having an entity-per-table relationship, or at least, a table->entity hierarchy relationship, if you have inheritance in your entities.
If you're trying to refer to the same table from 2 separate entity types, you probably need to pull out a shared, single entity type that's refered to by both of your other entities.