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
4 answers

SQL Members table to show family relationships between members

I've been trying for days to design this database. I'm designing it in access then implementing on MYSQL Server as a PHP Web Application. I have a table: Members MemberID (autoNumber, PK) MemberName MemberDetails Members can have many…
SPC_75
  • 41
  • 1
  • 3
4
votes
1 answer

Java, Hibernate, CascadeTypes and 'garbage collecting' Orphans

What kind of cascade type can I use, and where, to have Hibernate automatically remove the Image when there are no more "Things" referring to it? (so sort of Garbagecollecting in Hibernate, basically) Database: Thing table - Image table, is a many…
4
votes
1 answer

Hibernate: not-null property references a null or transient value

I have 2 classes: Msgand Task that are 1-to-1. If i try to save Msg instance without setting Task instance for it i get. org.hibernate.PropertyValueException: not-null property references a null or transient value: entity3.Msg.task How do i enable…
bunnyjesse112
  • 747
  • 6
  • 27
  • 44
4
votes
2 answers

Mongoid self reference with properties for users friendships status

Using Mongo and Rails, I would to build a friendship system like facebook: - Before making the friendship, the use must accept the friendship request I found a lots of code to do the relationship but never with a relation's property... Do you have…
4
votes
1 answer

XG-Transactions Fail in Google App Engine's Local Java Server -- Run fine when deployed on Live GAE

I'm need to use XG (Cross group) transactions across some of my entity groups in Google App Engine. Unfortunately when I run any of these operations on my local Jetty (Eclipse) server, the App Engine development wrapper throws a…
4
votes
1 answer

Entity Relationship (ER) Diagram enum values

As far as I know, we can show enum values in Class Diagrams as shown below: ----------------------+ | <> | | DayOfTheWeek | |_____________________| | Sunday | | Monday | | Tuesday | | ...…
Jack
  • 1
  • 21
  • 118
  • 236
4
votes
2 answers

Confused on the difference between One, and One and Only One in ERDs

Sorry for the links I'm new! I'm confused on the difference between one and one and only one and where they would be used. I just started the class so I apologize if my diagram is wrong as well. Hospital Problem ER Diagram
4
votes
1 answer

Objective-C: Many to many relationship with CoreData

I've an iPhone applications with 2 models, Category and Content, which have a many-to-many relationship. This is the code: Content @interface Content : NSManagedObject { } @property(readwrite, retain) NSString *type; @property(readwrite, retain)…
4
votes
1 answer

Managing relationships with MongoDb in a Microservices architecture

I've been working with microservices for some time now, always with relational databases. I am looking at MongoDb and I am not sure how to handle entity relationships involving different microservices. Here goes an example: public class Employee…
didgewind
  • 524
  • 1
  • 3
  • 10
4
votes
1 answer

Entity Framework - Read Lock on Record

I'm calling same database from different applications using Entity Framework. However, when one application is reading/updating a record, I do not want other applications to read that data. I tried with the following sample code; however, they are…
Win
  • 61,100
  • 13
  • 102
  • 181
4
votes
1 answer

One-to-Many with no back reference in sub-related entity

If I have one-to-many relation between two entities (ie. Post and Comment) and have my master class defined as: public class Post { ... IList Comments { get; set; } } But my Comment sub-related class doesn't have a property of type…
Robert Koritnik
  • 103,639
  • 52
  • 277
  • 404
4
votes
1 answer

How to generate SQL tables from ER diagram in Power Designer 15?

I want to generate Sql tables from ER diagram in Powerdesigner ,but ,I don't know how can i do that? Which Tools i should use?
aden
  • 1,907
  • 3
  • 16
  • 16
4
votes
1 answer

How to stop Self-tracking entity performing Add instead of Update

Apologies in advance for the length of this question! I have a data structure from which the following Enity Data Model has been created (tables/fields renamed and simplified for ease of understanding!): The PaymentMethod / ProductPaymentMethod…
4
votes
1 answer

Rails: validating at least one HABTM relationship

I'm trying to validate that a has_many-through relationship has at least one value selected upon form submission. For simplicity, let's just call the relationship "relationship", and thus the ids "relationship_ids". On my model, I included the…
4
votes
1 answer

Laravel ER diagram generator getAllModelsFromEachDirectory()

When I try to follow the instruction here (https://github.com/beyondcode/laravel-er-diagram-generator) I get the following error. Symfony\Component\Debug\Exception\FatalThrowableError : Argument 1 passed to…
JohnSpa
  • 97
  • 1
  • 7