Solved

Delphi database relationships

Posted on 1998-04-13
2
227 Views
Last Modified: 2013-11-23
Hello all,

      I'd like to knom how to built 1 to 1, 1 to n, m to n relationships in delphi databases using paradox tables? Paradox allows duplicated keys? How?

                  Tanks in advance
0
Comment
Question by:oberdan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 5

Expert Comment

by:julio011597
ID: 1361483
Yes, Paradox tables allow duplicate keys as long as they belong to secondary indexes.

Is this what you were looking for?
0
 
LVL 4

Accepted Solution

by:
itamar earned 100 total points
ID: 1361484
Hi oberdan,

To implement relations:

1 to 1 - ORDERS.CustNo -> CUSTOMERS.CustNo
             In CUSTOMERS, CustNo must be the primary key or a unique index, so the relation will be from 1 record to 1 record;

1 to n - ORDERS.OderNo -> ITEMS.OrderNo
            In ITEMS, OrderNo must be a SECONDARY index AND with the Unique check box             unchecked. (This answer your second question). It's a typical master/detail model.

m to n - Not only in Paradox, but in any relational model, you must convert this relation in a               separated table with 2 fields, one for each foreign key of the tables related.

I sugest you to take a look at the ORDERS and ITEMS tables of DBDEMOS alias of Delphi.
There are typical cases in it.

IHTH,
Itamar


0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question