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.

Similar Messages

  • Autocomplete from another table in another sheet in same file

    I found how to get a price to autofill using VLOOKUP. I like it.
    Now, I want to be lazier and not need to type in the full item name in the row heading completely & exactly every time. I also don't want to have a drop down menu in every item line in each table unless there is no better alternative. I would like Numbers to autofill from an inventory list (table with quantities, prices, etc.) in another sheet. It seems that I should have been able to find this function explained but my searches were inadequate.
    Then, I will want Numbers to automatically update another column in the inventory table with the quantity of that item sold & the amount remaining which will cause calculations for the value remaining & sold in other columns (without changing the original inventory column). It seems to me that the formula may require numbers to search each table in each sheet for the item name in that row and add all sale quantities together. This means that the formulas would be constantly searching which sounds like it could slow things down a bit. So, again, maybe there's a more efficient way of doing this.
    Please help me find these efficiency tools. ThankU

    Mr. "P" wrote:
    I want to copy an entire row from one table in one sheet to another table in another sheet retaining all values and formulas? So that if I make a change in the original sheet it propagates to the other sheet
    (1) A change in the original will propagate to the other table if the change is in the 'copied' row.
    (2) what you require can't be achieve by a copy process.
    It requires the use of external references which are perfectly described in the User Guide (page 122 in the English version).
    (3) sure, a reference is a cell's attribute so you will have to enter it in every cell of the row.
    When it's done for one row you may use the Fill Down tool which is also described (with quite all you need to use Numbers) in the User Guide.
    Yvan KOENIG (from FRANCE vendredi 19 juin 2009 15:53:03)

  • Question on Creating table from another table and copying the partition str

    Dear All,
    I want to know whether is there any way where we can create a table using another table and have the partitions of the new table to be exactly like the used table.
    Like
    CREATE TABLE TEST AS SELECT * FROM TEMP;
    The table TEMP is having range and hash partitions.
    Is there any way when we use the above command, we get the table partitions of TEMP to be copied to the new table TEST.
    Appreciate your suggestions on this one.
    Thanks,
    Madhu K.

    may this answer your question...
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:595568200346856483
    Ravi Kumar

  • Populating table with data from another table with fewer columns

    Hi,
    I have 2 tables:
    Table 1:
    Column 1
    Column 2
    Column 3
    Table 2:
    Column 1
    Column 2
    I want to populate Table 1 with all the data from Table 2, and populate Column 3 of Table 1 with numbers from a sequence. Is there a SQL stmt to do this? If not, what is the best way to do it in PL/SQL?
    Thank you
    Shailan

    CREATE SEQUENCE t1_seq
    START WITH 1
    INCREMENT BY 1
    CACHE 100;
    INSERT INTO t1( col1, col2, col3 )
      SELECT col1, col2, t2_seq.nextval
        FROM t2Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • How to copy file from one table to another table at another database

    I need to transfer my tables from one workspace and schema to another workspace and schema. Basically I need to create again all the tables at this new schema. How could I transfer data from tha table at old schema to the table at new schema when this table has files stored in it? (data type is blob)
    thank you so much,
    Silver

    Hello Silver,
    Depending which database you're using (if it's available) I would recommend to use datapump.
    Datapump allows you to copy an entire schema to another database, it's the "new" export/import you might now.
    Regards,
    Dimitri
    http://dgielis.blogspot.com/
    http://www.apex-evangelists.com/
    http://www.apexblogs.info/
    REWARDS: Please remember to mark helpful or correct posts on the forum

  • Query design question: multiple plan versions in single column

    I have a standard financial statement query with current month "Actual" restricted to Value Type 10 and current month "Plan" using Value Type 20.  This scenario is repeated for year-to-date Actual and Plan along with $ and % variance calculations.   Until recently we were only loading plan version so I had no reason to restrict the plan to version 0 Actual/Plan.
    We are now loading an alternate plan version, Version 1, and I would like to report both versions in the same query.  I though I could just bring in "Version" as a Free Characteristic to easily switch between version 0 and 1 but that didn't work as expected. 
    With "Version" as a filter item my Plan amount will report both plan versions combined which is fine and when "Version" is filtered to the alternate version 1 Plan correctly displays the alternate amount, in both cases Actual is unchanged and displays correctly.   The problem is when I change the filter to just show Version 0 which is defined as "Actual/Plan".  When version 0 is selected the Plan amount displays correctly but ALL Actual values disappear.
    No Version filter set = Actual/Plan and Plan Version 1 combined correctly.   Actual displays correctly.
    Filter set to 1 and 0  = Actual/Plan and Plan Version 1 combined correctly.   Actual displays correctly.
    Filter set to 1 = Plan Version 1 only.  Actual displays correctly.
    Filter set to 0 = Plan Version 0 only.  No actual data is displayed.
    Is there a better way of displaying multiple plan versions in a query or will I have to add additional columns for each plan version?
    Thanks for the ideas,
    Jeff

    Thanks Amit that was the help I needed.
    I added "Version" to every actual Key Figure and made each a Constant Selection.  I also added Version as a Free Characteristic of the query for a filter.
    By adding Version to each Key Figure no matter which plan version I select in the Version filter Actual data alway remains correct and just my Plan column changes to show the plan version I selected.
    Thanks for your help,
    Jeff
    Edited by: Jeff Mayfield on Nov 11, 2009 11:51 PM

  • General Question: should Fact Table use virtual column?

    Hi,
    I have read several articles about 11g's Virtual Column feature and it all looks very good. But I just want to know
    - Whether virtual column is also good for Fact table or not?
    - Is it recommedated?
    - Is there a 'limit' or 'recommedation'regarding how many virtual columns I should use in a table?
    Thanks

    In an OLTP system, the number of virtual columns is self-limiting because there aren't that many simple ways to combine the columns in a single table using simple expressions. In a data warehouse, there are likely a lot more expressions that you might want to compute, so you would have to be careful as oracletune points out if expressions can change over time assuming that you want the version of the computation that was in force at the time the row was written to be used.
    There really isn't a rule of thumb. It's a lot like asking how many indexes a table should have-- the only answer is to do a cost-benefit analysis on each potential index/ virtual column to determine if the benefits outweigh the cost. A virtual column allows you to avoid computing an expression when you are inserting a value but requires that you compute it at query time. If a row is queried millions of times, written once, and never updated, that probably isn't a great trade-off. If a row is queried a few times and updated a bunch, avoiding the computations is probably worthwhile. If you need to store the value and you have an OLTP system, the ability to ensure that you never have stale computations is great.
    Justin

  • I need to copy data from a table in one database (db1) to another table in

    Hi
    I need to copy data from a table in one database (db1) to another table in another database (db2).
    I am not sure if the table exists in db2,,,if it doesnot it needs to be created as well data also needs to be inserted...
    How am I supposed to this using sql statements..?
    I shall be happy if it is explained SQL also...
    Thanking in advance

    How many rows does the table contains? There are manyway you can achieve this.
    1. export and import.
    2. create a dblink between two databases and use create table as select, if structure doesnot exists in other database, if structure exists, use, insert into table select command.
    example:
    create a dblink in db2 database for db1 database.
    create table table1 as select * from table1@db1 -- when there is no structure present
    -- you need to add constraints manually, if any exists.
    insert into table1 select * from table1@db1 -- when there is structure present.
    If the table contains large volume of data, I would suggest you to use export and import.
    Jaffar

  • How do I create a table within another table?

    How do I create a table within another table?
    As shown in image below (document created with Words), I already have a table with 3 columns. How do I create another table with 6 columns to tabulate the data (the one below "3.1 Overall")?

    Last time I checked in Pages 5.5.2 that is not possible.
    Peter

  • A data table in one column of a dynamic data table

    Hi , I have to design a dynamic data table(with dynamic columns and data) which looks as the following
    DETAILS      NAME      ROLE NUMBER     CLASS     SECTION
    15     MATHS     SURESH     15     10     A
    20     SCIENCE                    
    25     ENGLISH     
    15     MATHS     SURESH     15     10     A
    20     SCIENCE                    
    25     ENGLISH          
    The data in the column 'DETAILS' should have inner table. The data in this inner table should have hyper links. If there is no inner table infor mation there shold be an image with hyperlink. This data table should also have pagination and sorting features. Please send me some example code for this. Please help me out as i have client demo on monday

    You may find this example useful: [http://balusc.blogspot.com/2006/06/using-datatables.html#NestingDatatables].
    To toggle between a nested datatable and a hyperlink with image just use the rendered attribute. E.g.
        <h:column>
            <h:dataTable rendered="#{!empty dataItem.innerList}">
            </h:dataTable>
            <h:commandLink rendered="#{empty dataItem.innerList}">
            </h:commandLink>
        </h:column>
    ...

  • Cant add offline table

    When I come to create an offline table, I cant click past the constraints dialog the application just sits there if I click next or finish. 10 G Preview.
    Simon

    Answers:-
    1) I can add the table with the columns - but when I come to add constraints it wont save.
    2) It appears to be related to the constraints and not the columns. I can add any type of column but as soon as I add a constraint the problem occurs
    3) Using jdev.exe the following appears when I try to add a constraint to the table:-
    Exception occurred during event dispatching:
    java.lang.NullPointerException
    at oracle.jdeveloper.offlinedb.browser.BaseSchemaObjectNode.getSchemaObj
    ect(BaseSchemaObjectNode.java)
    at oracle.jdeveloper.offlinedb.OfflineDBObjectBuilder.listObjects(Offlin
    eDBObjectBuilder.java:92)
    at oracle.jdeveloper.cm.ds.db.AbstractDBObjectProvider$ObjectTypeEntry.l
    istObjects(AbstractDBObjectProvider.java:833)
    at oracle.jdeveloper.cm.ds.db.AbstractDBObjectProvider$ObjectTypeEntry.a
    ccess$1000871(AbstractDBObjectProvider.java:627)
    at oracle.jdeveloper.cm.ds.db.AbstractDBObjectProvider.listObjectsImpl(A
    bstractDBObjectProvider.java:302)
    at oracle.jdeveloper.cm.ds.db.AbstractDBObjectProvider.listObjects(Abstr
    actDBObjectProvider.java:386)
    at oracle.jdeveloper.cm.ds.db.AbstractDBObjectProvider.listObjects(Abstr
    actDBObjectProvider.java:381)
    at oracle.jdeveloper.offlinedb.wizard.verifier.OfflineConstraintsInfoVer
    ifier.verifyTable(OfflineConstraintsInfoVerifier.java:70)
    at oracle.jdeveloper.cm.dt.ui.table.ConstraintsInfoPanel.commit(Constrai
    ntsInfoPanel.java:510)
    at oracle.jdeveloper.cm.dt.ui.table.ConstraintsInfoPanel.onExit(Constrai
    ntsInfoPanel.java:289)
    at oracle.jdeveloper.offlinedb.panels.OfflineConstraintsInfoPanel.onExit
    (OfflineConstraintsInfoPanel.java:84)
    at oracle.ide.panels.MDDPanel.exitTraversable(MDDPanel.java:761)
    at oracle.ide.panels.MDDPanel.onExit(MDDPanel.java:286)
    at oracle.jdeveloper.cm.dt.ui.DBObjectEditDialog$EditMDDPanel.onExit(DBO
    bjectEditDialog.java:171)
    at oracle.ide.panels.TDialogLauncher$1$Dlg.vetoableChange(TDialogLaunche
    r.java:297)
    at java.beans.VetoableChangeSupport.fireVetoableChange(VetoableChangeSup
    port.java:300)
    at java.beans.VetoableChangeSupport.fireVetoableChange(VetoableChangeSup
    port.java:217)
    at oracle.bali.ewt.dialog.JEWTDialog.fireVetoableChange(Unknown Source)
    at oracle.bali.ewt.dialog.JEWTDialog.dismissDialog(Unknown Source)
    at oracle.bali.ewt.dialog.JEWTDialog$UIListener.actionPerformed(Unknown
    Source)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:17
    64)
    at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Abstra
    ctButton.java:1817)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
    .java:419)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:257
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonL
    istener.java:245)
    at java.awt.Component.processMouseEvent(Component.java:5134)
    at java.awt.Component.processEvent(Component.java:4931)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3639)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3165)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095)
    at java.awt.Container.dispatchEventImpl(Container.java:1609)
    at java.awt.Window.dispatchEventImpl(Window.java)
    at java.awt.Component.dispatchEvent(Component.java)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:452)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
    read.java:197)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:150)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:141)
    at java.awt.Dialog.show(Dialog.java:538)
    at java.awt.Component.show(Component.java:1134)
    at java.awt.Component.setVisible(Component.java:1089)
    at oracle.bali.ewt.dialog.JEWTDialog.runDialog(Unknown Source)
    at oracle.ide.dialogs.WizardLauncher.runDialog(WizardLauncher.java:55)
    at oracle.ide.panels.TDialogLauncher.showDialog(TDialogLauncher.java:217
    at oracle.jdeveloper.cm.dt.ui.DBObjectEditDialog.editObject(DBObjectEdit
    Dialog.java:93)
    at oracle.jdeveloper.cm.dt.ui.DBObjectEditDialog.editObject(DBObjectEdit
    Dialog.java:76)
    at oracle.jdeveloper.offlinedb.wizard.TableWizard.doInvokeEditWizard(Tab
    leWizard.java:162)
    at oracle.jdeveloper.offlinedb.wizard.TableWizard.invokeEditWizard(Table
    Wizard.java:142)
    at oracle.jdeveloper.dbmodeler.data.DatabaseTableDataElement.edit(Databa
    seTableDataElement.java:964)
    at oracle.jdeveloper.dbmodeler.propertydialog.databasetable.DatabaseTabl
    eDialog.invoke(DatabaseTableDialog.java:94)
    at oracle.jdeveloper.dbmodeler.propertydialog.databasetable.DatabaseTabl
    eDialog.invoke(DatabaseTableDialog.java:66)
    at oracle.bm.edit.dialoginvocation.ReflectiveDialogInvoker.invoke(Reflec
    tiveDialogInvoker.java:112)
    at oracle.bm.edit.dialoginvocation.DialogInvokerRegistry.invoke(DialogIn
    vokerRegistry.java:102)
    at oracle.bm.common.registry.CRBaseUtil.editContents(CRBaseUtil.java:135
    at oracle.bm.common.registry.CRBaseNode.editContents(CRBaseNode.java:331
    at oracle.bm.diagrammer.BaseDiagramView$17.onCheckedCmdUIEvent(BaseDiagr
    amView.java:1249)
    at oracle.bm.diagrammer.BaseDiagramView$CheckedCmdUIReceiver.onCmdUIEven
    tNow(BaseDiagramView.java:2199)
    at oracle.bm.diagrammer.BaseDiagramView$CheckedCmdUIReceiver.onCmdUIEven
    t(BaseDiagramView.java:2147)
    at oracle.bm.addinUtil.IDEAppContext.handledElseWhere(IDEAppContext.java
    :1669)
    at oracle.bm.addinUtil.IDEAppContext.onCmdUI(IDEAppContext.java:1618)
    at oracle.bm.addinUtil.IDEAppContext.handleEvent(IDEAppContext.java:3590
    at oracle.bm.addinUtil.IDEAppContext.handleEvent(IDEAppContext.java:3539
    at oracle.bm.diagrammer.track.SelectionTracker.mouseClicked(SelectionTra
    cker.java:1142)
    at oracle.bm.diagrammer.track.ModularTracker.processEvent(ModularTracker
    .java:221)
    at oracle.bm.diagrammer.track.SelectionTracker.processEvent(SelectionTra
    cker.java:159)
    at oracle.bm.diagrammer.track.TrackerStack.processEvent(TrackerStack.jav
    a:349)
    at oracle.bm.diagrammer.BaseDiagramView$2.processEvent(BaseDiagramView.j
    ava)
    at oracle.bm.diagrammer.PageView$PageViewPanel.fireEvent(PageView.java:2
    520)
    at oracle.bm.diagrammer.PageView$PageViewPanel.processEvent(PageView.jav
    a:2685)
    at java.awt.Component.dispatchEventImpl(Component.java:3639)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3174)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095)
    at java.awt.Container.dispatchEventImpl(Container.java:1609)
    at java.awt.Window.dispatchEventImpl(Window.java)
    at java.awt.Component.dispatchEvent(Component.java)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:452)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
    read.java:197)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:150)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
    4) I can successfully create the table using the database diagram method - I know believe it is a constraint issue.

  • How do I designate a number in one table and add them up in another.

    Can someone please help me do this. I dont even know what to call it. Conditional categorization?
    I have a table with costs, and another table to separate them into categtroies as shown:
    I want to be able to enter a category in the green column, and have those nunmber appear and total up in the COST TOTALS in the second table.
    What formula do I put in the COST TOTALS cells?

    Tracy,
    Name the table on the left "Data" and the table on the right "Summary".
    In the table table summary add a header row and a footer row.  In my example the header is row 1 and the footer is row 13:
    For the table on the right (title "Summary") make the header row contain the titles as show.  Also enter the categories as show.  in column A of the footer enter the text "Total"
    B2=SUMIF(Data::A, A2,Data::B)
    this is shorthand for select cell B2 and type (or copy and paste from here) the formula:
    =SUMIF(Data::A, A2,Data::B)
    now select B2,  and fill down by hovering the cirsor over the bottom edge and drag the yellow circle down as needed.
    In the footer row (in this example B13) enter the formula:
    B13=SUM(B)
    Please let us know if you have other questions

  • I can't import a table contains BLOB column  from one user to another user.

    1) I create two user both have connect role,and each has its own tablespace, DDL:
    create user d2zd identified by d2zd default tablespace d2zd quota unlimited on d2zd account unlock;
    grant connect to d2zd;
    create user d3zd identified by d3zd default tablespace d3zd quota unlimited on d3zd account unlock;
    grant connect to d3zd;
    2)Then enter oracle as d2zd and create a table contains BLOB column and insert data to the table.
    3) export d2zd as follow:
    exp d2zd/d2zd file=d2zd.dmp
    4) import to d3zd as follow:
    imp d3zd/d3zd fromuser=d2zd touser=d3zd file=d2zd.dmp
    the question is the table with BOLB colum can't be import,
    it says:have no privilege on tablespace d2zd.
    How can I import a table contains BLOB column from one user to another user?

    Hi - the reason for as our friend already told ist that a blob can be stored outside of the table segment, in another Tablespace, This is for performance reason.
    Sou you would need to have Quota on two tablespaces.
    the one which holds the table segment the other which holds the blob(segment).
    Regards
    Carl
    Message was edited by:
    kreitsch

  • How to insert select columns from one internal table to another

    Hi,
    How to insert select columns from one internal table to another based on condition as we do from a standart table to internal table.
    regards,
    Sriram

    Hi,
    If your question is for copying data from 1 int table to other ;
    we can use
    APPEND LINES OF it_1 TO it_2.
    or if they have different columns then:
    loop at it_1 into wa_it1.
    move wa_it1-data to wa_it2-d1.
    apped wa_it2 to it_2.
    clear wa_it2.
    endloop.
    thnxz

  • How to insert records with LONG RAW columns from one table to another

    Does anybody know how to use subquery to insert records with columns of LONG RAW datatype from one table to another? Can I add a WHERE clause in the subquery statement? Thanks.

    Insert into ... Select statements are not supported for long or long raw. You will have to either use PL/SQL or convert your long raw to blobs.

