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
8
votes
3 answers

Full documentation on YAML mapping for Doctrine ORM?

The YAML mapping documentation for entities seems to be lacking. It doesn't explain what the different types, the different generator strategies, what mappedBy means, what types of cascade values are allowed, how to define a many-to-one…
Matt Huggins
  • 81,398
  • 36
  • 149
  • 218
8
votes
1 answer

Is the relationship between Customer and Commodity correct?

It is known about each employee of the shipping company what their first and last names are, their age, residence address, place of birth, correspondence address, e-mail. Each employee who is a driver has one of the cars at the disposal. It …
user366312
  • 16,949
  • 65
  • 235
  • 452
8
votes
4 answers

Doctrine: Object of class User could not be converted to string

I keep getting this error with Doctrine: PHP Catchable fatal error: Object of class User could not be converted to string in vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php on line 1337 In my system users can have many permissions in a One to…
Luke
  • 20,878
  • 35
  • 119
  • 178
8
votes
2 answers

Should I have multiple views/endpoints of a resource in a RESTful service?

Let's say I'm creating a RESTful service to handle orders for my warehouse over the web. I want to allow customers to create accounts I want a customer admin to be able to create accounts for other users in their office I want to allow customer…
chrislbs
  • 83
  • 1
  • 4
8
votes
3 answers

What's the difference in notation for total participation and recursive relation?

Does the double line in the following ER diagrams means total participation or recursive relation? Could anyone tell me the notation difference for both?
mko
  • 21,334
  • 49
  • 130
  • 191
8
votes
2 answers

Database design for custom form builder (and storage of results)

I'm trying to implement a custom form builder, similar to those provided by Wufoo and Google. While I've created a simple UI to create these custom forms with, my issues lie in the database design. Upon creating the form, a JSON implementation is…
KushalP
  • 10,976
  • 6
  • 34
  • 27
8
votes
3 answers

Entity Framework - relationship with fake Foreign Key (no foreign key in the db)

I have many tables that have TextID column which refers to the translation table. Translation table needs also LanguageID to get translated text in desired language. My problem is that I do not have LanguageID in my database, it is predefined in the…
Jarek
  • 5,885
  • 6
  • 41
  • 55
8
votes
6 answers

How to visualize the relationship of tables in an Oracle database

I know in Access there is a way I can visualize the relationship between tables in a diagram - kind of like an ER diagram. I am new to Oracle. I am wondering if I can do the same/similar thing with Oracle. Could someone give some suggestions?
Jimmy
8
votes
2 answers

standard way to represent a foreign key relation in a json rest web service

I have a Wine entity which is related to a country in a one to many relation (one country - many wines) I can think of two ways to represent this in a json web service: One is just including the whole country in a json { id: 76, code: "FR", …
opensas
  • 60,462
  • 79
  • 252
  • 386
7
votes
1 answer

Entity Framework Code First Class with parent and children of same type as it's own class

I have a class of Content which should be able to have a parentId for inheritance but also I want it to have a list of child content which is nothing to do with this inheritance tree. I basically wanted a link table as ChildContentRelationship with…
7
votes
1 answer

Android Room One-to-Many Relationship

I am trying to setup a one-to-many relationship, I have checked various articles and tutorials online but all the examples show one table having a one to many relationship with another table. In my requirement I have two tables having one to many…
Adil Bhatty
  • 17,190
  • 34
  • 81
  • 118
7
votes
1 answer

Android Room library - select all fields for embedded entities

I have two entities with a foreign key relation: product and category. @Entity(primaryKeys = "id") public class Product { public final long id; @NonNull public final String name; @ForeignKey(entity = Category.class, parentColumns =…
Random
  • 3,807
  • 2
  • 30
  • 49
7
votes
3 answers

Entity Framework Core self referencing table

I have a class called Item which references the next item and the previous item. public class Item { private Item() { } public Item(string itemName) { ItemId = Guid.NewGuid(); ItemName = itemName; } public Guid…
Bryan
  • 5,065
  • 10
  • 51
  • 68
7
votes
4 answers

Which one is ER diagram

I started to study ER diagram when i browse through ER diagram tutorials i found something like figure 1 and i learned Figure 1 And then i tried to create a sample ER Diagram in mysql workbench i got the components like in below diagram Figure…
Monicka Akilan
  • 1,501
  • 5
  • 19
  • 42
7
votes
2 answers

Difference between associative entity and associative relationship attribute?

What is the difference between an associative entity and an associative relationship attribute? My book Modern Database Management (Hoffer, 11th edition) states that there is a difference between the two. It doesn't explain why there's a difference;…
rj2700
  • 1,770
  • 6
  • 28
  • 55