Quantcast
Channel: Active questions tagged email - Stack Overflow
Viewing all articles
Browse latest Browse all 29755

mysql database design to store variables and use it in some other functionality

$
0
0

First of all, I am not a Database designer or expert.

I need suggestions and opinions on how to do this.

I am using a MySQL database.

I want to create a dynamic email creator and sender.

This has bellow functionality,

  1. Users can create and design emails.
  2. In that email, the user wants to send some dynamic values, and for that, I want to allow the user to create variables, and also allow to set its value there or allow to define from where the value of the variable will be taken.
  3. Then this all need to save in the database tables and the user also select the trigger, when this email send process will be initiated.
  4. Then based on this information, in java I will write code to put the actual value of the variable and prepare the complete email body and send it.

So, for this I want an idea or help to design the database for the variables and its value mapping.

I have created 2 tables, but I am not satisfied with it or, I am looking for the reight more complete design.

Variable_mst

Variable_id | variable_name
------------+----------------
1           | site_owner_name
2           | section_name
3           | question
4           | Action/Task
5           | due_date
6           | Assign_to
7           | Task

Concated_Variables

Variable_id  | othre_concating_variable_id
-------------+----------------------------
7            | 2
7            | 3
7            | 4
7            | 5
7            | 6

-> Now, if I want to use the "task" variable and if I mark this as "repeat =true" then In the email body if I write only "@task", it may create as many tasks rows as I have from some other data.


Viewing all articles
Browse latest Browse all 29755

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>