Questions tagged [erd]

Entity Relationship Diagram (ERD) or Entity Relationship Model is a visual representation of the organization of data within databases or information systems

An Entity Relationship Diagram (ERD) or Entity Relationship Model is a graphical representation of entities and their relationships to each other, typically used in computing in regard to the organization of data within databases or information systems.

ERDs can be used to depict two different kinds of models that are closely related, but different in intent. One kind is an analysis model of the subject matter. This model breaks the subject matter down into entities and relationships among entities. Subject matter entities are just subject matter objects by a different name, except that in data analysis, we aren't trying to model the behavior of these objects or entities. Values to be stored in the database can be grouped into attributes, and attributes can be connected to entities and relationships that the attributes describe. This is the ER model as originally developed, and the intent is to describe the problem, not the solution.

Another kind of ERDs is a depiction of the table design of a relational model. This relational model will be eventually fleshed out with physical details, finally resulting in a construction plan for the database itself. While table design is very closely related to ER modeling, it isn't exactly the same thing. for example, normalization is relevant to table design, but not to requirements analysis.

While an ERD can be used for either one of these two purposes, it's useful to decide which of the two purposes one is pursuing before starting in on a diagram.

1159 questions
7
votes
5 answers

When we need to use 1-to-1 relationship in database design?

When do we need to use a 1-to-1 relationship in database design? In my opinion, if two tables are in a 1-to-1 relationship, they can be combined into one table. Is this true?
Just a learner
  • 26,690
  • 50
  • 155
  • 234
7
votes
2 answers

what is the differences between that line in oracle ERD?

What is the differences between that relationship lines in oracle ERD?
AYETY
  • 698
  • 4
  • 23
  • 38
6
votes
5 answers

How to create E-R diagram in mysql

I am using MySQL. There are 28 tables in my database. I've tried to use MySQL Workbench to create E-R diagram. As there are 28 tables, everything is messed up in diagram using MySQL Workbench. Is there any way to create E-R Diagram which shows all…
bsm
  • 1,793
  • 11
  • 30
  • 41
6
votes
1 answer

How to model diamond like many-to-many relationship in database ERD

Legend: PK (Blue): Primary key FK (Green): Foreign key PFK (Blue): Primary Key and Foreign Key at the same time How to model a diamond like (if term is correct) relationship? Better to explain using a simplified example: There is organization,…
özüm
  • 1,166
  • 11
  • 23
6
votes
3 answers

How to model messages exchanged between users? - ER Diagram

I'm trying to design an ER diagram where i have a USER and a MESSAGE entity. Users can send messages to other users. I have designed 2 alternative diagrams for this but i'm not sure which one is the correct.
kelua
  • 283
  • 1
  • 4
  • 9
6
votes
1 answer

What is a good database design approach for my Online Quiz Android Application?

I have been working on an Android Online Quiz Application with PHP & MySQL. I know what attributes I need however when designing the relationship it becomes complex and confusing when I analysed it. I do not know if this would be a good database…
Muhammad Catubig
  • 311
  • 3
  • 15
6
votes
2 answers

Why is it necessary to indicate identifying or non-identifying relationships in an ERD?

In an ERD, a weak/non-identifying relationship is one that connects two strong entities, and is indicated with a dashed line. A strong/identifying relationship is one that connects a strong entity to a weak entity (a weak entity is one that contains…
Tripartio
  • 1,955
  • 1
  • 24
  • 29
6
votes
5 answers

Database design guidance needed

A dairy farmer, who is also a part-time cartoonist, has several herds of cows. He has assigned each cow to a particular herd. In each herd, the farmer has one cow that is his favorite - often that cow is featured in a cartoon. A few malcontents in…
Michael Quiles
  • 1,131
  • 3
  • 24
  • 41
6
votes
1 answer

How can I make a caption visible in a relationship line in erd MySQL WB 6.0

I've tried putting a content in the caption but it still doesn't work.
user3073435
  • 71
  • 1
  • 2
6
votes
3 answers

Entity Relation notation in text

Is there a standard (non-graphical) notation for Entity Relationships? right now I'm using my own janky notation: User >> Photo , (1-many) User > Profile , (1-1 hasOne) Profile < User , (1-1 belongsTo) Photo << User , (many-1 belongsTo) Photo <>…
cardflopper
  • 976
  • 2
  • 12
  • 19
6
votes
3 answers

How to represent interchangeable columns

I'm not quite sure how to phrase this, but is there a good way to implement a table where the columns are essentially interchangeable? Example: you have a Users model and want to allow two Users to be 'friends'. The obvious way, to me, would be to…
user1916823
  • 143
  • 4
5
votes
1 answer

Simplify Database ER Diagram/Schema

For a school project, we have to create our own database. I decided to create a database to manage my electronic component inventory. As a requirement, we needed to create an ER diagram, then from that diagram derive the database schema.…
Schmidget
  • 123
  • 1
  • 7
5
votes
3 answers

Tool for making diagram from SQL query

I have this complicated SQL query for Oracle that I want to visualize in a diagram to make it understandable for my co-workers. I tried at http://snowflakejoins.com but it just chokes on it. Has someone a better suggestion? I prefer a web-app on the…
peter
  • 41,770
  • 5
  • 64
  • 108
5
votes
4 answers

How to generate Entity-Relation diagram from SQL DDL?

For example DbVisualizer can be used to connect to a DB and create nice diagram out of existing tables and their relations. But in this specific case I do not have a live database but I have bunch of create table and alter statements. Is there any…
Petteri H
  • 11,779
  • 12
  • 64
  • 94
5
votes
0 answers

How to adjust the relationship line between tables when the position of tables are changed in pgAdmin4?

I created two tables and built a foreign key between them, now I want to reorganize position of the tables in ERD (pgAdmin4 - version 6.14). I'm try reorganize, but I cannot, see image-01: My expectation is to align relationship line between tables…
lucasjunioo
  • 51
  • 1
  • 1
  • 4