473,385 Members | 1,359 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.

Primary/Foreign Key EER Diagram Questions

blyxx86
256 100+
Good Afternoon Everyone,

I am migrating from MS Access to MySQL (TONS faster, not to mention the usefulness of triggers).

Well, I am running into problems with the way MS Access lets you design and the way MySQL designs tables. I test the joins and relationships with an ODBC Connection and linking the tables from within MS Access to my MySQL database.

My question is within the PK-FK relationships.

I usually would have one UNIQUE/Auto-Incremented id being created for most tables. However, when I create this type of relationship with certain tables I am unable to produce a truly enforced one-to-many relationship.

I am attaching the photo of the relationships I am concerned with presently.



Customer 1:N Customer_Model
Customer_Model 1:N Customer_Model_Detail

Customer_Model requires a UNIQUE index between Customer_id and Custom_Name, but I don't think that needs to be the PK for the table. I believe it would be simpler if I could generate a PK with an Auto-Increment option as this would solve my issue of having both [Custom_Name] and [Custom_id] as FK within Customer_Model_Detail.

When I do as described above with the Auto Increment PK, MS Access will not recognize the relationship between PK [Customer.Customer_id] and FK [Customer_Model.Customer_id] and instead of saying 'One-to-Many' within MS Access it shows as 'Indeterminate'

However, the relationship PK [Model_List.Model_List_id] and FK [Customer_Model_Detail.Model_List_id] always shows up as "One-to-Many" within MS Access.

Please help!

Thank you,
Kyle
Aug 14 '08 #1
2 5029
blyxx86
256 100+
As an addition...

Is this perhaps just a limitation of MS Access to read the MySQL table schema properly?

Is there a decent front-end application that I can use to sample the database structure that will recognize the relationships properly?

Below is the database as I THINK it should be designed.

Aug 14 '08 #2
blyxx86
256 100+
I think I solved the issue.

There may have been some strange setting in a key, because when I deleted the tables and started over they were able to join properly.

Everything seems to be solved.

Thank you!
Aug 15 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Lannsjo | last post by:
I need to change my primary key column type from smallint to int. I have tried: ALTER TABLE livegroup MODIFY id INT UNSIGNED NOT NULL AUTO_INCREMENT; But get an error message certainly since my...
4
by: Mavis Tilden | last post by:
Hi all, So I've been reading the newsgroups, and reading a few books trying to learn SQL and SQL Server 2000. The books tell me I need a Primary Key, and that every table should have one. I know...
3
by: William D. Bartholomew | last post by:
I'm working on a system that is very address-centric and detection of duplicate addresses is very important. As a result we have broken addresses down into many parts (DDL below, but I've left out...
6
by: Andreas | last post by:
Hello list, what about uniqueness of inherited primary keys ? eg you have : create table objects ( id int4, date_created timestamp(0), primary key (id)
14
by: Abhi | last post by:
FYI: This message is for the benefit of MS Access Community. I found that this prblem has been encounterd by many but there is hardly any place where a complete solution is posted. So I thought...
13
by: Tibor | last post by:
I am using PostgreSQL 7.4.1 (only through psql) I know, that the command ALTER TABLE OFFICES DROP PRIMARY KEY (CITY); and its foreign key equivalent: ALTER TABLE SALESREPS DROP CONSTRAINT
9
by: sonal | last post by:
Hi all, I hv started with python just recently... and have been assigned to make an utility which would be used for data validations... In short we take up various comma separated data files for...
3
by: Rick Kay | last post by:
I have a table that has a Primary key and a foreign key. The primary key is NOT an Identity field, however, the foreign key is. I would like to know if there is a way to have the foreign key reset...
6
by: ravichoudhari | last post by:
i came accross requirement of multiple foreign keys in a table referencing the same primary key another table. i created the table relations using the relations editor in access. even though i...
4
by: Peter | last post by:
I am interested in informed feedback on the use of Constraints, Primary Keys and Unique. The following SQL statement creates a Bands tables for a database of bookings Bands into Venues, where the...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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: 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: 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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.