Is it good to use another table for another (but similar) business program?

There is a very similar question: Modeling products with completely different sets of necessary information and linking them to lineitems? But I can not find the answer that help me;

Someone from the above Q & A points to the creation of a database for storing various metadata data , which has a fantastic accepted answer, but since the search function is clearly necessary in my program, I do not want the performance to be compromised.


I am a “technician” who uses PHP + Oracle to track our company's sales progress and generate reports. Our workflow looks something like this:

  • Marketing guys provide ready-made data for my system;
  • Frontline staffs (sales) notes the progress of my system;
    • Any user can search for results in the system;
  • I create reports for marketers.

Problem :

Many dataset columns are the same (or may be considered the same), for example:

account|customer_name|gender|location|program_segment|...

But the marketing department. for example, to come up with new ideas (and abandon existing ones), so each "sales program (campaign)" may have its own data, for example.

For program 1, they may contain:

...|prev_coupon_code|last_usage_amount|...

However, for program 2, they may contain:

...|is_in_plan_1|is_in_plan_2|...

You have an idea.

Failed Attempts :

  • To store all the data, I used a table "long enough", which has all the possible properties (columns) and leaves empty / unnecessary properties NULL.

    , " ", "" " ": 41 , , .

  • - " " "" . , NUMBER(1) Y/N, DATE .., VARCHAR2, , ... "".

:

, UNION , " //?"

, ? ?


# 1:

, " " , , .

.

# 2:

" " : 10, 1.

+5
4

, , kludges.

XMLType . XML , XMLType . XPath, . .

, XML - pfaff, , , .

+2

, LOB Oracle. Oracle Intermedia/multimedia ( ) , , .

- , , start_date, end_date & c, , / XML/CSV CLOB.

, , .

+1

, ..

, 2 'campaign_name', 'campaign_value' , NAME, .

,

account|customer_name|.....|campaign_name|campaign_value
'ACC001'|'Frank Burns'|........|'prev_coupon_code'|[value of prev_coupon_code

:

account|customer_name|.....|campaign_name|campaign_value
'ACC001'|'Frank Burns'|........|'is_in_plan_1'|[value of is_in_plan_1

- , , . , , , .

, Excel, . ,  - , , _campaigns

0

2 .

, , "", .

id - primary, auto_increment.

name - .

, "report_marketing". report_id, . .

, LEFT JOIN.

, .

, :

SELECT report.name, report_marketing.ammount FROM report WHERE report.type = 'M'
  LEFT JOIN report_marketing ON report_marketing.report_id = report.id;
0

All Articles