Questions tagged [table-relationships]

220 questions
-1
votes
1 answer

How to structure relationships between models in Ruby On Rails

I'm developing an application to schedule soccer matches for two teams at a time. So, for example I need to schedule a match for two teams, but I'm not sure how can I structure the database relation between these two entities. One solution I thought…
Bruno
  • 71
  • 1
  • 10
-1
votes
1 answer

Normalize and use primary / foreign keys SQL Server 2008 R2

NOTE: I have never done this before: What are some steps or documentation to help normalize tables/views in a database? Currently, there are several tables and views in a database that do not use primary/foreign key concept and sort of repeats…
-1
votes
1 answer

Linking two database tables together

A very quick question. I have a student table with columns: student_email(PK), student_name, student_surname, password, course and another table called 'feelings' where the student can log how they're feeling every…
-1
votes
1 answer

Ms-access many-to-many Relationships

I'm new to Access and trying to understand m:m relationships. I understand how to create the junction table containing a composite primary key. What I'm having trouble with is what to do next. Tbl1 has tbl1PK, Tbl2 has tbl2PK, and JunctionTbl1_2…
Les Programmer
  • 121
  • 2
  • 15
-1
votes
1 answer

Creating relations between tables PHPMYADMIN

Please help me! Im creating a database to store data about patients in an A&E Department. However, Im unsure how to relate the tables. Table structure: PATIENTS (PatientID(PK),Forename, surname, gender, DOB, Address, History, illness, priority) A&E…
user2027028
  • 17
  • 1
  • 7
-2
votes
1 answer

Creating database in SQL Server (problem with relationships)

I need to create a database from a CiteScore file (the file contains 10 identical pages from different years). I already created it and added tables from this file and assigned a variable ID for the primary key, but I wonder how to create a…
-2
votes
2 answers

Database schema for Customers, Products and Suppliers

I´m starting in database schema. I don´t have experience in it. I am thinking of a platform for customers to have access to the types of products that suppliers offer. So, I would like to know how to keep the database schema following the tables and…
-2
votes
4 answers

Which one is faster? input category id to each row or use relationships table

I'm Using php and Mysql database. which one is the faster way for select data from database Input category id/*name* to each row of product table, then select * from product table WHERE category name = something or Make a relationships table,…
iCode98
  • 41
  • 1
  • 7
-3
votes
1 answer

How to add relationship on same fields of Two tables (Table Order and Table Product) in SQL Server?

Dear anyone can help me as i have two tables named as Order and Products which have more than two multiple same fields i want to make relationship among all same fields in both tables You can see tables in pictures below:
1 2 3
14
15