Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
vijendra_t
Partner - Contributor
Partner - Contributor

One to one relationship

Hello Qlik^ers...

Please help me to understand relationship: 1 to 1, 1 to Many, Many to Many

 

Sample Script:

Table1[

LOAD
OrderID,
LineNo,
ShipperID,
CustomerID,
ProductID,
EmployeeID,
ShipmentDate

FROM anc.qvd

]

Table2:[

LOAD
OrderID,
LineNo,
ProductID,
Quantity,
UnitPrice,
Discount
FROM bbc.qvd

]

 

1 Solution

Accepted Solutions
Yoshidaqlik
Creator II
Creator II

Hi,

I will try to use some examples

1 to 1

would be a relationship where there is only one possible binding for each record in two tables

Employees:
Load
Employees_ID,
Name
From Employees_Table;

Current_wage:
Load
Employees_ID,
Current_wage
From Current_wage_Table;

 

1 to Many

When there is a possible link in one table that can be linked to several records in another table

Sales:
Load
Sales_ID,
Employees_ID,
Value
From Sales_Table;

Employees:
Load
Employees_ID,
Name
From Employees_Table;

 

many to many

when there are many result records that can link between two tables

Sales:
Load
Sales_ID,
Employees_ID,
Value
From Sales_Table;

Commission_history:
Load
Employees_ID,
Commission,
Date_Month
From Commission_history_Table;

 

 Regards

YoshidaQlik https://www.youtube.com/channel/UC1I9P8MqCZEhB6Nw3FdSqng

View solution in original post

2 Replies
Yoshidaqlik
Creator II
Creator II

Hi,

I will try to use some examples

1 to 1

would be a relationship where there is only one possible binding for each record in two tables

Employees:
Load
Employees_ID,
Name
From Employees_Table;

Current_wage:
Load
Employees_ID,
Current_wage
From Current_wage_Table;

 

1 to Many

When there is a possible link in one table that can be linked to several records in another table

Sales:
Load
Sales_ID,
Employees_ID,
Value
From Sales_Table;

Employees:
Load
Employees_ID,
Name
From Employees_Table;

 

many to many

when there are many result records that can link between two tables

Sales:
Load
Sales_ID,
Employees_ID,
Value
From Sales_Table;

Commission_history:
Load
Employees_ID,
Commission,
Date_Month
From Commission_history_Table;

 

 Regards

YoshidaQlik https://www.youtube.com/channel/UC1I9P8MqCZEhB6Nw3FdSqng
vijendra_t
Partner - Contributor
Partner - Contributor
Author

Thank you for help.

But I need help regarding  Scripting.

Can you help me Understand that.

Thanks again