473,385 Members | 1,830 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Foreign Key

Dear all,

I m stuck in assigning foreign keys to a primary key.
I have a primary table with many foreign keys, for example, I have a
primary table (ID, Category(pk)) and each category has its own table
because each category has its own feilds and if i make one table for
all categories, there, some fields will be blank for some categories.
When I create relationship between the primary and child tables, it
works. But Now, when i open the primary table and want to expand for
the category information it asks me to choose master and child fields
and i can only choose one table as a child table (subdatasheet).

HOW CAN I VIEW ALL THE CHILD TABLES AS A SINGLE SUBDATASHEET?

I hope you people got the

thank you people in advance

farhaad,

Apr 10 '07 #1
1 4989
On Apr 10, 3:48 am, farha...@gmail.com wrote:
Dear all,

I m stuck in assigning foreign keys to a primary key.
I have a primary table with many foreign keys, for example, I have a
primary table (ID, Category(pk)) and each category has its own table
because each category has its own feilds and if i make one table for
all categories, there, some fields will be blank for some categories.
When I create relationship between the primary and child tables, it
works. But Now, when i open the primary table and want to expand for
the category information it asks me to choose master and child fields
and i can only choose one table as a child table (subdatasheet).

HOW CAN I VIEW ALL THE CHILD TABLES AS A SINGLE SUBDATASHEET?

I hope you people got the

thank you people in advance

farhaad,

Data being put into a single field should not come from more than one
table. You can't relate a field to more than one other field in one
other table. It sounds more like you need to re-think the design of
your tables. Perhaps an idea of how you've structured them could help
someone point out a better way to do it. Otherwise do some reading on
normalization and see if you can modify them to work better for you.

Apr 10 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: dcp | last post by:
I just installed the 4.1.0-alpha-max-nt version of MySql and have just started playing around with it. My first test was to try to create a couple of tables, one with a foreign key constraint. ...
0
by: Jeremiah Jacks | last post by:
I just upgraded to MySQL 4.0.14-standard for RedHat Linux and am using = the pre-compiled binaries. I have a database with INNODB tables. When I insert a row into one of the child tables, I get...
2
by: geoff | last post by:
The table creation script(at the end of this post) works fine on 4.0.1-alpha-win, but the foreign key constraints fail on 4.0.15-win. I am starting the server with the same command for both...
10
by: Bodza Bodza | last post by:
I'm having an argument with an incumbent self-taught programmer that it is OK to use null foreign keys in database design. My take is the whole point of a foreign key is that it's not supposed...
31
by: Robert Brown | last post by:
Let's say I have a type hierarchy: (just an example) the general entity customer: CREATE TABLE customer(customer_id int, customer_name varchar(250), customer_type int) three specific...
4
by: Simon Bond | last post by:
Hi there, I should point out I am very new to MySql, im trying to learn what I can. Basically im using Navicat to work with my databases. When making a foreign key, i am asked to enter the...
2
by: adammitchell | last post by:
How can you indicate that a FOREIGN KEY constraint references two columns in two different tables? "SQL Server Books Online" show an example of how to reference two columns in the SAME table:...
0
by: Scott Ribe | last post by:
I've got a problem which I think may be a bug in Postgres, but I wonder if I'm missing something. Two tables, A & B have foreign key relations to each other. A 3rd table C, inherits from A. A...
10
by: Shawn Chisholm | last post by:
Hi, I am trying to deal with a deadlock situation caused by foreign key references on insert and I was wondering if anyone knows what order the foreign keys are locked (or evaluated) in for a...
2
by: Ian Davies | last post by:
I have created a database with about 17 tables. I have been creating foreign keys some of which have worked but when creating others I get the message below ************************* 1005...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.