CDT(Custom data type), purpose of CDT and were should we use CDT?

Hi,

Could any of you explain me what is CDT, why do we use CDT and when can we use it?

  Discussion posts and replies are publicly visible

  • 0
    Certified Senior Developer
    Hi tanveera0001,
    Follow the Below links for better understanding of cdt

    docs.appian.com/.../Custom_Data_Types.html
    docs.appian.com/.../CDT_Relationships.html

    Regards,
    Krishna.
  • Custom data type is like a data type with unit of related attributes.
    Example primitive data type are integer, decimal, string etc.
    Example CDT is Student with attributes StudentId, name, age, gender, bloodGroup etc.

    Purpose of CDT:
    CDT defines the related information. Like a Student has its ID, Name, Age, Gender and BloodGroup.
    Its most like a Class in Java.
    CDT helps to carry the process information as a single unit.

    For more technology specific information goto Appian docs.
  • CDTs are your data models that represents your application. It is helpful in encapsulating and packaging all the data together especially if they have similar purpose.

    It is primarily used for:
    - Packaging similar information on one data model.
    - Map database tables and fields to create an abstraction.
    - Type specific queries
    - Rule inputs
    - Saving data
  • Hi,

    what i'm going present is a basic view of CDT.
    CDT's are simply Complex/Custom Data Types , well we design them dependents on the requirements we have, suppose Integer, Float, Double, Char, etc etc are the Primitive data Types, which we create variables on them and may be assign, declare or initialize the values( can also read externally )..

    Likewise! CDT's use these Primitives to create a Custom CDT, we can load a CDT already existed into new CDT and use it for the another purpose..

    Example: :Lets assume 1, End User(Business User) signing Up for Gmail ,

    Steps:
    1) Login Page will have some user details like First Name, Last Name, User Id, Password, Re-Type Password, phone number, etc etc.

    Now CDT will help us to create all the fields under on name.
    2) Some one came and left us a new requirement to create a login page for Facebook,
    now we can re use the CDT we created , as Gmail and Facebook will/might have similar fields , not might be exactly the same ..
    if Gmail & FB has 10 fields in common , we can make this as CDT, for the rest of the fields you can keep adding them..

    I hope this might give you an overview of What a CDT is.

    people Allowed to correct me if am wrong.
    Thanks
    JB
  • Hi Taanvera001,

    Please find below referral link where you can find more information about CDT.

    docs.appian.com/.../Custom_Data_Types.html

    Best Regards,
    Balaji Palla
  • Hi Taanvera0001,

    The below referral link Provide more information about CDT.

    docs.appian.com/.../Custom_Data_Types.html
  • you can find more details in the below link
    docs.appian.com/.../Custom_Data_Types.html
  • 0
    Certified Lead Developer

    Hi tanveera0001

    It's a structure which represents a logical grouping of related data/attributes/properties.

    Example: Address CDT which has some related attributes such as line1 Address, line2 Address, address Type etc.. similarly whenever you get such requirement, we need to go for CDT.

    CDT is similar to a Persistence Class in JPA/Hibernate which is being used in Java to interact with the Database.

    Benefit and usage of CDT

    • Lets's assume you want to capture various attributes of employee such as fName, lName, email etc.. if you do not opt for CDT then we need to defines at least 1 variable for each component and this will add difficulties in managing the data, and identifying which attribute is logically grouping with the other one.
    • If you do not opt for CDT then you will need to use Native SQL to perform any operation on DB such as Query, Update, Insert, Delete etc..
    • If we depend upon Native SQL then we need to re-write the expressions whenever we shuffle from one DB Vendors to another (such as MySQL to Oracle) as we know that, Native SQL differs from One vendor to another. Hence this adds an additional maintenance and in this case you will not be able to utilize the feature of JPA (migrates the query based on the mapped DB vendor)
    • If you do not have a CDT then you cannot build an Entity Backed Record, instead you will need to go for Expression Backed Record with Native SQL which is never a recommended approach

    Similarly there are several other reasons why we need to go for CDT. And as per my understanding, in most of the use-cases we should go for CDT.

    Hope this will help.