Questions tagged [table-relationships]

220 questions
0
votes
0 answers

Multiple table relationship for country, state, area to design a parcel delivery management in Spring boot

I want to build a software for parcel delivery system and need advice about how to build multiple table relationship. Here, I am thinking about some dependent dropdown options. First of all, the receptionsit will select the name of the destined…
0
votes
2 answers

I want to automatically place the ID from the Parent table into a child table

I have two separate tables each will input the form data into the phpmyadmin Db respectively. Users and Parents respectively I am using procedural PHP and a prepared statement for form data. I have had success with each form inserting data into the…
0
votes
1 answer

Table Relatioships

Hi guys I have a problem with simple dataset In the table I get the same results for the count of Child friendly resort whether is by country or by continent. My model seem to be in good shape since it doesn't happen with values from other…
73x
  • 1
  • 1
0
votes
1 answer

Creating Relationship in PowerBI when Employees are in columns by role

I'm trying to create a relationship in PowerBI between an Account Assignments table, which lists each Account in a role, and then the assigned employee in the columns. One column is used for each role. So for example: Account Sales Rep …
WesBez
  • 1
0
votes
1 answer

symfony 1.4/ doctrine 1.2 active record relationship tables code organize

Let´s say I have a schema containing 3 tables: Users,Pages and Followers. An user can follow many pages. The followers table would contain the page_id and user_id. I need to create a method to return all the users following a page.. Should i create…
0
votes
1 answer

Laravel Eloquent can relationship method return null instead of MorphMany relationship object?

My problem could be more philosophical than concrete. I'm using Laravel 8, I have one Trait that is used by several classes and some of its methods perform two different computation by taking into account if object has or not a specific morphMany…
0
votes
1 answer

I need to populate the axios get response with two leveles depth with Strapi v4

I have a database schema with 2 levels relationships between tables: I perform this axios get: http://localhost:1337/api/restaurants?filters[id][$eq]=2&populate=* to strapi And I hope to get two levels of data, but instead I get one…
Rafael
  • 2,413
  • 4
  • 32
  • 54
0
votes
1 answer

How to represent data in the cross product of categories in R

I have a data frame. In that data frame I have two categorical variables. If I consider the cross product of those 2, then I have one row per element in my data frame. The table shown below is a table of frequencies. Instead of showing the number of…
Ana A
  • 15
  • 3
0
votes
1 answer

How to decrement a field in a different table on deleting an entry in MySQL

I would like to know how to decrement a field (projects) in another table (users) after deleting an entry in a table (projects). Users table: +-----------+--------------+------+-----+---------------------+----------------+ | Field | Type …
0
votes
0 answers

Should a one-to-many relationship create a table

I am designing this database for a manufacturing company that produces boards for other factories to produce harnesses and I have created an items table, where each record is an item in the board to be produced, for example a fixture. When a…
0
votes
1 answer

Polymorphic Relationship Table Queries in Rails — find object by multiple

I have a relationship table in a rails application called edit_privileges, in which the User is the "editor" and a number of other classes are "editable". Let's say that two of those classes are Message and Comment. My EditPrivilege model uses the…
Ryan Atallah
  • 2,977
  • 26
  • 34
0
votes
1 answer

How to save/export designer pages in phpmyadmin?

I have many pages in the Designer Tab of PHPMyAdmin. How do I export it? So I can import it in any other laptop. One of my pages in the PHPMyAdmin Designer Tab
InSho
  • 1
  • 4
0
votes
3 answers

Difference between One-Mnay relationship & Many-Many relationship

I am just confused about One-One relationship and Many-Many relationship. Well if I have a users table and a course table, Do I have to add a third table to make it Many-Many relationship or I can just connect them with foreign keys and primary…
LastFox
  • 31
  • 3
0
votes
1 answer

Select all from first table and order by Count(id) from second table where second.value = 1

There are two table videos and reactions. I want to sort videos by likes descending. reactions table is same for likes and dislikes. (I did not want to create two different tables for likes and dislikes). There is reaction column in the reactions…
WEB TM
  • 33
  • 6
0
votes
1 answer

How to create a relation between 3 tables in laravel 7?

I have three tables in a DB. The first one is "bookings" with some columns: id, customer_id, etc. The second one is "customer" with id, name, email etc. And the third one is "customer_meta" with id, object_id (which is the reference to the id column…