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
37
votes
2 answers

Is there data visualisation tool for postgresql which is capable of displaying inter schema relations as well?

Operating system used is linux. I have tried Navicat and SQL Power Architect. They did display relations between tables in the same schema. I have some foreign key constraints which reference tables in a different schema. Am I missing something…
36
votes
5 answers

How to identify a strong vs weak relationship on ERD?

A dashed line means that the relationship is strong, whereas a solid line means that the relationship is weak. On the following diagram how do we decide that the relationship between the Room and Class entities is strong. Is it because Room entity…
CHEBURASHKA
  • 1,623
  • 11
  • 53
  • 85
35
votes
1 answer

SQLite database scheme as Entity Relationship Model

Is there a tool to display the database scheme for SQLite 3 database like with MySQL Workbench and Reverse Engineering? I mean a graphical representation like
testing
  • 19,681
  • 50
  • 236
  • 417
35
votes
3 answers

How does one define double-lines for edge and node shapes in graphviz dot?

How can edges and nodes be styled using graphviz dot with doubled lines as shown the in the "LEGAL" and "TAX DISC" nodes of the following diagram?
Judge Maygarden
  • 26,961
  • 9
  • 82
  • 99
32
votes
4 answers

MySQL: Finding rows that don't take part in a relationship

I have two tables: 'movies' and 'users'. There's an n:m relationship between those, describing what movies a user has seen. This is described with a table 'seen' Now i want to find out for a given user, all the movies he has not seen. My current…
tliff
  • 1,714
  • 1
  • 16
  • 17
29
votes
1 answer

Delete child objects in Entity Framework

I'm using EF and when I do this: foreach (var reg in detail.Regs) { this.db.Regs.DeleteObject(reg); } I get this: Collection was modified; enumeration operation may not execute. What I'm I doing…
Hector Minaya
  • 1,695
  • 3
  • 25
  • 45
29
votes
4 answers

Core data many-to-many relationship - Predicate question

In my Core Data model I have two entities: List and Patient. List has an attribute called 'name'. A List can have any number of Patients and each Patient can belong to any number of different lists. I have therefore set a relationship on List called…
Garry Pettet
  • 8,096
  • 22
  • 65
  • 103
29
votes
3 answers

What is different between ER Diagram and Database Schema?

What is the difference between ER Diagrams and Database Schema? MySQL Workbench has facility to draw ER diagrams, but the symbols for ER diagrams different in other drawing tools than MySQL Workbench method.
sam
  • 439
  • 1
  • 6
  • 11
29
votes
1 answer

How to create an NSFetchRequest which filters Core Data objects based on attributes AND relationships?

I have a Core Data model setup like so: Blockbuster Entity To-Many relationship to DVD entities. DVD Entity title attribute (string) To-One relationship to a parent Blockbuster entity A single Blockbuster can have multiple DVD's inside of it…
Dave
  • 12,408
  • 12
  • 64
  • 67
28
votes
3 answers

Difference between ER diagram and EER diagram

What is the difference between ERD (Entity relationship diagram) and EERD (enhanced entity relationship diagram)?
shaki mandira
  • 309
  • 2
  • 5
  • 9
26
votes
3 answers

A tool to automatically generate a UML diagram for a Rails Application

Looking for a good tool/gem that can automatically generate a nice looking UML diagram for an existing rails application. (Im imagining such a tool would read the schema.rb file and then scan the models for relationships)
Evolve
  • 8,939
  • 12
  • 51
  • 63
26
votes
1 answer

Deciding on foreign key while implementing one to one relationship in MySQL

I have two simple tables "items" and "orders". For the sake of simplicity lets assume that one item can only be in one order or one order can only contain one item. Now as this can be implemented using simple one to one relationship I can do…
Jay Bhatt
  • 5,601
  • 5
  • 40
  • 62
25
votes
1 answer

Live Notifications UML Class Diagram

I am trying to implement a live notification system (like fb, xing, twitter..). Therefore, I created an UML class diagram before building the entities. The showcase is the following: EDIT: I Thought about this approach and it seems as if this is…
user3746259
  • 1,491
  • 2
  • 23
  • 46
25
votes
4 answers

One-to many relationships in ER diagram

I am trying to show the following in the ER diagram: There are instructors and courses, a course is taught by only one instructor whereas an instructor can give many courses. My question is, is there any difference between two diagrams, in other…
yrazlik
  • 10,411
  • 33
  • 99
  • 165
24
votes
2 answers

What is the difference in ECore between containment and reference?

When creating references between ECore entities there is the possibility to mark a reference as "containment". Can somebody explain me in easy words what's the difference between a plain reference and a containment? The definitions and explainations…
Kosi2801
  • 22,222
  • 13
  • 38
  • 45