Questions tagged [erd]

Entity Relationship Diagram

Filter by
Sorted by
Tagged with
0 votes
1 answer
20 views

How to count the number of relationships to a table in MySQL?

I am arranging an ERD diagram of an existing database with about a 100 tables, to add some structure to the process, how rank out the number of relations the tables have to each other? For example, ...
0 votes
1 answer
22 views

Create an ERD diagram from a set of SQL CREATE TABLE statements

We have a Snowflake database that does not maintain relationships between tables. The lack of relationships is not my decision and I have no control over this. I would like to generate an ERD diagram ...
  • 101
2 votes
3 answers
73 views

Is it ok to have repeated values in some of the columns and similar columns in two separate tables?

I'm trying to create database in which I could store thousands of job postings. I put here 3 sample records of these job postings so that you could better understand how everything looks like: Every ...
0 votes
0 answers
37 views

ERD Review for Chipotle Order System

Attached is the ERD for my attempt at creating an ERD of Chipotles order system. I've been trying to learn how to make good ERD for database design and wanted to get some feedback. I'm confused on ...
0 votes
0 answers
21 views

Link category table to product table or create json category field in product table

When it comes to product and categories, is it a better design to model as below or is it better to include a json category field in the product table thus eliminating the need for the category and ...
  • 19
0 votes
0 answers
26 views

May a weak entity have relation to another weak entity which is already related with a strong entity?

Imagine there is a weak entity B which depends on a strong entity A, and another weak entity C that depends on the weak entity B. How would we select the PK s for the entity C in such a case ? To be ...
2 votes
0 answers
41 views

One-to-One? or One-to-Zero-or-One?

Scenario: I am being asked to create an HR training tracker for employees of a business. in this database I am using two tables: EMPLOYEE(EMPLID, LastName, FirstName, PrimaryEmail) with EMPLID as the ...
1 vote
0 answers
26 views

Table for an Appointment App

experts, I am building out an appointment scheduler application. I am seeking advice on how best to tackle this issue. I am building out my ERD and I am the point where I will be creating a ...
0 votes
0 answers
106 views

Can an ER relationship have `NULL`able attributes?

Texts out there about the entity-relationship model seem to only mention NULLable attributes on entity types and not relationships. Is there a concrete saying whether such attributes are allowed to ...
3 votes
1 answer
172 views

If an entity's primary key must contain a foreign key, does that make the entity weak?

I'm currently learning about strong and weak entity types in the context of RDBMS. While reading, I came across this statement: "A weak entity is dependent on a strong entity to ensure its ...
  • 141
2 votes
0 answers
77 views

My relational schema and a few questions about relations and duplicate values in columns

I'm trying to create database in which I could store thousands of job postings. I put here 5 sample records of these job postings so that you could better understand how everything looks like: Now, ...
3 votes
0 answers
45 views

Help Creating a 'Complex' ERD

I am stuck on how to represent the relationships I need correctly. I have a Produce table. Each type of produce—e.g., 'lettuce'—has one or more quantity suffixes that can be associated with it, e.g., '...
  • 39
0 votes
0 answers
29 views

ERD Design for mangers and their respective locations

I am tasked with replacing the company spreadsheet containing all our sites and which belong to the three upper managers in their respective hierarchy to a relational database. This is a relatively ...
1 vote
1 answer
121 views

How to implement disjoint (nonoverlapping) subtype with total completeness in MongoDB?

I designed an entity relationship diagram (ERD) with the goal of creating two child entities (INSTITUTION and SPACECRAFT) of a parent entity (LOCATION), which is distinguished depending on the value ...
  • 113
1 vote
0 answers
133 views

Can a foreign key be a primary key?

I want to know the relationship takes, teaches, advisors tables underlined attributes are foreign key or primary key? or both?
1 vote
0 answers
97 views

Can I illustrate how a relationship depends on another in an ER diagram?

I'm new to data modelling and trying to build my first ER diagram for supermarket management. My current diagram is based on the following description which I myself come up with: "Suppliers ...
0 votes
0 answers
60 views

