Performance impacts of attributes versus entities in data model design
I'm trying to understand the performance implications of two possible data model designs.
Here's my entity structure:
global > the person > the account > the option
Typically at runtime I instantiate one person, one account, and five option 's.
There are various amounts determined by the person's age that need to be assigned to the correct option.
Here are my two designs:
Design one
attributes on the person entity:
the person's age
the person's option 1 amount
the person's option 2 amount
the person's option 3 amount
the person's option 4 amount
the person's option 5 amount
attributes on the option endity:
the option's amount
supporting rule table:
the option's amount =
the person's option 1 amount if the option is number 1
the person's option 2 amount if the option is number 2
the person's option 3 amount if the option is number 3
the person's option 4 amount if the option is number 4
the person's option 5 amount if the option is number 5
Design two
attributes on the person entity:
the person's age
attributes on the option entity:
the option's amount
the option's option 1 amount
the option's option 2 amount
the option's option 3 amount
the option's option 4 amount
the option's option 5 amount
supporting rule table:
the option's amount =
the option's option 1 amount if the option is number 1
the option's option 2 amount if the option is number 2
the option's option 3 amount if the option is number 3
the option's option 4 amount if the option is number 4
the option's option 5 amount if the option is number 5
Given the two designs, I can see what looks like an advantage for Design one in that at runtime you have less attributes (6 on the one pension member + 1 on each of 5 options =11) than Design two (1 on the one pension member + 6 on each of 5 options = 31), but I'm not sure. An advantage for Design two might be that the algorithm has to do less traversing of the entity structure: the supporting rule table finds everything for the option's amount on the option.
Either way there is a rule table to determine the amounts:
Design one
the person's option 1 amount =
2 if the person's age = 10
5 if the person's age = 11
7 if the person's age = 12, etc.
Design two
the option's option 1 amount =
2 if the person's age = 10
5 if the person's age = 11
7 if the person's age = 12, etc.
Here it looks like the rulebase would have to do more traversing of the entity structure for Design two.
Which design is going to have better performance with a large amount of rules, or would it make a difference at all?
Hi!
In our experience you only need to think about things like this if you were dealing with 100s or 1000s of instances (typically via ODS). As you have a very low number, the differences will be negligible, and you should (usually) go with the solution which is the most similar to the source material or the business user's understanding. I also assume this is an OWD project? Which can be even better, since the inferencing is done incrementally when new data is added to the rulebase, rather than in one "big bang" like ODS.
It looks like design 1 is the simplest to understand and explain. I'm just wondering why you need the option entity at all, since it seems like a to-one relationship? So the person can only have one option 1 amount, one option 2 amount etc, and there are only ever going to be (up to) 5 options...is that assumption correct? If so, you could just keep these as attributes on the person level without the need for instances. If there are other requirements for an option instance then of course, use them, but given the information here, the option entity doesnt seem to be needed. That would be the fastest of all :-)
Either way, as the number of instances is so low, you should have nothing to worry about in terms of performance.
Hope this helps! Write back if you have any more info / questions.
Cheers,
Ben
Similar Messages
-
SAP BW SRM Workflow data model design
Hi All,
I have a requirement from my client to design SAP BW SRM Work flow report, in output user is interested for document flow/chain starting from Shopping cart (SC) - Bid invitation (RFx) - Bid (RFx responses) - Purchase order (PO) - Confirmation. There are standard datasources and DSO's for the same but I want to check experts ideas on data model design. I am thinking to build infosets on top of DSO's but it will impact Query performance as data volume for sure will be more and will increase down the line. In addition I need to consider below exceptions or restrictions as well:
1. Document may/may not start with SC for example one possibility is document start at SC and end at Confirmation or start at RFx and end at PO etc.
2. User is expected to see below various possibilities of document chain in report output:
SC - RFx - RFx responses - PO - Confirmation or
SC - RFx - RFx responses or
SC - PO - Confirmation or
SC - RFx - RFx responses - PO
SC - RFx or
RFx - RFx responses or
RFx or
RFx - RFx responses - PO or
RFx - RFx responses - PO - Confir or
PO - Confiramtion or
PO
your help and ideas on this is greatly appreciated
Thanks and Regards,
ReddyHi All,
Any inputs or ideas on the data model design? Thanks for your help in advance
Regards,
Reddy -
How to save data model design in pdf or any format..?
how to save data model design in pdf or any format..?
i ve created design but not able to save it any mage or pdf formatFile -> Print Diagram -> To PDF File
-
Trouble saving Data Modeler design 4.0EA3
Hello,
I'm having trouble saving a Data Modeler design. I can create and import tables into a physical model; however, when i save the model (File > Data Modeler > Save) it doesn't appear to be saved correctly since the resulting .dmd file is 0 bytes. If i close the design and reopen it, none of the tables that i created appear.
I'm using version SQL Developer Version 4.0.0.13.30 on Windows 7.
Thanks,
Petei don't see any recent errors in the datamodeler.log file. the only entries for the last 2 days are:
2013-11-12 11:04:52,116 [AWT-EventQueue-0] INFO DataModelerAddin - Oracle SQL Developer Data Modeler 4.0.0.825
2013-11-12 11:15:12,672 [AWT-EventQueue-0] INFO DataModelerAddin - Oracle SQL Developer Data Modeler 4.0.0.825
2013-11-12 11:26:59,517 [AWT-EventQueue-0] INFO DataModelerAddin - Oracle SQL Developer Data Modeler 4.0.0.825
2013-11-12 16:54:18,313 [AWT-EventQueue-0] INFO DataModelerAddin - Oracle SQL Developer Data Modeler 4.0.0.825
2013-11-13 10:44:03,694 [AWT-EventQueue-0] INFO DataModelerAddin - Oracle SQL Developer Data Modeler 4.0.0.825
2013-11-13 10:49:26,093 [AWT-EventQueue-0] INFO DataModelerAddin - Oracle SQL Developer Data Modeler 4.0.0.825
2013-11-13 11:08:11,679 [AWT-EventQueue-0] INFO DataModelerAddin - Oracle SQL Developer Data Modeler 4.0.0.825
if run sqldeveloper\sqldeveloper\bin\sqldeveloper.exe, the only message in the console is:
LOAD TIME : 205
no other messages.
I have 3 different builds of sql developer 4.x - they all have this problem. My 3.2 build does not have this problem. So, next, i installed the Data Modeler standalone version (4.0.0.825) and created a physical model with just one table - and i was able to save it! The .dmd had the following content (not 0 byte):
<?xml version = '1.0' encoding = 'UTF-8'?>
<OSDM_Design class="oracle.dbtools.crest.model.design.Design" name="test_dm_only" id="986F3685-3223-BAF6-8D69-6C2C4C52718E" version="3.5">
<createdBy>HillsP01</createdBy>
<createdTime>2013-11-13 16:36:18 UTC</createdTime>
<ownerDesignName>test_dm_only</ownerDesignName>
<capitalNames>false</capitalNames>
<designId>986F3685-3223-BAF6-8D69-6C2C4C52718E</designId>
</OSDM_Design>
So, looks like the Data Modeler works, but there's a problem with my installation with the full SQL Developer product. One thing that i noticed is that my full SQL Developer install does not have a full list of logical types. I had to manual create a the ones that i use. In the Data Modeler only install, all of the logical types were available out of the box. -
Performance Impact of Unique Constraint on a Date Column
In a table I have a compound unique constraint which extends over 3 columns. As a part of functionality I need to add another DATE column to this unique constraint.
I would like to know the performance implications of adding a DATE column to the unique constraint. Would the DATE column behave like another VARCHAR2 or NUMBER column, or would it degrade the performance significantly?
Thanks
Message was edited by:
user627808What performance are you concerned about degrading? Inserts? Or queries? If you're talking about queries, what sort of access path are you concerned about?
Are you concerned that merely changing the definition of the unique constraint would impact performance? Or are you worried that whatever functional change you are making would impact performance (i.e. if you are now retaining historical data in the table rather than just updating it)?
Regardless of the performance impact, unique indexes (and unique constraints) need to be correct. If you need to allow duplicates on the 3 current columns with different dates, then you would need to change the unique constraint definition regardless of the performance impact. Fast and wrong generally isn't going to be preferrable to slow and right.
Generally, though, there probably is no reason to be terribly concerned about performance here. Indexing a date is no different than indexing any other primitive data type.
Justin -
Hi Experts,
In Current project I need to design data model and create data flow strategy for SD,MM,PP,FI modules from R/3.The client wants to use BOBJ on top of BI Info cubes/Reports.Based on KPI's given I need to do Data availability in R/3,Data extraction,Data model analysis and submit the documentation for that.Please guide me how to approach step by step so that I can go ahead with clear cut strategy.Any documentation if it is there please share with me.
Regards
PrasadYou can find ASAP methodology and accelleretors related to modelling data here
https://websmp203.sap-ag.de/roadmaps
see the "ASAP Implementation Roadmap for SAP Exchange Infrastructure" there are New roadmap content for SAP Business Intelligence.
Regards,
Sergio -
Hi All,
I have one requirement to design the data model for BI. How to design a dataflow in BI. I know dataflow is different from data model. Could you pls let me know hoe to design it.
Is there any model available ...so that i can refer. if not let me know clearly what is a datamodel and how to design it.
Thanks,
JackExample of data flow:
http://wiki.sdn.sap.com/wiki/download/attachments/44794331/a6.gif
Data model:
http://wiki.sdn.sap.com/wiki/download/attachments/36064/5.JPG -
HR BW Data Model - Design & Delta Possibility
Dear All,
In our SAP BW HR Implementation - we have to do a full load everyday for PA, OM, TA, PY streams. and it is very time consuming.
fyi - we are using generic extractors.
Questions -
1. We would like to know if it is possible to swtich to DELTA. If yes, how!
2. Also any idea on the data modelling part - Like best practice for HR Data Modelling- (we are following LSA).
Crux - is to get the data loaded in time frame from 6-8Hrs from 20+Hrs it is taking currently.
Regards,
VinayHi Vinay,
Have u implemented Deltas to generic extractors ? if yes, can you please share your in puts.
As of now we would like to go for delta, but here are the challenges:
1) How to capture deletion records in ECC and update them to BI?
2) if you are extracting multiple times in day then how would you populate the TIMESTAMP in ECC as none of the info types have TIMESTAMP field -
How to upgrade Data Modeler design to new version when using subversion?
Hi,
I just installed Data Modeler 3.1 product version and I'm using subversion. When I open a design which I have modified with earlier 3.1EA3 version, I get the message " This design is in old format You should use "Save as... from file menu ...
Is there other more smart way to upgrade to new version than "save as" ? I remember having problems in earlier versions with this also. Am I supposed to save the design with different name or...? Or what is the best way?Hi ,
I have updated the model to 3.1 version with subversion and I have to say that is quite hard for me,
I have "save as" with other name in other folder and after I have dropped from SVN my current folder and copy the new files to new folder in SVN and add the files to SVN,
I hope that I should not do this workaround too many times in future,
maybe if we save the model below a folder with the version number of the tool will help us but I don't like this option,
I guess someone could help us with a simpler solution than mine,
Regards -
Data Modeler design rules warning
When I apply the design rules to the relationel model Data Modeler warns me about both Primary keys and Foreign keys "with wrong naming standards is not recommended".
However, I have designed the naming rules in the Tools => General Options => Naming Standard => Templates section for example like this: Primary Key: PK_{table abbr}_{column abbr} or like this {table abbr}_{column abbr}_PK and defined table and column abbreviations. Data modeler warns about either form, and since only recommended naming rules exists I do not understand the warning.The warning is shown if you deviate/rename the constraints from what is set in the templates, so having selected abbr from the variable list you should not be seeing the warning. We extended the variables to include the abbreviation and it looks like these have not been included in the validation. I have logged a bug to track that.
Sue -
Grouping and setting attributes by group in data modeler
Hi,
I wanted the enhancement to hide foreign keys but until that comes I was thinking I could simply set all the foreign key I want not visible to a colour of white, which worked quite well.
For the tables that are basically System such as Language Codes - I defined a Classification Type of System and set them to an identifiable colour to show they are connected but the connections will not be visible on the diagram.
Then I tried to do the same for the Foreign keys but there is no way of setting a standard colour which can be changed.
So I had to set each one to white, which is a pain but then I have white marks across my diagram which I may be able to live
with. In most diagrammer mappers they have a send to back which would solve this - please???
But then I come to the problem that I can't then see them to change them back as they are white ;)
Is there any grouping mechanism that I can group together foreign keys so I can put in this temporary fix?
So I guess I'm on
1. Classification for Foreign Keys - any way to do this?
2. Grouping and Sending groups to the front or back of the diagram.
Thanks,
p.Hi,
you can use dynamic properties to build your own functionality - there is dynamic properties page for each object. you can create them using UI and use them in scripting.
the following script uses dynamic property "cl_type" and check for value "t2"
fkeys = model.getFKIndexAssociationSet().toArray();
//create color using integer
color = new java.awt.Color(16724838);
for (var i = 0; i < fkeys.length; i++) {
fk = fkeys;
cl_type = fk.getProperty("cl_type");
if(cl_type!=null){
if(cl_type.indexOf("t2")==0){
fk.setUseDefaultColor(false);
fk.setBackgroundColor(color);
fk.resetEdgeParams();
}else{
// set for other types or reset to default
fk.setUseDefaultColor(true);
fk.setBackgroundColor(null);
fk.resetEdgeParams();
you need to transform RGB color to integer - I found calculator here http://www.shodor.org/stella2java/rgbint.html
Philip -
MDM Data model design for Main table visa vis lookup table
Hi ,
I would like to know whether the legal entities or Address table which are common for all MDM main tables like Customer ,Vendor,Material,Business Partner etc can also become a main table when their attributes are around 30-40 range.
Is it a sound design approach to make Company table with about 50 attributes and say address table with 20 attributes as Main table and replicate a small company-id table with 2 or 3 attributes to link to the main table(company)? This will ensure replicating that small table(company-id) to all other Main tables(customer,vendor,......) instead of replicating that big company table as lookup for all main tables?
Thanks in advance for any idea or feasibility comments.
-reoHi, Deepak
>>> - How can I populate the data in the lookup table at the same time when I am populating the main table ? I have only the XML's that correspond to the main table . I don't have seperate data for the lookup tables .
I don't think you can populate both main table and all fields of lookup tables at the same time, i.e. using same map. You can consider 2 options to upload all information you have:
1) If your XML file contains data you would like to upload to lookup tables, you can upload it to MDM lookup tables with several maps using same XML and choosing different sections of that XML corresponding to different MDM lookup tables.
2) Also you can upload main table simultaneously with lookup table entries (using same map), but in this case new lookup table entries will only contain display field values that you mapped. To do this you should use 'Add' value mapping functionality for fields that you mapped to lookup tables.
>>>- Can I use the standard maps available for import in the business content of material repository in MDM ?
1) In case you have material master repository delivered by SAP and you use XML files which structure corresponds to SAP predelivered XSD schemas then you can use these maps undoubtedly.
2) If your repository is based on SAP predelivered, but you changed it ,you should adjust these maps due to differences in repository structure and XML files structure.
3) If you created your repository from scratch you should consider option of making your own import maps.
Regards,
Vadim Kalabin -
Data model Design-BI.7.0
Hello Experts,
I have a BW 3.5 AS IS system where I have a data flow
6Data sources---> 1 infosource-> UR> ODS> UR-> Cube
Now I need to Map this data flow into an entirely new BI 7.0 System.
I think of two options to map this flow into my new system
1) Map 6 transfromations to an Infosource and 2 transfromation to the UR fro DS0 and Cube (8 transfromations)
2) Map 6 data sources directly to the DSO with out any infosurce in the middle(6 transfromations) and then a transfromation to Cube --- IS this correct method as I see no infosource is needed in BI 7.0
Do I need to create an infosource or not ?
What is the Best method to implement this.(If a start routine exist in AS IS in UR, then What i need to do to in BI 7.0 to implement this START routine as its realed to structure coming from infosurce)
Thanks alot for your suggestionsHello,
here is some points which can helps your requirements
The InfoSource is not mandatory anymore. However, they can be used eg where you need
InfoObject based information and this is not part of the DataSource.
1.Transformations are dirctly linked from source infoprovider(or data source) to a target infoprovider
2.An infosource is usually not needed
3.New infosource architecture is used (Flat-info object based
eg. A flexible infosource is necessary inorder to use currency or unit conversion from source Datasource-->define infosource as intermediate structure
the infosource as uniform source for several targets
info source is not mandatory in 99% cases
for your scenario you can use the flow as without infosource i.e 6 datasources> 6 tranformations>ODS
start rotine can be used in the transformation as well if you are not having the infosource also
Hope this will helps you
Thanks
Ramesh. -
Query about Data Model Design, UPDATED_ON
hi on a *.ppt called ODTUG2007_Advanced_APEX.ppt, that i found on google <www.oracle.com/technology/products/database/application_express/ppt/ODTUG2007_Advanced_APEX.ppt>, i found a something that might be very interesting in using in my APEX app... it said something about some Standard Columns, and "phrases" (created_by, created_on, updated_by, updated_on) that i would like to see and learn how to implement.
So i do appreciate if anyone has got an example, or can explain them to me...
Best regards.
Jaison GonzálezJaison,
There's another way to do that might work for you:
1. Create the fields updated_by and updated_on in the table;
2. Create in the page the items PX_UPDATED_BY and PX_UPDATED_ON of type "Text field (saves state)";
3. Go to the properties of the item.
PX_UPDATED_BY
Source:
- Source Type: Database column;
- Source Value or expression: updated_by
- Post Calculation Computation: :APP_USER
Default:
- Default value: &APP_USER.
PX_UPDATED_ON
Source:
- Source Type: Database column;
- Source Value or expression: updated_on
Default:
- Default value: sysdate
- Default value type: PL/SQL Expression
When the user submits the changes, the table fields are updated.
Regards,
Ricardo Stumpf
Brasília - Brazil
Message was edited by:
Stumpf -
Help Needed with Data-modeling to build an application on
Hi would anyone be able to help me in creating a data model cause im really stuck with this one .Basically if been asked to create a survey application in oracle apex that use to excel based . So the info i was given was in a form of excel sheet which looks like this
NAME
E-MAIL
TSSA
ORACLE
HP
IBM
MS
SAP
INTERGRAPH
CISCO
Relationship
Contracting
Performance
Architecture
Supplier Feedback
comments
Jxxxxxx yyyyyyf
[email protected]
Yes
Yes
Yes
Yes
x
requested to be added
nnnitha iiiiiah
[email protected]
Yes
Yes
Yes
x
x
Knnnn kkkikot
[email protected]
Yes
x
x
is not payed
Gggrt Louuuue
[email protected]
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
x
x
x
x
jeiiiha ad
[email protected]
Yes
x
to meet with
John Rat
[email protected]
Yes
x
x
So where it says yes thous are the vendors that people associated with them have to asses and where there's an X thous are the topics that the vendors have to be rated on . So if for example the first guy on the list Jxxxxxx yyyyyyf will asses TSSA , ORACLE, HP , IBM , MS , SAP on the topic of Architecture and if you look at the second user nnnitha iiiiiah he would rate TSSA , ORACLE , INTERGRAPH on the topics of Relationship and performance . Any idea how i could data model this to get my table structures right .so that features like completion status could be displayed to the user through APEX which can only be done by a correct data-model i have tried normalization but i did go anywhere becauce there are so many variations any idea on how you would go about data modeling this would be greatly appreciated thank youNot really an APEX specific question.. Maybe you should try posting this in the data modeler forum : SQL Developer Data Modeler
Thank you,
Tony Miller
LuvMuffin Software
Maybe you are looking for
-
Date field is always disabled in qlist form
Hi, We are using Qlistform(quest webpart), and observed that when I include a date time field(new form), date field's calendar popup is greyed out, But I can only change the time, but not the date. Any resolution for this? Thanks, Poonam
-
I implemented the extended classic scenario. In the po print , I need to display if the po is or not approved. I have a customized approval workflow on 2 level. I need to understand if the po is or not approved on all 2 level. Thanks for the help
-
My gawd this site is the most ridiculously difficult site I've ever seen. Round and round we go and where we stop nobody knows. Will someone please tell me how to make the prompt for Adobe Reader update 11.0.09 go away?? It already shows that num
-
SYSTEM_PRIVILEGE_MAP
What is the 'PROPERTY' field in SYSTEM_PRIVILEGE_MAP for? Thx. Aliq
-
Proportional Scaling external Image to stage
Sounds confusing I know but basically I want to place some images on the stage and I want every image, whether big or small, portrait or landscape, to be scaled to about a quarter of the stage size. I have tried coding this myself and even tried many