×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Need Help in Table Design

Need Help in Table Design

Need Help in Table Design

(OP)
Hi,

My requirement is to collect metrics from database/ datawarehouse environment and publish it.

A master table with the below structure will hold the required information:

Metrics Master
==============

Metrics Id
Metrics Name
Query

The query will contain the select query which would be executed dynamically by a procedure and collect the resultant.

The query & the number of columns would vary from metrics to metrics...

Now require help in designing transaction table which would hold the data collected by dynamically executing the query...

Metrics Transaction
====================
Metrics Transaction Id
Metrics ID
Col1_value
Col2_value
:
:
Coln_value

Where 'n' would be the maximum no of columns available in all of the designed metrics

I found that this design is not so good.  Does anyone have any better suggestion or any other alternative design to suit

Thanks,
Shantha.
 

RE: Need Help in Table Design

Why is it not possible to publish the data from the query?

http://lessthandot.com

RE: Need Help in Table Design

(OP)
Not for all metrics, but for few we want the data to be stored in the db to do some trend analysis.

Thanks,
Shantha.

Talent is what you possess;
genius is what possesses you

 

RE: Need Help in Table Design



It might be better...

Metrics Transaction
================
Metrics Transaction ID
Metrics ID
FieldName
FieldValue


 

Skip,
glassesDon't let the Diatribe...
talk you to death!tongue

glassesJust traded in my old subtlety...
for a NUANCE!tongue

RE: Need Help in Table Design

I suppose you could use something on the lines of:

Metrics_Transaction_ID
Metrics_ID
Col_Name
Row_Name
Cell_value

However, if it is only for a few metrics to be used in trend analysis, I suspect the best thing to do would be to create tables for each of them, so that the data can be appended.  

http://lessthandot.com

RE: Need Help in Table Design

(OP)
Hi Remou,

What row_name indicates?

Thanks,
Shantha.

Talent is what you possess;
genius is what possesses you

 

RE: Need Help in Table Design

I do not know what your queries return but a crosstab is possible so it may be necessary to store Column 1 values as row names for ease of retrieval.

 

http://lessthandot.com

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close