473,387 Members | 1,779 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,387 software developers and data experts.

Trouble with creating one to many relationship between tables

Going back to school is easier said than done..

This was posted to an older thread earlier but I don't think it got any attention. Your help is appreciated

Professor requires we create a simple database and specified what are to be the primary keys and relationships etc.
I have created the four tables and established the neccessary one to many and many to one relationships between primary keys in the tables with the exception of one which tells me the relationship is "indeterminate" (originally there was no unique index found for the referenced field of the primary table) I am trying to establish the relationship between two primary keys (as instructed).

Course
CLassID, pk
Name
Credit_Hours
Catalog_Description

(one to many relationship est. between ClassID and ClassID in the next Table)

ClassOffering
ClassID,pk
Section,pk
Professor
(More, etc)

(One to many relationship established okay here between ClassID to ClassID but trying to establish a one to many relationship between Section in the ClassOffering table to the Section in ClassStu table creates new tables "ClassStu_1, CLassStu_2"in the relationship diagram. What am I doing wrong?

ClassStu
CLassID,pk
Section,pk
StudentID,pk

(Many to one relationship created okay here between StudentID and StudentID in next table)

Student
StudentID,pk
Name
Major
Class
GPA
Nov 12 '09 #1

✓ answered by ajalwaysus

Your tables are not normalized so first thing you need to do is look over this article about Normalization.

I hope no one else just gives you the answer outright, because that would defeat the purpose of this class you are taking. But I do hope you can find use in this article.

-AJ

6 4037
ajalwaysus
266 Expert 100+
Your tables are not normalized so first thing you need to do is look over this article about Normalization.

I hope no one else just gives you the answer outright, because that would defeat the purpose of this class you are taking. But I do hope you can find use in this article.

-AJ
Nov 13 '09 #2
MMcCarthy
14,534 Expert Mod 8TB
Once you have read the article please feel free to ask any questions to clarify what you don't understand.

I would guess based on the structure you have laid out that your instructor is trying to teach you about the use of Join tables to break up a many to many relationship between two tables. However, read the article and see how you get on.

Mary
Nov 13 '09 #3
NeoPa
32,556 Expert Mod 16PB
I see you haven't returned to respond. This is a shame as that article would be very helpful to you I'm sure.
@NicoleCartrette
That is one of the main reasons why posting your question in another member's thread is illegal here (See How to Ask a Question). We're not here to teach you manners, but we also need to protect our members from behaviour that is unacceptable.
Nov 15 '09 #4
I have read the posted material and it is very informative but what I forgot to mention was the table names and fields were determined for us.

It should be a one to many relationship between the Section in the Class Offering table and section in the Class-Stu table according to his relationship diagram.
The "section" in the Class-Stu table must also be identified as a primary key. The "section" in the Class-Stu table is set to Yes (Allow duplicates) but I do not understand why it creates new tables (ClassStu_1, ClassStu_2) when his sample relationship diagram shows only a one to many relationship between the two original tables.
Is it related to referential integrity or cascading? I have tried many different things.

In response to your statement NeoPa that you are not here to teach people manners I posted my question on an existing thread because I believed my question be closely similar to that posed on the other thread.
Nov 16 '09 #5
ajalwaysus
266 Expert 100+
@NicoleCartrette
I can understand why you did it, but that rule is there for your benefit as much as the thread owner's benefit. In the short time I have been part of this forum, I have seen many threads transform with the thread owner's needs (which is allowed since it is their thread), and those who post questions on someone else's thread don't get any attention. As you can see from this thread, your issue did not have the same outcome of the other thread you posted your question on, and if it did there would be no need for you to post your question in the first place.

It's all good, as long as we learn. =)

Welcome to Bytes.
-AJ
Nov 16 '09 #6
NeoPa
32,556 Expert Mod 16PB
@NicoleCartrette
I'm pleased and a little surprised (perhaps I judged too quickly) that you have returned to respond. Particularly as I thought AJ's post was apposite and should help you.

As AJ has also explained quite well, it is generally to all parties benefit that new questions be posted in their own thread. Having said that, you are a new poster and it would be unreasonable to expect you either to know all our rules as well as we do, or to have given the matter as much consideration as we have before posting in another thread.

Welcome to Bytes!
Nov 16 '09 #7

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

Similar topics

6
by: Jade | last post by:
Hi, I am trying to create a dataset with 6 tables and 5 relationships created between them. I am creating it in the Form_Load event. However i keep getting the following error... An unhandled...
31
by: Neil | last post by:
I have an Access 2000 MDB with ODBC linked tables to a SQL Server 7 back end. I currently have a selections table in the front end file which the users use to make selections of records. The table...
2
by: Sami | last post by:
Could someone explain clearly how to go about doing this? I have tried setting up the structure on numerous occasions, but it never seems to work. Could someone please help me out? Thanks!
4
by: Ronnie | last post by:
Ok let me just say first that I am a newbie in Access and I don't know much of SQL or VB programming. But I am trying to create this contact database using Access 97. I have created 2 tables,...
5
by: Mike Turco | last post by:
What is the difference between creating relationships in the front-end vs. the back-end database? I was trying to create a relationship in a database front-end and noticed that I could not check...
3
by: CAD Fiend | last post by:
Hello, I have a land development project that has a many-to-many relationship. I have ONE question regarding table structures, and ONE question on how to make a Form with two Subforms, below. ...
11
by: RobertJohn | last post by:
Hi all I am using Access 2007 to start a small home library application, and so far it has two tables. 1. Books, with fields Book_ID (Primary Key) and Title, and 2. Authors, with fields...
1
by: Tableshavturned | last post by:
Hi this is my first post on the forums. I haven't really developed before with Access 2003 so trouble shooting with this application is not my forte. The issue at hand is, created a star schema with...
2
by: adwest | last post by:
Forgive me if this is a foolish question. I "play" in Access and have only created a few rather simple relational databases. My knowledge and experience is limited. I have no formal training, just...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.