Design proper schema for flexible entity field

I have some entities modeled like on the picture. Every entity have field classifications which contains list of Classification. Classification itself can have any name and value, all represented as ...
  • 101
0 votes
0 answers
238 views

Likes table with different types

I have an oversimplified database design where I wish to put all likes in the same table (only if it makes sense) . A like, can be on either on a POST or on a COMMENT. Options: Distinguish the two ...
0 votes
0 answers
57 views

There are 2 ERD Designs, and one has a strange combination. I am told both are correct. why?

One of the designs seems clear: A REQUESTEDPRODUCT is picked from STOCK (which has many locations). The primary key is a composite key of 4 foreign keys. The other design is more unclear. The "...
0 votes
4 answers
84 views

Foreign key location

This is a question from a Master's degree. What is the correct response to the question depicted in the image, and why? Or do you believe there could be multiple correct answers?
1 vote
1 answer
466 views

Chen notation to crow's foot

How do I illustrate relationships which has an attribute in chen notation to crows foot notation? Example: There is an attribute "quantity" in the relation. How do I draw that in crow's ...
0 votes
0 answers
89 views

Is there a command line tool to convert a SQL DDL file describing tables and relationships into a diagram?

Is there a command line tool that takes one or more SQL DLL files describing entities and relationships, and then transforms it into an ER diagram or something textual that can be turned into an ER ...
  • 111
0 votes
0 answers
43 views

Is this ER Module correct

I am working on my first ER diagram for a case study. I wonder whether it is correct. I will include my case study here. It is really helpful if anyone can give me a feedback regarding my diagram. ...
0 votes
0 answers
21 views

Need help creating a transaction-grained fact table

For a personal project I need to design for the first time in my life a (star schema to keep it simple) relational database, the context is the sport of boxing. Specifically, I need help designing a ...
0 votes
0 answers
148 views

Is this ER diagram correct?

I am working on my first ER diagram, for a clothing brand case study. I was wondering if my work is correct. Any feedback is more than welcome. My most important concern is the key relationships ...
0 votes
0 answers
82 views

Please review my ERD and SQL tables

it is about a carPooling app where any user can propose a trajectory that is divided into chuncks. Another user can construct his trip from available chuncks. A user is identified by his mail. He can ...
0 votes
0 answers
23 views

ERD relationships rental_car

So I'm having difficulties with making an erd for a project about renting cars. I think I'm almost done, I only have to make the relationship between 3 tables ,2 of them had many to many relationship ...
  • 1
1 vote
0 answers
52 views

Fashion Show ERD

working on a class project. Have to make a ERD for a fashion show. Not looking for a super in depth ERD, but one that will give a good grade. I'd like it to be able to Have a 'Clock-In/Clock-Out ...
0 votes
1 answer
74 views

Is my database ERD well designed

I'm creating a PostgreSQL database for datasets, which should store historical and future data of weather forecasts and train timetables. I'm wondering if my ERD is good enough for a database which ...
  • 1
0 votes
1 answer
38 views

What is the correct usage of IN and ORDER BY keywords when used in conjunction with subqueries?

ERD for my simple db design: I want to order children based on their parent's last name. I am trying to use the following query: SELECT * FROM children WHERE parent_id IN (SELECT parent_id ...
  • 127
0 votes
2 answers
31 views

Database Design for non-profit family assistance

I have a very basic ERD created for a simple database that stores some information about refuge families being helped out by a non-profit that helps provides some basic needs. ID is the primary key ...
  • 127
1 vote
0 answers
506 views

How do I adjust the table link endpoint in PgAdmin's ERD tool after autogenerating it from an existing database?

I can move the lines themselves around, but I can't move the endpoints, which cause the lines to overlap. The only way to understand which relationship is being referenced is by hovering over the ...
0 votes
1 answer
64 views

How should one design a logical data model for a social platform, or skip it?

After studying from 'Usage-Driven Database Design: From Logical Data Modeling Through Physical Schema Definition'a book by George Tillmann. I want to create a logical model for a my own social ...
  • 15
