Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Delphi database relationships

Posted on 1998-04-13
2
Medium Priority
?
234 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 300 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

609 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