Questions tagged [table-relationships]

220 questions
1
vote
1 answer

Writing into three databases with one submit with flask

I started playing around with flask a week ago and facing already a little problem and I don't know if flask could handle it as a framework or if I need to solve it the "old" way. Here is the situation. I have three dbs Platten, Label and Artist.…
1
vote
1 answer

Zend_Db relationships from diagram

I have the following tables: Each with its own mapper: Product_Model_DbTable_Product Product_Model_DbTable_Category Product_Model_DbTable_ProdCategRelation I've seen some tutorials about how it's done, but I still don't get it. This is what I…
nevvermind
  • 3,302
  • 1
  • 36
  • 45
1
vote
1 answer

Django: issue with relationships between tables

I am creating an enrolment page for a website using Django. I have three tables: the default User table, a Profile table (to capture additional info) and a Subscription table. I have setup the Profile table as follows: class Profile(models.Model):…
Sean
  • 586
  • 5
  • 8
1
vote
2 answers

Zend Framework get dependent rows following a certain condition

I want to retrieve rows from a dependent table that follows a given criteria in the dependent table.
1
vote
1 answer

more flexible relationship between two tables in database?

Let's say there are two tables. (I made example table just to explain the concept of my idea, there would be some mistake to define it.) TableA 'user' CREATE TABLE user ( id serial PRIMARY KEY name character varying(80) UNIQUE NOT…
Jayground
  • 1,797
  • 1
  • 17
  • 32
1
vote
1 answer

GreenDao Foreign Key Concept and one-to-many relationship

For one to Many relationship how can i define foreign key constraint. I did all the available solution but still facing the issue of no foreign key. Does Green-Dao support foreign key constraint ? if it is not support yer than how to use…
1
vote
2 answers

SQL Server - Cyclic Cascade Path

Lets say I have two tables - User and Post I introduced a customized Join table Vote to have a many-to-many relationship between User and Post. The tables have following structure: User (UseId, Name) Post (PostId, UserId, Content) Vote(Id, UserId,…
1
vote
1 answer

MySQL database structure advice needed. Two many-to-many from one table to two other that are in one-to-many relation

I have this setup as my database structure which already works pretty well, but I feel like it could be better, but cannot figure out how. Database Structure:- Events can have multiple sub-events. Users can join these events and optionally their…
1
vote
2 answers

Bi-Directional Relationships in Backendless - Working with highly interrelated data

This is a fundamental novice level question that will not be short. This is specific to Backendless. I have a number of scenarios I would like to be able to address, as I am working with a small set of tables that are all interrelated in some form…
1
vote
2 answers

Whats the correct normalization of a relationship of three tables?

I have three tables: teachers classes courses The sentences is: A teacher may teachs one or more courses. A teacher may teachs one or more classes. A teacher teachs a course for a class. So I need a fourth table with PRIMARY KEY of each of the…
1
vote
1 answer

Navicat MySQL Query Column is null when joining two tables(customer and order table relationship)

as you can see in the image the custom created column "customer" is null, but when I use the RIGHT JOIN is shows up, but then the idOrder is nulled...
1
vote
3 answers

How do I set default value for a foreign key column in mysql

table1 bookid bookname author 0 No book no author 1 Engg Maths Greiwal 2 Java Basics James…
Aoryouncellvan
  • 157
  • 3
  • 6
  • 16
1
vote
1 answer

How to reuse Slick Relationships on a tuple?

Using documentation in Slick 3.1.0 as source for classes : implicit class PersonExtensions[C[_]](q: Query[People, Person, C]) { def withAddress = q.join(addresses).on(_.addressId === _.id) def withContact =…
Thomas Pocreau
  • 470
  • 5
  • 12
1
vote
4 answers

Laravel Defining Relationships

I have one table named Content which is a master table like Content : id content_name created_at updated_at and another table Course like Course table have many content_id Course : id content_id course_name created_at updated_at I have created…
1
vote
2 answers

Laravel 5 BadMethodCallException when using with()

I have been struggling with this issue for the past 5 hours and It is driving me nuts. First here is my code. There is a product contrloller
Ossi
  • 63
  • 1
  • 6