Table design question

Hello,
I have a quick question on a table design. I currently have a table that will store approval information on a report. The individual report will need to go through 3 levels of approval before it's considered final. I have considered a few different scenarios on how to design the table but I'm not sure on what is the best choice. Currently I'm using 3 columns that will store each approval. For example,
Table 1:
file_id,
subject,
summary,
division_approve,
program_approve,
group_approve
I thought about using one column and simply stepping through a higher numeric value for each approval but found that doesn't work if I want to view items that were approved only at the division_approve level. Does anyone else have any suggestions? Hopefully I provided enough information.....
Thanks in advance!
Randy

yes, better going for higher level of normalisation and desiging more tables:
tab_aproval ( id,File_id,Approval_authority,rank )
id      File_id Approval_level rank
1     1 first_level 1
2     1 second_level 2
3     1 third_level 3
4     2 first_level 1
5     2 second_level 2
tab_file_approval
file_id, subject, summary, id
1 'doc 1' 'first level done' 1
1 'doc 1' 'second level done' 2
1 'doc 1' 'third level done' 3

Similar Messages

  • A table design question

    Suppose I have a big table with 10 million rows. It essentially stores entities and their statuses. On any day a status could potentially change.
    How should the table be designed so 1. it can give quick retrial to get status of a given date. 2. allows quick update (either a few entry or mass update).

    admin1 wrote:
    Suppose I have a big table with 10 million rows. It essentially stores entities and their statuses. On any day a status could potentially change.
    How should the table be designed so 1. it can give quick retrial to get status of a given date. 2. allows quick update (either a few entry or mass update).
    What you are referring to is a type 2 slowly changing dimension.
    So your first step would be to review ALL of the sections pertaining to that in this doc
    Oracle® Warehouse Builder Data Modeling, ETL, and Data Quality Guide
    http://docs.oracle.com/cd/E18283_01/owb.112/e10935/dim_objects.htm#BEIHFEAG
    Overview of Slowly Changing Dimensions
    A Slowly Changing Dimension (SCD) is a dimension that stores and manages both current and historical data over time in a data warehouse. In data warehousing, there are three commonly recognized types of SCDs. describes the types of SCDs, as described in Table 3-1.
    Table 3-1 Types of Slowly Changing Dimensions
    Type
    Description
    Type 1
    Stores only one version of the dimension record. When a change is made, the record is overwritten and no historic data is stored.
    Type 2
    Stores multiple versions of the same dimension record. When the dimension record is modified, new versions are created while the old ones are retained.
    Type 3
    Stores one version of the dimension record. This record stores the previous value and current value of selected attributes.
    Your second step would be to use Oracle' Warehouse Builder tool to build the dimension table automatically for you as discussed in that same doc.,
    http://docs.oracle.com/cd/E18283_01/owb.112/e10935/dim_objects.htm#BEIHFEAG
    Creating Slowly Changing Dimensions
    You can create an SCD either using the Create Dimension Wizard or the Dimension Editor.

  • Design Question for table - related columns

    Hi,
    I have some design question about table I am working on.
    Here are the sample fields in the table,
    process_begin_date
    process_approved_by
    process_signed_by
    process_monitor
    process_communication
    the same way I have around 10 groups, for ex
    other_begin_date
    other_approved_by
    other_signed_by
    other_email
    other_something
    Question: Is good have all 50 fields in the same table? or any better idea?

    Hi,
    Number of columns should not be any issue, but, proper normalization may be better for your design and scalability. If you can explain what you are storing in this table, you might get help if you need to have more than 2 tables in this particular scenario.
    If all these fields are related to a single entity, probably this single table is already normalized and needs not to be replaced by two tables.
    Salman

  • Design question - add another table or another column?

    Hi there,
    quick design question:
    I have the following tables:
    Traveler
    CreditCard
    Group
    A traveler is going with group X and pay (creditCard) with Y. he can go on multiple groups and can pay with Y or Z...
    my question is this:
    should I make another table CrditCard_Group which will have the following columns:
    user_id
    group_id
    creditCard_id
    or simply to have in the creditCard table another column: Group_id
    thanks for any advise

    This is not JDBC nor Java, it's database modeling.
    Said this, the answer is: it depends; if you have to record the fact that a traveler belonging to a group pays with credit card X you need the table with three ids. If you just need to record the traveler using a credit card and the traveler belonging to a group you need two tables each with the two ids.

  • SOA real-time design question

    Hi All,
    We are currently working with SOA Suite 11.1.1.4. I have a SOA application requirement to receive real-time feed for six data tables from an external third party. The implementation consists of five one-way operations in the WSDL to populate the six database tables.
    I have a design question. The organization plans to use this data across various departments which requires to replicate or supply the data to other internal databases.
    In my understanding there are two options
    1) Within the SOA application fork the data hitting the web-service to different databases.
    My concern with this approach is what if organizations keep coming with such requests and I keep forking and supplying multiple internal databases with the same data. This feed has to be real-time, too much forking with impact the performance and create unwanted dependencies for this critical link for data supply.2) I could tell other internal projects to get the data from the populated main database.
    My concern here is that firstly the data is pushed into this database flat without any constraints and it is difficult to query to get specific data. This design has been purposely put in place to facilitate real-time performance.Also asking every internal projects to get data from main database will affect its performance.
    Please suggest which approach should I take (advantage/disadvantage. Apart from the above two solutions, is there any other recommended solution to mitigate the risks. This link between our organization and external party is somewhat like a lifeline for BAU, so certainly don't want to create more dependencies and overhead.
    Thanks

    I had tried implementing the JMS publisher/subscriber pattern before, unfortunately I experienced performance was not so good compared to the directly writing to the db adapter. I feel the organization SOA infrastructure is not setup correctly to cope with the number of messages coming through from external third party. Our current setup consists of three WebLogic Servers (Admin, SOA, BAM) all running on only 8GB physical RAM on one machine. Is there Oracle guideline for setting up infrastructure for a SOA application receiving roughly 600000 messages a day. I am using SOA 11.1.1.4. JMS publisher/subscriber pattern just does not cope and I see significant performance lag after few hours of running. The JMS server used was WebLogic JMS
    Thanks
    Edited by: user5108636 on Jun 13, 2011 4:19 PM
    Edited by: user5108636 on Jun 13, 2011 7:03 PM

  • FND tables design

    Hi,
    I was going through FND Design Data section on eTRM website .
    I need to understand a few things about table design here.
    I was surprised to see one composite primary key and one composite unique key instead of primary keys in single columns(concurrent_queue_id,concurrent_program_id and concurrent_processor_id) in the following tables
    FND_CONCURRENT_QUEUES -- Primary Key: FND_CONCURRENT_PROCESSORS_PK(columns:application_id,concurrent_queue_id)
                   Primary Key: FND_CONCURRENT_PROCESSORS_UK1(columns:application_id,concurrent_queue_name)
    FND_CONCURRENT_PROGRAMS -- Primary Key: FND_CONCURRENT_PROGRAMS_PK(columns:application_id,concurrent_program_id)
                   Primary Key: FND_CONCURRENT_PROGRAMS_UK1(columns:application_id,concurrent_program_name)
    FND_CONCURRENT_PROCESSORS -- Primary Key: FND_CONCURRENT_QUEUES_PK(columns:application_id,concurrent_processor_id)
                   Primary Key: FND_CONCURRENT_QUEUES_UK(columns:application_id,concurrent_processor_name)
    Let's consider FND_CONCURRENT_QUEUES table for instance.
    As per my understanding, concurrent manager name and id has to be unique throughout the suite.
    But, by decalring them as composite primary/unique key with application_id column,Oracle is saying that the uniqueness of concurrent manager's id and name is maintained across one particular module(application like AP,GL etc) only and not across the entire suite.
    Is that actually the case?
    Also,this concurrent_queue_id column is used as foreign key for many tables.
    Now, for a column to be used as a foreign key, it has to be either unique key or primary key itself alone(not a part of a composite key) in its parent table.
    In this case the column is a part of a composite primary key and still being referred from many tables as foreign key.
    Please clarify.Any additional comments on this are very welcome.
    I have exactly the same questions for the PROGRAMS and PROCESSORS(program library) tables as well.
    Thanks,
    Rushi

    http://etrm.oracle.com/pls/etrmlatest/etrm_search.search
    requires a metalink userid

  • Advise on Table design

    Dear all,
    I have a pool of data which are based organized has CATEGORY and SUB-CATEGORY. When I am configuring the database I should be able to define all categories at once, then being able to define which one is the Parent category of the others.
    For exemple if I have a set of Dishes for a restaurant, then I can classify those dishes in different menu category which are then the Parents category for dishes.
    Please note that a SUB-CATEGORY can have other sub categories attached.
    To have a better idea of what I am trying to do is similar things when you create folders and sub folders on a file system. From the configuration side of the database I should be able to define my category and subcategories and then organize them by a link
    ID or other stuff, in the same way I will organize folder.
    What will be the best Database table design for that scenario ?
    I am not a DBA, but have some basis so try to speak the same language as me :-)
    Thanks for help
    regards

    I think you have it with your design. There are a few ways to represent a hierarchy in SQL, and having two tables like this:
    CategoryID    CategoryName   
    ParentCategoryID
    1001         
    Dishes          NULL
    1002          Desserts       
    1001
    1003          Icecream          
    1002
    SubCategoryID    SubCategoryName   
    CategoryID
    10001                  
    Vanilla                     
    1003
    10002                  
    Strawberry              
    1003
    10003                   Butterscotch             1003
    Make sense ONLY if you can guarantee a two level hierarchy (or a fixed number of levels, where you might have yet another table SubSubCategory). Having a fixed number of levels can make processing a ton easier because your queries can be written in
    a straightforward manner because the levels of nodes in the tree  remain the same.
    Your requirements here:
    "CATEGORY can have other sub categories attached."
    Leads to the more flexible solution like you have set up:
    CategoryID    CategoryName   
    ParentCategoryID
    1001         
    Dishes          NULL
    1002         
    Starters       
    1001
    1003         
    Item1          
    1002
    1004         
    SubCat1        
    1003
    1005         
    SubCat2        
    1003
    1006         
    SubCat3        
    1003
    Because adding a subcategory on SubCat3 is as simple as:
    1007          SubSubCat1        
    1006
    Processing the hierarchy becomes an iterative process (using a recursive CTE) if you have needs to do a lot of aggregation on groups. There are techniques available to make things go faster than using this pattern in the implementation, but unless
    you are going to need 1000s of nodes, then this pattern works great (known as the adjacency list, where you are basically storing the adjacent node in your tree).
    Louis
    Without good requirements, my advice is only guesses. Please don't hold it against me if my answer answers my interpretation of your questions.

  • RPD Design Question

    HI All,
    i have a RPD design question on a requirement i am trying to do:
    i have a single oracle table loaded via a excel sheet ( different connection pool) called Emp Details (.
    I have another subject area which has Emp dims/Hierarchies/facts etc.
    i am joining the Emp Details (single table) to an alias table of Worker Details(Different Subject Area) by Employee ID Key. This alias of worker details is joined to different Facts and those facts are joined to different dims like manager hierarchy/Time Dim etc.
    Then in BMM layer, i added the Worker Detail Alias as an LTS under the Worker DIM which is connected to all facts. When i try to create the report in answers, the data is not being quantified by the Time Dim (Fiscal Qtr..etc). It repeats the same numbers for each fiscal qtr.
    Not sure where my design is failing.  what i am trying to do is do a using the alias table as a bridge to connect the external signle table to the other tables in the Emp Subject Area and then treating that Join as a dim. Please guide me on how i can make this work.
    Thanks

    Join the Emp Details to the fact.
    in BMM 2 options:
    1) You may go woth separate logical table for Emp Details
    2) As LTS to existing Worker Detail logical table by column mapping, it might need hierarchy changes and take care of consistency
    If helps mark
    ~ http://cool-bi.com

  • Design question: Link data between JFrames

    Dear all,
    I have a design question. I have this form in a JFrame where you can set an icon as a property. To achieve this, I have a "Set" button on the form which will open a new window with all the available icons. When you click an icon, I want the "icon" frame to be closed and the selected icon to be send to the original form. This is the way I do it now:
    Interface :
    public interface IconUpdate
    public void updateIcon(Icon icon);
    }Main frame with the "Set" button:
    public class Test extends JFrame implements IconUpdate, ActionListener
        private Icon icon = null;
        public Test()
            // add button and actionlistener and that kind of stuff
        public void actionPerformed(ActionEvent e)
            if(e.getSource() == btnSetIcon)
                new IconFrame(this);
        public void updateIcon(Icon icon)
            this.icon = icon;
    }The Icon frame:
    public class IconFrame extends JFrame implements ActionListener
        IconUpdate parent = null;
        public IconFrame(IconUpdate parent)
            this.parent = parent;
            // Initialize table,"Pick" button etc.
        public void actionPerformed(ActionEvent e)
            if(e.getSource() == btnPick)
                parent.updateIcon((Icon)list.getSelectedValue());
                this.dispose();
    }Maybe I made some spelling faults, but this is the way I implement it. Now my question is: is there another way to achieve my goal? If I have to create an interface for every "popup choose dialog" in my program, I have to create many of them. I know using a combobox in the main frame is an option, but I just want to use it this way. Can anyone tell me how I can rewrite this code to make it better / more professional?
    Tx in advance!!!
    Peter

    I can think of a couple options:
    1) Let IconFrame's constructor accept a Test parameter, instead of creating an interface.
    2) Make IconFrame into a modal dialog & have it store the user's selection in a variable. Then when you show the dialog, your action listener will block until the user selects an icon. Then you can call "getSelectedIcon()" to retrieve his/her selection. This would be much like the JOptionPane.showXXX() methods, and probably the cleaner solution.

  • Design question about when to use inner classes for models

    This is a general design question about when to use inner classes or separate classes when dealing with table models and such. Typically I'd want to have everything related to a table within one classes, but looking at some tutorials that teach how to add a button to a table I'm finding that you have to implement quite a sophisticated tablemodel which, if nothing else, is somewhat unweildy to put as an inner class.
    The tutorial I'm following in particular is this one:
    http://www.devx.com/getHelpOn/10MinuteSolution/20425
    I was just wondering if somebody can give me their personal opinion as to when they would place that abstracttablemodel into a separate class and when they would just have it as an inner class. I guess re-usability is one consideration, but just wanted to get some good design suggestions.

    It's funny that you mention that because I was comparing how the example I linked to above creates a usable button in the table and how you implemented it in another thread where you used a ButtonColumn object. I was trying to compare both implementations, but being a newbie at this, they seemed entirely different from each other. The way I understand it with the example above is that it creates a TableRenderer which should be able to render any component object, then it sets the defaultRenderer to the default and JButton.Class' renderer to that custom renderer. I don't totally understand your design in the thread
    http://forum.java.sun.com/thread.jspa?forumID=57&threadID=680674
    quite yet, but it's implemented in quite a bit different way. Like I was saying the buttonClass that you created seem to be creating an object of which function I don't quite see. It looks more like a method, but I'm still trying to see how you did it, since it obviously worked.
    Man adding a button to a table is much more difficult than I imagined.
    Message was edited by:
    deadseasquirrels

  • Design question - how to update a list?

    Hi there,
    design question: I have a table with the following columns:
    1. id
    2. ref_number
    3. ticket_number
    example:
    1 60 234
    2 60 256
    3 60 664
    4 60 237
    consider this - user can see on the screen the list of all tickets associated with ref_num (in the example above everything associated with 60)
    now I would like to UPDATE the list. The user might have added more to the list or, alternatively, remove from the list.
    The easiest thing to do is to DELETE all the list with ref_number=60 and then do INSERT
    Q: is this ok? if not, how would you update such a list if I don't have the id's of every row?
    thanks

    If you want to write code that's easier for you to write, you do whatever the hell you want.
    If you want to write good code, retain the ID.

  • Design question: Scheduling a Variable-timeslot Resource

    I originally posted this in general java programming, because this seemed like a more high-level design descussion. But now I see some class design questions. Please excuse me if this thread does not belong here (this is my first time using the forum, save answering a couple questions).
    Forum,
    I am having trouble determining a data structure and applicable algorithm (actually, even more general than the data structure -- the general design to use) for holding a modifiable (but more heavily read/queried than updated), variable-timeslot schedule for a given resource. Here's the situation:
    Let's, for explanation purposes, say we're scheduling a school. The school has many resources. A resource is anything that can be reserved for a given event: classroom, gym, basketball, teacher, janitor, etc.
    Ok, so maybe the school deal isn't the best example. Let's assume, for the sake of explanation, that classes can be any amount of time in length: 50 minutes, 127 minutes, 4 hours, 3 seconds, etc.
    Now, the school has a base operation schedule, e.g. they're open from 8am to 5pm MTWRF and 10am to 2pm on saturday and sunday. Events in the school can only occur during these times, obviously.
    Then, each resource has its own base operation schedule, e.g. the gym is open from noon to 5pm MTWRF and noon to 2pm on sat. and sun. The default base operation schedule for any resource is the school which "owns" the resource.
    But then there are exceptions to the base operation schedule. The school (and therefore all its resources) are closed on holidays. The gym is closed on the third friday of every month for maintenance, or something like that. There are also exceptions to the available schedule due to reservations. I've implemented reservations as exceptions with a different status code to simplify things a little bit: because the basic idea is that an exception is either an addition to or removal from the scheduleable times of that resource. Each exception (reservation, closed for maintenance, etc) can be an (effectively) unrestricted amount of time.
    Ok, enough set up. Somehow I need to be able to "flatten" all this information into a schedule that I can display to the user, query against, and update.
    The issue is complicated more by recurring events, but I think I have that handled already and can make a recurring event be transparent from the application point of view. I just need to figure out how to represent this.
    This is my current idea, and I don't like it at all:
    A TimeSlot object, holding a beginning date and ending date. A data structure that holds list of TimeSlot objects in order by date. I'd probably also hold an index of some sort that maps some constant span of time to a general area in the data structure where times around there can be found, so I avoid O(n) time searching for a given time to find whether or not it is open.
    I don't like this idea, because it requires me to call getBeginningDate() and getEndDate() for every single time slot I search.
    Anyone have any ideas?

    If I am correct, your requirement is to display a schedule, showing the occupancy of a resource (open/closed/used/free and other kind of information) on a time line.
    I do not say that your design is incorrect. What I state below is strictly my views and should be treated that way.
    I would not go by time-slot, instead, I would go by resource, for instance the gym, the class rooms (identified accordingly), the swimming pool etc. are all resources. Therefore (for the requirements you have specified), I would create a class, lets say "Resource" to represent all the resources. I would recommend two attributes at this stage ("name" & "identifier").
    The primary attribute of interest in this case would be a date (starting at 00:00hrs and ending at 24:00hrs.), a span of 24hrs broken to the smallest unit of a minute (seconds really are not very practical here).
    I would next encapsulate the availability factor, which represents the concept of availability in a class, for instance "AvailabilityStatus". The recommended attributes would be "date" and "status".
    You have mentioned different status, for instance, available, booked, closed, under-maintainance etc. Each of these is a category. Let us say, numbered from 0 to n (where n<128).
    The "date" attribute could be a java.util.Date object, representing a date. The "status", is byte array of 1440 elements (one element for each minute of the day). Each element of the byte array is populated by the number designation of the status (i.e, 0,1,2...n etc.), where the numbers represent the status of the minute.
    The "Resource" class would carry an attribute of "resourceStatus", an ordered vector of "ResourceStatus" objects.
    The object (all the objects) could be populated manually at any time, or the entire process could be automated (that is a separate area).
    The problem of representation is over. You could add any number of resources as well as any number of status categories.
    This is a simple solution, I do not address the issues of querying this information and rendering the actual schedule, which I believe is straight forward enough.
    It is recognized that there are scope for optimizations/design rationalization here, however, this is a simple and effective enough solution.
    regards
    [email protected]

  • LDAP design question for multiple sites

    LDAP design question for multiple sites
    I'm planning to implement the Sun Java System Directory Server 5.2 2005Q1 for replacing the NIS.
    Currently we have 3 sites with different NIS domains.
    Since the NFS over the WAN connection is very unreliable, I would like to implement as follows:
    1. 3 LDAP servers + replica for each sites.
    2. Single username and password for every end user cross those 3 sites.
    3. Different auto_master, auto_home and auto_local maps for three sites. So when user login to different site, the password is the same but the home directory is different (local).
    So the questions are
    1. Should I need to have 3 domains for LDAP?
    2. If yes for question 1, then how can I keep the username password sync for three domains? If no for question 1, then what is the DIT (Directory Infrastructure Tree) or directory structure I should use?
    3. How to make auto map work on LDAP as well as mount local home directory?
    I really appreciate that some LDAP experta can light me up on this project.

    Thanks for your information.
    My current environment has 3 sites with 3 different NIS domainname: SiteA: A.com, SiteB:B.A.com, SiteC:C.A.com (A.com is our company domainname).
    So everytime I add a new user account and I need to create on three NIS domains separately. Also, the password is out of sync if user change the password on one site.
    I would like to migrate NIS to LDAP.
    I want to have single username and password for each user on 3 sites. However, the home directory is on local NFS filer.
    Say for userA, his home directory is /user/userA in passwd file/map. On location X, his home directory will mount FilerX:/vol/user/userA,
    On location Y, userA's home directory will mount FilerY:/vol/user/userA.
    So the mount drive is determined by auto_user map in NIS.
    In other words, there will be 3 different auto_user maps in 3 different LDAP servers.
    So userA login hostX in location X will mount home directory on local FilerX, and login hostY in location Y will mount home directory on local FilerY.
    But the username and password will be the same on three sites.
    That'd my goal.
    Some LDAP expert suggest me the MMR (Multiple-Master-Replication). But I still no quite sure how to do MMR.
    It would be appreciated if some LDAP guru can give me some guideline at start point.
    Best wishes

  • Design question for database connection in multithreaded socket-server

    Dear community,
    I am programming a multithreaded socket server. The server creates a new thread for each connection.
    The threads and several objects witch are instanced by each thread have to access database-connectivity. Therefore I implemented factory class which administer database connection in a pool. At this point I have a design question.
    How should I access the connections from the threads? There are two options:
    a) Should I implement in my server class a new method like "getDatabaseConnection" which calls the factory class and returns a pooled connection to the database? In this case each object has to know the server-object and have to call this method in order to get a database connection. That could become very complex as I have to safe a instance of the server object in each object ...
    b) Should I develop a static method in my factory class so that each thread could get a database connection by calling the static method of the factory?
    Thank you very much for your answer!
    Kind regards,
    Dak
    Message was edited by:
    dakger

    So your suggestion is to use a static method from a
    central class. But those static-methods are not realy
    object oriented, are they?There's only one static method, and that's getInstance
    If I use singleton pattern, I only create one
    instance of the database pooling class in order to
    cionfigure it (driver, access data to database and so
    on). The threads use than a static method of this
    class to get database connection?They use a static method to get the pool instance, getConnection is not static.
    Kaj

  • Table Designer third rule thick is not working for me.  Any suggestions?

    I am trying to turn the third rule in a four row table thick. I go into Table Designer and select Every 3rd Thick.  The others are all none.  The table is not responding to the command to make the third rule thick as I need it to be.  Does anyone have any suggestions?  Thank you.

    To remove table format overrides, you need to go to Table > Format > Custom Ruling and Shading, and set as follows:
    For more info, see page 171 of my book.
    -Matt
    Matt R. Sullivan
    co-author Publishing Fundamentals: Unstructured FrameMaker 11

Maybe you are looking for

  • Organization Tab in Service Order in IC Agent Role

    Hi Experts , During the creation of a Service Order.,Complaints and Returns  from the front end I C Service Agent role , I am unable to maintain any Organization Data . I am unable to find the Organization Data tab to enter a Service Organization (ju

  • Idoc file to R/3 interface

    Hi All, I have a scenario to send EDI flat file to R/3. I need to write an interface program to read the file and map it to idoc and post it in the backend FI system Any sample program code or process would be helpful and appreciated. The reqmt is so

  • MM & Windows XP on MacBook Pro

    I just got a MM and it works wonderfully with the Mac OS on my MacBook Pro - but won't work at all on the Windows OS. Any cure for this? This is useless to me if it won't work with both OS. I need to decide if I should send the MM back.

  • Open a *.exe applicatio​n in LABVIEW with system exec function.

    Greetings, I would like to be able to lauch a *.exe application and open a specific file within my labview vi. The trick is to avoid using active X control at all cost. I would like to use the system exec function but I couldn't quite get it to work.

  • Srw.run_report dropping job id?

    Hi, Looking at the source of the SRW package it looks like it drops any error messages and job id:s etc when the submitting fails (e.g. a report trigger fails). How have you dealt with displaying the original error message from the report?