A type of integrity constraint used in a RDBMS platform to ensure that a value in a column matches one of a range of key values from another table.
2
votes
2answers
171 views
multivalued weak key in ER database modeling
I was wondering since i didnt find out any clarification for this.
I want to store movies that exist in different formats (dvd, bluray etc) and the price for each format differs from each other as ...
1
vote
2answers
98 views
Use single table with foreign key or two twin tables for text entries?
I have a table answers that has several columns including the content iself such as
ID | q_id | list_id | user_module_id | content | updated_timestamp
The content column is a varchar since we want ...
0
votes
2answers
38 views
Usage of foreign key when the referenced table data will not change
I have to design a table where user has 10 fields and 6 are dropdown. Some are single selections and some multiple. Dropdown data is supposed to change very rarely.
For e.g., the user is presented ...
0
votes
1answer
33 views
Foreign key with multiple references
I have the following three tables in mysql database named "THE_COLLEGE"
mysql> desc students;
+----------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | ...
0
votes
1answer
34 views
Refer to a table with all rows or to the table which restricts allowed rows?
There are some discounts:
CREATE TABLE `discounts` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`value` decimal(4,2) NOT NULL,
`titleru` text COLLATE utf8_bin NOT NULL,
`titlehe` text ...
0
votes
1answer
86 views
Modify MySQL foreign key related column without dropping foreign key relation
I need to modify a foreign key related column. When I tried to alter it I got "Error on rename of 'x' to 'y' (errno: 150)" error. So I googled and found foreign key relation is the 'villain'. I ...
1
vote
0answers
39 views
Classes and objects (but not ORD)
I am looking for help laying out a database that stores information similar to a class definition and then also instances of those 'classes' (but not referring to an ORD). The specific example is ...
1
vote
0answers
84 views
Dealing with Invisible Referencers
Using Oracle database, suppose I have a parent table parent defined in schema A, and a child table child defined in schema B. To achieve this, schema A granted references privilege on parent to schema ...
0
votes
0answers
57 views
Database associative table
I have a coworker who's insisting on using associative tables to create nullable associations. For example, we have this table :
cm.accounts
----------
id:int (PK, identity)
...
sm.services
...
0
votes
0answers
100 views
How to represent class table inheritance (current DBMS-specific way please)?
I want to implement class either-or table inheritance (Account, CatAccountDetails, DogAccountDetails) in SQL Server.
I found a recommendation for MySQL here (How do I map an IS-A relationship into a ...
0
votes
0answers
136 views
Consequences of multiple FK's from same column to multiple tables
I know it's possible to create multiple FK's to different tables using the same column, other than the performance hit caused by having a FK, are there any negative consequences of doing so?
...
0
votes
0answers
40 views
How can I make MySQL rework its foreign keys?
I somehow tricked MySQL into believing I have a foreign key that does not exist.
I had a table with both an Id column and a Number column. I wanted to merge the two, so I cleared the few tables ...