Maybe you are looking for

  • Can an accidental purchase from iTunes store be cancelled and refunded?

    I just purchased an iPad and I am not familiar with the use of my iTunes account from it. I had a code to download ''The hunger game''  from iTunes for free and I accidentally purchased it as well,but never dowloaded my accidental purchase, as I succ

  • Groups are not displaying in the user's member of tab

    Hi , We have a issue, After mapping any AD  group in CMC,the groups and users are displaying  in the cmc list. but when we go to the properties of the user and member of option ,the groups are not displaying . After restarting the CMS every thing wor

  • CSV output

    Hello, I have a table x as shown below having 2 columns id and name table x ===== id name = ===== 1 a 2 b 3 c 1 d 4 h 2 i 1 j 3 k 1 l 7 e 2 f And I want the output as follows the output shoud be id name = ==== 1 a,d,j,l 2 b,i,f 3 c,k 4 h 7 e could so

  • Analog Video In for iPad

    Hello, is there any accessory allowing analog video in for the iPad? I want to show the image of a FPV camera, mounted on a RC plane, on my iPad screen. Is there any solution without converting this signal to an IP cam signal with an adapter like the

  • Semicolon or not?

    AS/400 complained when I supplied SQL statements ending with a semicolon. Is it best practise to end with a semicolon or not?