0 votes
0 answers
582 views

Entity relation with itself

I want to make an ER diagram for scientific research papers, one of the constraints is that a paper shouldn't cite itself. I'm not very sure how to achieve this, as this question points out, the ER ...
-1 votes
1 answer
735 views

How to design a complex multi approval expense db schema in MySQL

I'm very beginner in database design and had the following problem to solve. DB schema design for an expense approval system with these cases approval system, every company has 1 or many teams where ...
  • 49
0 votes
0 answers
359 views

When should I use associative entity?

I am studying DBMS and I have read that associative entity is used when there is a many to many relationships but I am confused with the graph. It has many to many relationships but did not use an ...
  • 1
0 votes
0 answers
183 views

E-R diagram 1-to-1 mandatory relationship for two superclass entities to relational schema

How are two superclass entities that are connected to a mandatory 1-to-1 relationship converted to relational schemas? These two superclass entities are also abstract, meaning that they will not have ...
  • 101
0 votes
1 answer
17 views

Convert generalization in ERD to Relationnal Database having no additional column

I've a quite simple problem but the litterature I came accross didn't seem to dwell on. Let's say I have an entity OFFER which represents an Offer on a Product, for each product, one offer can be &...
0 votes
2 answers
102 views

ERD - How to add an attribute to one side of the recursive relation?

The simplified scenario for the ERD A company has employees (each has unique id emp_id) Each employee is supervised by another employee A supervising employee has a special attribute SID Here is my ...
  • 45
2 votes
2 answers
590 views

Primary keys due to inheritance

I am trying to design a database for postgrad office and we have a parent class "User" that has a username as a primary key for authentication and we have corresponding subclasses "...
1 vote
0 answers
32 views

Foreign key or copy of attributes in log entities

I am trying to design an ER for a system with the following specifications: Each user has an account The user can link his/her bank accounts to his/her account in our system The user can deposit or ...
  • 111
0 votes
0 answers
377 views

ERD to Star Schema

I have a simple ERD diagram as represented below for a supplier for inventory goods. What would be the best way to turn this ERD into a Star Schema with one Fact Table and a few dimension tables? To ...
0 votes
0 answers
38 views

Need guidance in creating an EERD

Hope I'm posting this at the right place. I have an assignment that I've been mulling over in an attempt to understand it completely. Instructions You are to create an EER diagram from the information ...
0 votes
1 answer
335 views

Entity-relationship for database design

Customers have the option to not provide a review or leave as many reviews as they want, but they cant have multiple reviews for the same product. How do I model this?
  • 3
1 vote
0 answers
45 views

ERD related, can you make one to one relationship with a single attribute entity to another entity?

ERD Here So for my database project, I designed a meat supply chain optimization project for a large organization, for example such as walmart, where every part of the chain is owned by the ...
0 votes
1 answer
39 views

How to re-design my relational model if there will be NULLs in one column?

I'm trying to build database which allow me store job postings from scraped websites and now I'm in phase of creating a relational model. Getting straight to the point I want to know how should I re-...
0 votes
1 answer
51 views

Do I need to implement id column to table if i know that every added row will be unique? [duplicate]

I want to create database which allow me to store IT job offers from various websites. While creating ER diagram I started wondering if I really need an id column in one particular table. Look at this ...
0 votes
1 answer
119 views

ERD for yearly budget ceiling advice

I'm working on webdev that involving yearly budget ceiling, but I can't wrap my head around to design such budget ceiling (my first project involving budgeting). So I need some advice. So the scenario ...
1 vote
1 answer
164 views

ER-Model to relational mapping

"Fundamentals of Database Systems" by Ramez Elmasri covers this topic extensively, I've gone through it and seemingly the rules mentioned aim at converting the ER-Model to a relational ...
  • 11
0 votes
1 answer
281 views

Can a foreign key be used for two primary keys?

I'm still a beginner in sql and I have to transform this relation between clients and addresses and vendors and adresses. This uses 2 primary keys(1 for the vendors and 1 for the clients). My question ...

1
2 3 4 5
8