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
4
votes
1 answer

How to generate a database diagram/ER diagram from Liquibase database changelog.xml files?

Is there a tool or a way to generate an ER-diagram or database schema from the changelog.xmls of Liquibase Database? Using database diagram option with IntelliJ did not generate a diagram (it is a package kind of diagram).
Shaf
  • 41
  • 2
4
votes
2 answers

ER Modelling Question

I have the following question: Using only binary relationships, construct an entity relationship diagram for the following description. Include entity labels, primary key fields, relationship labels, and the multiplicities on relationships. "A…
user559142
  • 12,279
  • 49
  • 116
  • 179
4
votes
1 answer

EF 4.1 Code First - change to FK value not updated when using new context/over WCF

I'm using EF Code First over WCF. So when I save an entity it's using a new context. If I retrieve an entity, then update it so it references a different entity, I'm finding that it saves with the original foreign key value. For example, I retrieve…
4
votes
1 answer

Entity-relationship diagram for a shareholding

I have to describe shareholdings, where a subject has a shareholding in an investee company and the shareholding is described by zero or more records. I don't know what is the correct way to model the "shareholding" part. It sounds like a…
cdarwin
  • 4,141
  • 9
  • 42
  • 66
4
votes
1 answer

Core Data NSFetchRequest for Specific Relationship?

I'm transitioning an existing data model that was previously stored in XML to Core Data, so I'm trying to learn the ropes as properly as possible. Core Data is obviously one of those technologies that isn't going anywhere anytime soon, so I might as…
Craig Otis
  • 31,257
  • 32
  • 136
  • 234
4
votes
1 answer

How to build ManyToMany relationships in Mongodb?

Possible Duplicate: MongoDB Many-to-Many Association I've used MySQL/SQLite for years and having real trouble getting my head around how to do relationships in MongoDB, especially ManyToMany relationships, I just don't know what is best…
zardon
  • 2,910
  • 6
  • 37
  • 58
4
votes
1 answer

What is the best way to link products to an order in a Spring application?

I am developing a simple Spring Boot application offering a REST service, to allow clients to login and order some products. In my MySQL database I have the following tables : Client Seller Shop Product Order The user can select multiple products,…
Sarah Lorenzo
  • 41
  • 1
  • 2
4
votes
1 answer

Android Room: Include Nested Object's Fields as Columns

Let's say I have a Patient entity, storing the patient ID, a boolean and finally a Person object. So I annotate these fields with @ColumnInfo to store in the database. Now a Person has 2 String fields: a first name and last name. However, in my…
Fawwaz Yusran
  • 1,260
  • 2
  • 19
  • 36
4
votes
1 answer

It's possible extend AR relationships?

I'd like know if there are a way to create my own rules to AR relationships or extends the existent HAS_MANY, BELONGS_TO etc? Thanks.
GodFather
  • 3,031
  • 4
  • 25
  • 36
4
votes
1 answer

Room referenced in the primary key does not exists in the Entity

I am trying to create a many-to-many relationship in Room Persistance library for Android. I have created two entities, MovieEntity, and GenreEntity. I have also create a MovieJoin class. Basically, it' just a copy of this tutorial step by step:…
4
votes
2 answers

RBAC (Role Based Access Control) ER Diagram

I am trying to design an application with Role Based Access Control. And I have also designed the ER Diagram. So here I try to achieve that a USER will have a single ROLE and based on the particular ROLE it will get permissions for RESOURCES set in…
4
votes
2 answers

Hibernate OneToMany and ManyToOne confusion! Null List!

I have two tables... For example - Company and Employee (let's keep this real simple) Company( id, name ); Employee( id, company_id ); Employee.company_id is a foreign key. My entity model looks like this... Employee @ManyToOne(cascade =…
squizz
  • 41
  • 1
  • 2
4
votes
1 answer

Convert ternary relationship to binary in E/R model

When I am studying the database lecture on E/R model, it illustrates how to convert ternary relationship to binary. One way is using weak entity relationship as follows (each relationship is M:N cardinality): ternary relationship: convert the upper…
tsen0406
  • 119
  • 3
  • 4
  • 15
4
votes
1 answer

What is the difference between a relation and a property in a Linked Data ontology?

The wikipedia article ontology components describes relations as one of the components of an ontology. It states that relations "specify how objects are related to other objects". Is-a/sub-class and partOf relations are provided as examples. I am…
Natkeeran
  • 1,719
  • 6
  • 29
  • 52
4
votes
4 answers

Skip child to fetching of parent - JPA

I am facing an issue where the data is getting fechted recursively. I wanted to avoid the child to fetch the parent data. Which is causing a recursive issue. I have mentioned the code below Pojo Structure class Parent { .. …
user5070277