To introduce my question I would like to give an example. Suppose a customer wants to join a gym. A transaction is sent and contains:
- customer id
- name and surname
- start date
- end date
The smart contract receives the transaction and creates a membership at the gym. Where is this data saved? After some time I want to verify that the subscription has not expired and I send a checkRequest. Can I specify only the id and then the smart contract through the id search for the subscription? I mean, can the smart contract access the subscription knowing the id? Can the smart contract take the subscription that matches the sent id and do the check?
I cannot understand the difference between data saved on the blockchain permanently (when is this data saved?) and data that is saved in the smart contract (does the smart contract have storage?) Is there a difference? I know the question is trivial but I can't understand.