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

Can I use TypeORM @JoinColumn without the double underscores?

I have 2 entities (so far) with a ManyToOne relationship between the Posts and the User (the order came this way because the user entity existed first and the post entity was created afterward before I joined the company). @Entity() export class…
0
votes
3 answers

Question about 3rd Normal Form

The following table : EmpId State Zip 1 FL 342008 2 CA 342001 is not in 3rd normal form because State is dependent on the primary key(EmpId) transitively. So, if I break it like this : (EmpId,State) (State,PIN) it's in 3NF. I…
0
votes
1 answer

How to ensure total participation on one side of a many-to-many relation using SQL in Oracle?

I'm trying to enforce a restriction of a many-to-many relation with total participation on one of the sides using SQL in an Oracle database but can't figure out how. For example, I have a set of tables that can be described by this…
0
votes
0 answers

Problem fetching data in ManyToMany and OneToMany relationship using JPA: Spring Boot

I am working on a small project using Spring Boot, Hibernate, and JPA. I have created three entities- Book Author Publication Required relationships- One book can be written by multiple authors and the author can have many books. Therefore- Many…
ayush
  • 464
  • 5
  • 17
0
votes
0 answers

Issue in power portal API call with N:N relationship

I have created a new entry in dataverse and made relationship with Account table(N:N). And then set table permission for that new entiry as Global, it works fine. **But when im changing that table permission to account level the API not…
0
votes
1 answer

In an ERD can 2 actions be connected to each other?

My program allows the user to select up to 3 suburbs in their local region. The website emails the user about road crashes that occurred in those suburbs. It stores their UserID and the suburbs they selected in table UserSuburbSelections. My ERD…
0
votes
0 answers

How to draw ER diagram for this given scenario

This an example question offered to draw ER diagram; I'm not clear how to draw these 2 questions if anyone can please help. Consider the following statement. “Manufacturer orders parts from suppliers. A given manufacturer can order a particular…
0
votes
1 answer

how to make a relationship with a table column to multiple table based on condition in prisma ORM

I have a model model image { id Int @id @default(autoincrement()) entityId Int entityTypeId Int imageUrl String recordStatusRefId Int? createdBy Int? createdOn DateTime …
0
votes
0 answers

How to make relation between entities from different packages and keep encapsulation?

I have problems with architecture of my project application. I wanted to avoid all classes being public (it is problem of layer packaging), so I created vertical packages as shown below on the screen-shot: packages screen-shot But I have got a…
0
votes
1 answer

C# one to many relationship unable to access the other model's attributes

Im new to c# and Im working on a entity framework project that access a mysql database and has two models: User and Company. the problem is, when making the connection everything is okay with the database connection, the model gets all of user's…
vitoriac
  • 79
  • 1
  • 1
  • 7
0
votes
1 answer

Relationship Using Code first with Existing database

When defining a relationship between two types is it important to include a navigation property on both types, such as in the following example: public class Product { public int ProductId { get; set; } public string Name {…
Pankaj Upadhyay
  • 12,966
  • 24
  • 73
  • 104
0
votes
1 answer

Linq To Entity SelfReferencing Relation Mapping

How do you map a table called category with Id as Primary Key which has self reference called ParenCategoryId using LinqToEntity?
Deepak N
  • 2,561
  • 2
  • 30
  • 44
0
votes
0 answers

Can I map a List of Id's to a List of Entities with that Id at the model level in Entity Framework?

I have a Pets class: public class Pets { [Key] public int Id { get; set; } public List DogIds { get; set; } public virtual List Dogs { get; set; } } I then have a Dog class: public class Dog { int Id { get; set; } //…
Slushba132
  • 423
  • 2
  • 5
  • 20
0
votes
0 answers

What is meant by unique cardinality constraint in this example?

ER Diagram Basic schema Unique constraints ? I am somewhat confused by what exactly school of Located_at or school of Principle_of is meant to be? I understand the idea here is to denote the 1..1 cardinality by enforcing uniqueness but isn't the…
0
votes
0 answers

How to show a M:N relationship on a rational diagram?

I have a M:N relationship between to entities and to convert them to a rational diagram I have to create a new entity that has as foreign keys the primary key of each entity. Do I also need to add a new attribute-key to be a primary key? Or I just…
Nafsika
  • 17