Questions tagged [entity-relationship]

An entity-relationship model (ERM) is an abstract and conceptual representation of data, information aspects of a business domain or its process requirements. Ultimately ERM is being implemented in a database.

Entity-relationship modeling is a database modeling method, used to produce a type of conceptual schema or semantic data model of a system, often a relational database, and its requirements in a top-down fashion. Diagrams created by this process are called entity-relationship diagrams, ER diagrams, or ERDs.

The main components of the ER diagrams are the entities and the relationships that exist among them. For example with the original notation, in the relational databases tables are shown as boxes, its attributes as ovals and their relations with other tables with lines.

The three schema approach to software engineering uses three levels of ER models that may be developed:

  • Conceptual data model is the highest ER model, that contain least granular detail but establishes the overall scope of what to be included in the model set.

  • Logical data model contains more detail than the conceptual ER model. Operational and transcational data entities are defined.

  • Physical data model - one or more such models can be developed from each logical ER model. Normally developed to be instantiated as a database, therefore each physical model must contain enough detail to produce a database.

2962 questions
0
votes
1 answer

Supertype/subtype db design with subtype cross-link

This is probably a simple problem for an experienced database developer, but I'm struggling... I have trouble translating a certain ER diagram to a DB model, any help is appreciated. I have a setup similar to slide 17 of this…
TomL
  • 392
  • 1
  • 7
0
votes
1 answer

asp.net mvc 1 to many saving post and upload files

I'm new in asp.net mvc. I'm using Linq to Sql and trying to do everything loosely coupled. I've two tables: News NewsFiles What I'm trying to do is save a news and upload its files at the same time. How can I create a news in conjunction with his…
John Prado
  • 804
  • 8
  • 19
0
votes
1 answer

Symfony2 - Semantical Error Relation between Entity and retrieve information

I want to make $this->getEntityManager() ->createQuery(' SELECT P.* FROM MyNameSpaceProfileBundle:Tutor T JOIN MyNameSpaceProfileBundle:Person Pe JOIN MyNameSpaceMediaBundle:KidContent KC …
Sam
  • 779
  • 3
  • 18
  • 39
0
votes
1 answer

Asking Entity Framework not to retrieve list of related entities before adding a new one to it

Two scenarios: I have Nodes and NodeDetails coming in in XML format. I cycle through the document, creating new Node entity, then adding NodeDetails to it, then saving them together by calling db.SaveChanges(). When I trace the calls, all I see are…
Alex Polkhovsky
  • 3,340
  • 5
  • 29
  • 37
0
votes
1 answer

Post save process using ManyToMany with intermediary model in admin

I have a model relationship as defined by the examples in the Django docs on ManyToMany relationship with an intermediary model. I know how this normally works, but this is a quick little app that only uses the Django Admin and this is causing a…
Mathias Nielsen
  • 1,560
  • 1
  • 17
  • 31
0
votes
2 answers

Entity Framework - Inheritance - Zero to one Relationship to child object, how to map? (Fluent API)

I have a Inheritance Hierarchy where Action is parent of ActionCompleted and ActionCancelled. Order class has a zero to one ActionCompleted and ActionCancelled. I have tried TPH and TPT (even tried edmx) but unable to get Entity to understand this…
0
votes
1 answer

Core Data - to many Reationships - having trouble with sets

I have look around for something similar with no luck so I am going to try and explain my trouble and paste some code. I have an application that uses Core Data and I can save and retrieve data from their respective textFields with the exception of…
0
votes
2 answers

Doctrine2 entity relationships

Im new to Symfony2 (having used symfony 1.x a couple years ago) and Im trying to understand how to handle entity relationships with Doctrine2. (Incidently, it would be nice if the Symfony2 book had more relationship examples instead of simply…
Eno
  • 10,730
  • 18
  • 53
  • 86
0
votes
2 answers

establishing relationship between data in gridview in asp.net

i have a method that will populate a datatable with the data from a sql table which in turn would be used to populate a gridview. Now in the sql table i have a field called "hotel" which contains the "ID" of a hotel which relates to another table…
swordfish
  • 4,899
  • 5
  • 33
  • 61
0
votes
1 answer

Add object to context and get properties from the relationship

I made a while ago some code that adds an object to my table with entity framework code first. Context.Reactions.Attach(reaction); Context.SaveChanges(); After that I used a relationship called Profile to get the name of the user that posted the…
0
votes
1 answer

Load related entity's from jump table

I have a jump table to relate the Customers and the contact, I want to load all contacts by a customer name. What is the best way to do that? Dim Q = From Cust In EnData.Customers Where Cust.CustomerID = ID Select Cust ContactRow =…
Ezi
  • 2,212
  • 8
  • 33
  • 60
0
votes
1 answer

Insert values in relationship field

Im trying to insert values in a core data entity, but when I try to insert in a Relationship field it crash NSManagedObjectContext *context = [self.fetchedResultsController managedObjectContext]; NSEntityDescription *entity =…
Alejandro Rangel
  • 1,670
  • 1
  • 20
  • 35
0
votes
1 answer

What table structure to use (hibernate)

I hava two entities: PhisicalPerson (PP), JuredicalPerson (JP). And I want to create Phone object. JP has many phones and PP has many phones (one to many relation). So in Phone object I have to create 2 columns for this relations: class Phone { …
Artyom Chernetsov
  • 1,394
  • 4
  • 17
  • 34
0
votes
2 answers

I don't update both sides of a JPA relationship, but it works. Ok?

These are my entities @Entity public class User { @ManyToMany(mappedBy="admins") private Set adminForGames = new HashSet(); @Entity public class Game { @ManyToMany @JoinTable( name="Game_adminUsers", …
Bart van Heukelom
  • 43,244
  • 59
  • 186
  • 301
0
votes
1 answer

NHibernate Criteria Queries - how use in One to One relationship

I have simple 3 POCO classes: public class User { //PK public virtual int UserId { get; set; } //ONE to ONE public virtual Profil Profil{ get; set; } //ONE to MANY public virtual IList Albums { get; set;…
user572844