Solved

Delphi database relationships

Posted on 1998-04-13
2
217 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

912 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now