Questions tagged [relational]

526 questions
0
votes
1 answer

mysql n to m query

I have following table structure table domains ID | name | ________________________ 1 | example.com | ________________________ 2 | example.net | ________________________ 3 | example.org | table products ID |…
lgt
  • 1,024
  • 3
  • 18
  • 33
0
votes
1 answer

Relational DB design: connecting different kind of "objects"

I am currently designing a Database for a Project of mine. The target is to connect different kind of "Objects" like Web-links, text, pictures and files with each other. Using the following tables my first attempt ended as described below: TABLE…
CyrillC
  • 557
  • 1
  • 3
  • 15
0
votes
3 answers

Inserting data into my database isn't working

I've got a nice drop down list working which is getting populated from a the table teams (FK). The only thing that isn't working is adding the data into the matches. I keep getting the following errors: - team_home not set - team_away not set -…
Johan
  • 69
  • 2
  • 10
0
votes
3 answers

Insert data into table and update another table with that data.

I'm trying to achieve the following: When I add into the table Players_goals that player_John has scored 3 player_goals in match_xx - That it doesn't just get inserted into the Players_goals table, but also into the Players table. And if…
Johan
  • 69
  • 2
  • 10
0
votes
4 answers

How can I make a web form with drop down boxes to insert data into a relational database

I'm busy trying to create a website for my football team. The thing I'm having problems with is creating a web form with drop down boxes to select and insert the match data. I'm already able to add a match in phpmyadmin where I can just select…
Johan
  • 69
  • 2
  • 10
-1
votes
2 answers

Relational Database query MySQL

I have modified the names of my Tables. The sportevents table is the main table and it should get its data from the tables: event_date, events, results, and members. Is there a way to do this. Please not i need to keep this structure. sportevents…
SebastianOpperman
  • 6,988
  • 6
  • 30
  • 36
-1
votes
1 answer

Determining if an entity is weak or not

I'm creating a relational database of a store and its stock of products. In the brief, it says "products can be returned under agreed terms e.g. expiry date or manufacturers error", based on this I created a weak entity "Terms" with product_ID as…
Silver
  • 29
  • 1
  • 1
  • 9
-1
votes
2 answers

How to join multiple txt by adding parts of the file name and then save csv?

I need to open multiple txt (all have the same number of variables and variables names, see picture[1]); to each, add multiple columns with specific parts of their file name; then save a CSV resulting from merging all txts, with the added columns…
-1
votes
1 answer

Same details to be stored for different roles in database but with different required fields(not null fields)

Consider I have two users with two different roles -- user1: role1, user2: role2 Many columns are same for both role types, for example consider data of birth. But for role1 saving data of birth is required(not null) whereas for role 2 it is…
arya.s
  • 111
  • 2
  • 11
-1
votes
2 answers

How do I print a true statement if only 1 of 3 inputs is a positive number?

This is what I am currently using. fun main() { val num1 = readLine()!!.toInt() val num2 = readLine()!!.toInt() val num3 = readLine()!!.toInt() println(num1 >= 1 || num2 >= 1 || num3 >= 1) }
-1
votes
1 answer

Row Count by relational table and filter by date laravel

I have offer table and report table I and report table have offer_id table. offer to report table relation on to many, I count reports table row by offer table by desc
Ashad Ali
  • 1
  • 1
  • 2
-1
votes
1 answer

Is it possible to do an call for all the data in FaunaDB?

I am working with the demo of fauna. I Want to have the customer in the object, but now it is @refI work with NextJS. This is my object now. How can I get my customer info straight into my object?
-1
votes
1 answer

How to merge records with aggregate historical data?

I have a table with individual records and another which holds historical information about the individuals in the former. I want to extract information about the individuals from the second table. Both tables have timestamp. It is very important…
Borut Flis
  • 15,715
  • 30
  • 92
  • 119
-1
votes
1 answer

Spring: weird onetomany mapping with relational table for each relation

I'm trying to build a number of relations the way i've been told to. I have 6 tables...let's call them A, B, C, D, E and F. The relation between them is always 1:N. I've been asked to map those tables in Spring/JPA by creating a new relational table…
Calfa
  • 233
  • 4
  • 11
-1
votes
1 answer

sql database delete duplicate relationships

I have a simple database table with over 5000 records. Each record says for example 'john' is related to 'jack'. Almost every relationship is likely to be in the database twice because there could be a record 'jack' is related to 'john', which…
Kelvin BJ
  • 9
  • 3