Questions tagged [table-relationships]

220 questions
0
votes
1 answer

laravel 5: relationship between products and featured products

I'm writing a sample ecommerce website with Laravel 5. I have 2 Tables: Schema::create('products', function (Blueprint $table) { $table->increments('id'); $table->string('name'); $table->text('description'); $table->float('price'); …
luca89pe
  • 97
  • 1
  • 14
0
votes
0 answers

Save on different tables using Eloquent Laravel Relationships

Hi I have 3 tables "temp_quotes", "quotes" and "quote_items" Every quote generated goes to the "temp_quotes" table at first. At the end of my multi-step form I need the following: 1- Receive all the quotes from the "temp_quotes" table, send it to…
Alex
  • 79
  • 1
  • 11
0
votes
0 answers

Relation to autoincrement column, force value > 0?

We usually use autoincrement columns to add identifiers to table rows. Those values are generated as positive integers by mysql. When I want to model a relation between two tables I use columns of type unsigned int to store the foreign keys.…
maxhb
  • 8,554
  • 9
  • 29
  • 53
0
votes
1 answer

Issue with enforcing referential integrity In Access 2013

So I was mapping out the relationships between tables in a database I'm working on but I ran into some problems. It was recommended to me that I use the "Enforce Referential Integrity" function when working with table relationships but everytime I…
Aaron
  • 103
  • 1
  • 2
  • 8
0
votes
1 answer

Multiplicity in Entity Framework

I'm new to Entity Framework and I've run into some problems while trying to implement my ERD Code First. The situation is as follows: ERD A product has a group of questions (QuestionGroup). A QuestionGroup has multiple questions and can belong to…
Flippey
  • 91
  • 1
  • 8
0
votes
1 answer

Integrate two databases in sql server

We have 3 databases with same table but different data in them, on 3 servers, now we have a stronger server and we need to integrate 3 in 1. How can we have all data on one database? I have problem with relations of tables, if the primary key of a…
0
votes
1 answer

SQL Database Movie Tickets

I am working on an app that allows users to book movie tickets. I have already created the tables for movie and actor and done the relationship between them. Now, I am stuck on the Tickets table. I have the following attributes: seat, date, time,…
imran.razak
  • 188
  • 1
  • 12
0
votes
1 answer

Creating single insert query for 3 tables in MySQL

I have three tables in a MySQL database, the tables are labeled address, employee, and login_info. address and employee have a one to one identifying relationship with a foreign key with login_info table. I would like to write a single sql query…
user3221699
  • 71
  • 1
  • 2
  • 8
0
votes
0 answers

In ERD Can we have a relationship between 2 tables which are inheriting from one parent table?

If 2 tables, for example "Solo singer" and "Group singers" are inheriting from same parent table "Artists" , can we have a relationship between "Solo singer" and "Group singers"? for example: A solo performer may be a member of many groups or of no…
Raveen
  • 27
  • 5
0
votes
1 answer

performing calculations on a database

I have a database setup with some sample data. I have a number of teams in one table and their fixtures in another in their fixtures I have their scores for the games they have played already. I am struggling with the logic of calculating their wins…
0
votes
1 answer

ANY SQL Relationship must be on the same number of fields with the same data types

Hi I've searched the web and this site for the answer I'm looking for but the answers aren't helping me in my case. I'm making a database for a shop that has multiple locations. Everything worked until I normalized the database. As you can see…
TimB
  • 5
  • 5
0
votes
1 answer

Entity Framework 4 Hiding Underlying Resolver Tables when model is generated from database

When creating an entity framework model from scratch it is possible to specify a Many to Many relationship in the model. e.g Entity1 * ----- * Entity2 When a database is then generated from this, a resolver table is then created automatically…
gmn
  • 4,199
  • 4
  • 24
  • 46
0
votes
2 answers

MYySQL is the Table Relationship wrong?

I'm very new in Databases and more specific in MYSQL. I use xampp + MySQL Workbench. I make 3 tables using MySQL Workbench: - tbStores with fields StoreID(PK-INT-AI), StoreName - tbProducts with fields ProductID(PK-INT-AI), ProductName -…
Google
  • 23
  • 1
  • 10
0
votes
1 answer

FileMaker - Portal display based on two separate relationships

I have three tables: (1) Audit Findings [up to 100 records per audit, depending on the standard], (2) Types of Documents to check [different types and number, depending on the standard against which an audit is conducted], and (3) Names of the…
Sheqqee
  • 3
  • 1
0
votes
2 answers

Database many-to-many relationships

I have a student and faculty table. The primary key for student is studendID (SID) and faculty's primary key is facultyID, naturally. Student has an advisor column and a requested advisor column, which are foreign key to faculty. That's simple…
yuudachi
  • 2,266
  • 3
  • 17
  • 17