Questions tagged [multi-table]
138 questions
18
votes
5 answers
Django Multi-Table Inheritance VS Specifying Explicit OneToOne Relationship in Models
Hope all this makes sense :) I'll clarify via comments if necessary. Also, I am experimenting using bold text in this question, and will edit it out if I (or you) find it distracting. With that out of the way...
Using django.contrib.auth gives us…

chefsmart
- 6,873
- 9
- 42
- 47
10
votes
1 answer
Does PostgreSQL implement multi-table indexes?
I've been searching for this for a week now, and I'm afraid this may not exist [yet]. I wanted to use an index that spans multiple tables in PostgreSQL. Oracle and SQL server seem to implement them (with more or less options).
It could be quite…

The Impaler
- 45,731
- 9
- 39
- 76
9
votes
2 answers
Django Multi-table inheritance: specify custom one-to-one column name
I'm trying to create a Django ORM mapping that's compatible with an existing data model, so I'm trying to work with an existing set of table and column names.
I've got a multi-table inheritance situation where a class InformationObject derives from…

Mikesname
- 8,781
- 2
- 44
- 57
5
votes
2 answers
ValueError with multi-table inheritance in Django Admin
I created two new classes which inherit model Entry:
class Entry(models.Model):
LANGUAGE_CHOICES = settings.LANGUAGES
language = models.CharField(max_length=2, verbose_name=_('Comment language'), choices=LANGUAGE_CHOICES)
user =…

jorilallo
- 788
- 1
- 8
- 23
4
votes
4 answers
Creating a multi-table SQL database in android
I'm trying to create a multi-table database for my android application. I'm following the suggestion given on this site http://androidforbeginners.blogspot.com/2010/01/creating-multiple-sqlite-database.html for doing it. I keep on getting the error…

user434455
- 41
- 1
- 2
3
votes
2 answers
Rails MTI with polymorphism
Imagine the scenario:
I have a class with different types of students. All students have similar attributes, but each type of student has also unique atributes. So I used MTI to keep the common attributes in the table students and the individual…

andre
- 31
- 2
3
votes
1 answer
SugarORM query from multiple tables?
I am using SugarORM for my Android application. In my project I have couple of tables and I was wondering is there a way to to join them into another Class Object that has columns from multiple tables?
If yes, then example would be very helpful.

MrJonas
- 45
- 4
3
votes
1 answer
What is the syntax for a multi-table delete on a MySQL database using Doctrine?
Using Doctrine, I am trying to delete records in a single table based on data gathered from multiple tables.
'companies_groups' is an association table linking 'companies' to 'groups'. I want to delete all records in this table linked to a specific…

Grekker
- 944
- 1
- 9
- 17
3
votes
2 answers
SQL Insert with data from multiple tables
I have four tables: Messages, MessageCategory, MessageStatus and MessageLevel.
MessageCategory, MessageStatus and MessageLevel all just have three fields: Identity (primary key), Code and Description. Messages refers to these three fields and has a…

Wim ten Brink
- 25,901
- 20
- 83
- 149
3
votes
2 answers
Multi Table NOT EQUAL in Access Query
I have two tables. VEHICLES and OWNERSHIP. I am trying to make a query that will give me a list of all VEHICLES NOT in the OWNERSHIP table. I basically need a report of my available VEHICLE inventory. I tried this query:
SELECT VEHICLE.*
FROM…

Batman
- 5,563
- 18
- 79
- 155
2
votes
1 answer
Read Only Multitable DTO + Hibernate
I have two tables in my DB, T1 and T2. One column of T1 is a foreign key that references T2. I need only a part of the columns of T1 and T2 for my processing, thus I've created a DTO T1T2 that contains only the necessary columns. To map the DTO to…

manash
- 6,985
- 12
- 65
- 125
2
votes
0 answers
Django - Alternative to multi-table inheritance in Appengine
I'm developing a Django application on Google Appengine, and I came across a db design problem where multi-table inheritance seems to be the best solution. Unfortunately, however, multi-table inheritance is not supported on Appengine because it…

Michael Godshall
- 880
- 11
- 18
2
votes
1 answer
Oracle Foreign Key Issues with Multi-Table Inserts and Blobs
We have a single table that we want to break up into a tree of tables based upon a particular source column. I wanted to try using a multi-column insert, but it seems that if I insert a blob into a sub table, I wind up with a foreign key constraint…

Charlie
- 7,181
- 1
- 35
- 49
2
votes
2 answers
MySQL (MyISAM) - update field to greatest of two fields from different tables
I have two tables, t1 and t2 with two columns each - id_user and age.
How do I update t1.age to the greatest of t1.age and t2.age for matching ID's and leave t1.age unchanged if there is no matching ID in t2.
Before update:
t1
+-------+---+ …

BojanG
- 1,872
- 1
- 15
- 23
2
votes
1 answer
mysql - Select all from one table and one column form another where $var is found
Ooooookay. I have two tables client and users. Both have AUTO_INCREMENT id but client table has credid-column whis is foreign key and references to users table's id.
I want to prepare a PHP PDO statement that fetches all columns from client-table…

H3ll1n
- 103
- 3
- 13