I am a new comer in Appian, please help me with steps to implement One to One & One to Many relations.
Discussion posts and replies are publicly visible
One to One is simply achieved by one CDT or the other having a reference to the other CDT, most likely the reference of the CDT will be the ID or primary key. In a one to one relationship it doesn't really matter which one is the one with the reference to the other. If you make one of the members of the CDT a CDT itself (nesting), Appian will automatically generate the foreign key reference.
If there's a Many to One relationship, meaning the parent table with the reference can have multiple rows referring to the same row of the child table, the reference is stored in the parent. Appian will automatically make the references. In essence, you just nest a singular CDT in the parent CDT and Appian won't really care if some references are the same.
If there's a One to Many relationship, which occurs when you nest a list of CDT in a parent CDT, then the reference to the parent is stored in each of the children. Appian will do this automatically.
If there's a Many to Many relationship, that generally requires a separate lookup table [id, fk 1, fk 2], which database experts should more than likely build this directly in the DBMS and configure the CDTs afterward.
There are a number of resources available on this topic -- both via online training and documentation. You might start with "Database Design Basics:" https://academy.appian.com/#/online-courses/62e52c7b-cd92-457a-abd0-98e5f1a81142
Next -- Manage Data Using Custom Data Types: academy.appian.com/, but I recommend this course be taken in sequence through the Appian Developer learning path.
And then for a more advanced, but more in-depth view: https://academy.appian.com/#/online-courses/ce361d9a-79ba-42d0-bc10-a4279d46e874
If you prefer docs -- this is a great article: docs.appian.com/.../CDT_Relationships.html
Manage Data Using Custom Data Types link: https://academy.appian.com/#/online-courses/80d231bb-c1c1-4d4e-8471-d190a6f13070
Kara's suggestions are great - there's a lot of good content on Appian Academy that describes how to use different relationships. I also like this page in the docs on CDT design guidance that describes how to set up different relationship types using CDTs.
I'm also curious - do you have a use case in mind or are you just looking for general guidance? If you have a use case in mind, we can provide a bit more information if you describe your scenario.