Store a graph in a relational DB

Greeting Gurus
How you would recommend to store a graph (vertices and links ) into a relational database ??
Or the way relational database organize data might not be the optimal to store a graph ??
And hence its operation such as sales man problem ??
Thanks so much

Hi,
vxwo0owxv wrote:
Thanks for the input. This is a way to get this done
I am curious about if it is possible to define a function when creating a unqiue index such that
if mod(a,b) = 1 then a & b are the same
e.g mod(5,4) = mod(7,3) = 1 so if I have (5,4) in my table I do not want (7,3)
so basically if it is possible to define a function and if the function in the data element return some pre-defined value then they would be considered the same.
maybe it is not the design intention of a relational database as such ??
This is a separate problem, so it would be better if you started a separate thread for it.  (You might be planning to constrain a graph table this way, but it's a separate problem, even if it's the same table.)
Yes, you can have function-based indexes, and they can be unique.
It's unclear what you're saying.
If MOD (a, b) = 1, then a and b are definitely NOT the same.  Only if MOD (a, b) = 0 can  a and b be the same, and even then, they are not necessarily the same.  That is, if a = b, then MOD (a, b) must be 0, but if MOD (a, b) = 0, it may be the case that a != b.  MOD (4, 4) = 0, but MOD (12, 4) = 0 also.
If you have a table and an index like this:
CREATE TABLE table_x
(   a    NUMBER (6, 0)
,   b    NUMBER (6, 0)
CREATE UNIQUE INDEX  x_a_mod_b ON table_x (MOD (a, b));
then you can INSERT either of these rows, but not both of them.
INSERT INTO  table_x (a, b) VALUES (5, 4);
INSERT INTO  table_x (a, b) VALUES (7, 3);
If row (5,4) is already in the table, and you try to INSERT (7, 3), then you'll get an error like this:
INSERT INTO  table_x (a, b) VALUES (7, 3)
ERROR at line 1:
ORA-00001: unique constraint (FUBAR.X_A_MOD_B) violated

Similar Messages

  • Why have my App Store, iTunes, and my Google related apps stopped working properly?

    I was on my iPod and soon figured out that iTunes and Google-related apps weren't working. iTunes kept telling me I 'might be on a server pretending to be iTunes' and won't let me use it. When I open the App store, it tells me that it cannot connect to iTunes. Also, any apps I have that are Google related are on the fritz. My Google Drive won't allow me to view my documents, write new ones, or rename them. It says I'm not connected to the Internet... but I am. Google Translate, YouTube, or my Google Search app weren't working as well. Also having slight issues with Safari but they fix themselves after a moment. I'm not sure what's going on with my apps and I haven't checked other apps for issues so I'm not sure if it's all apps. This started happening after I deleted Spotify. I'm sure it has nothing to do with my app issues but it might be worth mentioning. So what's going on and have any of you had this problem before?

    Can't connect to the iTunes Store
    Best Fixes for ‘Cannot Connect to iTunes Store’ Errors | iPad Insight
    then
    See:
    iOS: Troubleshooting applications purchased from the App Store
    Contact the developer/go to their support site if only one app.
    Restore from backup. See:
    iOS: How to back up              
    Restore to factory settings/new iPod

  • Problème graphe en temps relatif

    Bonjour,
    J'ai crée un VI d'acquisition de tension avec un port USB NI9219 qui mesure différentes tension d'entrée à une fréquence élevée(ex : 100 Hz). De plus mon VI enregistre les mesures que lorsque la tension mesurée change de 0,01v. Le VI trace également les courbes de tension dans un graphe déroulant qui comporte tous les points enregistrés (et seulement ceux la) depuis le lancement de l'application.
    C'est sur ce point que je n'arrive pas à avoir un graphe déroulant avec plusieurs courbes (4 maximum) avec une échelle des x en temps relatif. C'est à dire de t=0 (ex : minutes) jusqu'a t=fin du VI
    Lorsque je met les x en temps relatif il ne me met pas de temps mais des valeurs abérantes. De plus il n'incrémente pas du temps éffectué entre 2 mesures, il incrémente le temps de 1.
    (ex : on a t=5min entre 2 mesure enregistrées mais la courbe incréménte le temps de 1 sur la valeur abérante).
    Avez vous des solutions pour mon problème. Merci.
    Cordialement.
    Solved!
    Go to Solution.

    Cette valeur correspond à l'heure de la mesure, 952500:36:41 correspondant à 14h36 et 41s.
    Cela permet d'horodater les points plus précisément.
    Si vous souhaitez recréer votre échelle de temps en X, il faudra modifier le T0 de votre courbe.
    Pour cela vous allez devoir utiliser la fonction Construire une waveform permettant d’insérer votre courbe et aussi de modifier le t0, on insère cette fonction dans une boucle For afin de traiter les 4 courbes.
    Au départ du VI on initialise un registre à décalage à 0 afin que nos premiers points commencent à 0, puis on devra multiplier l’horloge d’échantillonnage par le nombre de point afin de définir le t0 des tours de boucles suivants.
    Cela devrait résoudre votre probléme.
    Cordialement
    Christophe S.
    FSE East of France І Certified LabVIEW Associate Developer І National Instruments France

  • How to store a graph to a clipboard (conserving colors info)

    Hi everybody,
    I'm looking for a way (also not conventional)to copy on clipboard a graph, without loose the colors information.
    Someone can help me?
    Many thanks
    Neona

    Neona,
    If you absolutely must do this in response to a user clicking a front-panel button, as suggested in your attached example, then you'll need to hunt down some code. Programmatically, the built-in LabVIEW functions will take you only so far as getting the full-color image data (Right-click on your graph and choose Create >> Invoke Node, then select the Get Image method from that node), but not sending it to the clipboard.
    George Zou has created VIs to do this exact thing (send image data from LabVIEW to the clipboard), but I haven't used them and I'm fairly sure they are not free. Plus, I think his main site is down right at the moment. See this thread.
    There's a much easier solution. If you're willing to ask your users to right-click the graph and choose Copy Data at run-time, then that will copy a nice full-color image of the graph to the clipboard, and you can paste it into PPT, etc, as you desire. It's not quite clicking a button, but it's comparably easy.
    Regards,
    John

  • TS1368 I cannot access the iTunes store or anything iTunes related on my computer.  I've tried everything recommend here.  Can anyone help??

    I cannot access the iTunes store or anything else iTunes related on my computer.  I've tried everything I can find and nothing seems to work.  I've changed the firrewall settings, I've uploaded the latest version of Windows and iTunes.  I've ran the diagnostics..nothing.  If I hit the help button on the diagnostics page...I can't get iTunes help because I don't have connection!!!!!  Any help please!!!

    I'd try the following document: 
    Apple software on Windows: May see performance issues and blank iTunes Store
    (If there's a SpeedBit LSP showing up in Autoruns, it's usually best to just uninstall your SpeedBit Video Accelerator.)

  • Oracle RDF graph DB data modeling

    I am wondering how Oracle RDF graph DB modeling the attributes of the node or relationship? Suppose a node (dubject or object) is a person which has a lot of attriubtes, say age, birthdate, ssn, address, etc, it sounds to me Oracle RDF cannot assoicate attriubtes to the node and instead it just models each attribute as a node in the graph. Is it common practice to include so many attributes in the graph database?

    Hi,
    RDF (and Oracle's RDF offering) in general allows associating as many attributes as you need to nodes in the graph. You are right in saying that those attributes are
    modeled as RDF resources (nodes). This promotes sharing of resources.
    e.g. The first two triples associate the same street resource with two individuals. The third triple
    provides some descriptive information about this street resource.
    <urn:John>  <urn:livesOnStreet>  <urn:StreetXYZ>
    <urn:Mary>  <urn:livesOnStreet>  <urn:StreetXYZ>
    <urn:StreetXYZ>  rdfs:comment  "Sunset Rd. .... "
    It is usually up to an application to determine how many attributes to use. The underlying RDF graph model supports
    multiple attributes and Oracle's RDF implementation supports multiple attributes.
    It is also possible to store attributes in a separate relational table and use a SQL to join the graph query results
    with your relational data.
    Hope it helps,
    Zhe Wu

  • Itunes store won't connect no matter what i do.

    This is a long post but i wanted to give you as much information as possible. Below is the transcript between apple support. Here is the Story: just One account says network connection timed out. I didn't think until right now to try a different account which downloaded music and talked with apple just fine. It is only one account that isn't working what can i do? I have tried everything.
    Rashida,
    I would like to get the problem solved and i thank you for your time; I have tried what you suggested and it did not work. I have tried different ISP opened my computer completely up so all ports are forwarded to the itunes computer; i have stopped all services including windows firewall on the itunes computer; I have tried installing a fresh copy of windows and only putting itunes on it with all ports forwarded, windows firewall disabled. I believe the error is an error; i don't know why i can't communicate with your servers is there anyway to cancel all the downloads and restart them; this might be due to me not completing a download on my iphone then trying to complete it on the computer. When i use my iphone connected to my wi-fi i can download music so my ISP can't be blocking the service. This is a very strange problem and would appreciate apples support and help. I may not be an expert on computers but i am in school for a degree in software development so my knowledge is above the norm. Thank you Rashida I hope we can find a solution.
    On Fri, Jul 24, 2009 at 10:11 AM, iTunes Store <[email protected]> wrote:
    Dear Japesweb
    My name is Rashida and I understand that you are having trouble downloading your purchased item due to a connection error. You are receiving a message stating "unable to check for downloads network has timed out." You also tried to download it using your parents device and you encountered the same error message.
    As an iTunes Store agent, I handle issues related to billing, downloading, customer accounts, and the items available on the iTunes Store. Because your issue is with the technical operation of Apple hardware, I do not have the training or tools to assist you as well as you deserve. However, finding you a resolution to this issue is of the upmost important to me and so I have included some information that may help you.
    I have confirmed that the iTunes Store is functioning and accepting connections. Therefore, the issue is likely related to your Internet connection, local network, or computer. I'm happy to provide some information that should help you connect to the iTunes Store again.
    Error 3259 is a network timeout error. Sometimes this error can be caused by software on your computer that slows down the network connection. This error can also appear if you are downloading multiple items. I'd like to provide some steps that should help you successfully download your purchases.
    It often helps to pause the download and then download items one at a time. These steps will walk you through doing this:
    1) Open iTunes.
    2) From the Store menu at the top, choose Check for Available Downloads. If you're unable to upgrade and are using iTunes 7, the option will say Check for Purchases.
    3) Enter your account name and password, then click Check. Your purchases should begin downloading.
    4) Under the STORE section on the left, click Downloads.
    5) Click the Pause All button in the lower-right corner. This will temporarily pause all of your downloads.
    6) To resume only one of the downloads, click the refresh button that appears to the right of one of the paused downloads.
    Certain types of software can affect the way a computer sends and receives information from the Internet. Here are a few examples of these types of software:
    - Firewalls
    - Web accelerators
    - Ad filters
    - Virus protection software
    If you have any of this kind of software installed on your computer, you will need to configure each of the applications to allow your internet connection to access iTunes freely. For instructions, please refer to the documentation that came with that software, or contact the software's manufacturer. You'll need to configure the software to allow these domains to send and receive data from the Internet freely:
    itunes.apple.com
    ax.itunes.apple.com
    For assistance in configuring your firewall or accelerator software, you may need to contact the manufacturer or your Internet service provider (ISP). When contacting their support representatives, it may be useful to have the following information:
    "Well Known" TCP and UDP Ports Used By Apple Software Products
    http://support.apple.com/kb/TS1629
    The following article helps Windows users pinpoint software conflicts that could cause the error:
    Using MSCONFIG to troubleshoot conflicts in Windows Vista
    http://support.apple.com/kb/HT2292
    Once you have managed to allow access to iTunes through other software, please follow these instructions:
    1) Sign out of the iTunes Store.
    2) Quit the iTunes application.
    3) Restart your computer.
    4) Open iTunes.
    5) Select Check for Available Downloads from the Store menu at the top of iTunes, (if you're unable to upgrade and are using iTunes 7, you'll choose Check for Purchases).
    If you can't find this option, you can also click this link to do the same thing:
    https://phobos.apple.com/WebObjects/MZFinance.woa/wa/checkForPurchases
    6) Enter your account name and password, then click Check. The missing item should begin downloading and appear in your Purchased playlist.
    Please note that the iTunes Store cannot investigate every user's connection issue. Apple Discussions are another source of information about iTunes, where everyone from new users to professionals can interact and share their knowledge and experiences. You may find another user with the same operating system or ISP that may be able to help resolve this issue. You can find the iTunes discussions group at:
    http://discussions.info.apple.com/itunes
    If you are using a dial-up connection, you might consider downloading your purchases over a broadband connection, if you have access to one.
    I do hope this information has been helpful to you. If there are any further questions or concerns about this matter please don't hesitate to reply to this email and let me know. Thank you for choosing the iTunes Support Store Peter. We do appreciate your business.
    Sincerely,
    Rashida
    iTunes Store Customer Support
    Please Note: I work Tuesday -Saturday 8.00am-5.00 pm CT
    Thank you for allowing me the opportunity to assist you. You may receive an AppleCare survey email, any feedback you provide would be greatly appreciated.
    Dear apple,
    I believe it is a problem on your end. here is why. My configuration at home
    is at&t dsl; the office T1 through at&t and at parents house is comcast
    cable internet. my firewalls are clear and open in two locations (not the
    office); the firewall is set up in DMZ mode which basically forwards all
    requests to a certain computer via ip add or mac add. no mater what computer
    what operating system i use that itunes is compatible with i get the error
    of: unable to check for downloads network has timed out. I have tried it on
    my Mac running Mac OS X; on my pc running vista 64-bit and on my mothers
    computer running windows xp home edition (32-bit). I hope we can find a fix
    to this so i can start downloading and using your service in the future.
    Thank you
    japesweb
    On Tue, Jul 21, 2009 at 10:17 PM, iTunes Store <[email protected]
    <div class="jive-quote">wrote:
    Dear Japesweb
    I'm sorry to hear that "Face the Pain" did not download successfully. It
    looks like it is still posted to your account and awaiting download, so you
    should be able to restart the download by following these steps:
    1) Make sure you're using the latest version of iTunes. It can be
    downloaded free of charge from the Apple website:
    http://www.apple.com/itunes/download
    Note: Installing the latest version of iTunes will not affect your library
    or any items in your account that you haven't downloaded.
    2) From the pull-down Store menu at the top, select Check for Available
    Downloads (if you're using iTunes 7, this option is called Check for
    Purchases). If you can't find this option, you can also click this link to
    check for purchases:
    https://phobos.apple.com/WebObjects/MZFinance.woa/wa/checkForPurchases
    3) Enter your account name and password, then click Check. "Face the Pain"
    should begin downloading. If you receive an error message when downloading,
    try again after turning off any firewall or web-accelerator software that
    you may have installed. If the download process is interrupted for any
    reason, it should resume once you reopen iTunes.
    This article provides more information about resuming interrupted
    downloads:
    http://www.info.apple.com/kbnum/n93015
    If "Face the Pain" does not download successfully after you've followed
    these instructions, reply to this email and I'll have the issue investigated
    for you. In your reply, please include:
    - The name of your Internet service provider (ISP).
    - The type of Internet connection (such as dial-up, cable modem, or DSL).
    - Any troubleshooting steps you may have taken.
    - Any error messages you may have received.
    Sincerely,
    Sue
    *iTunes Store Customer Support*
    http://www.apple.com/support/itunes/ww/

    a blank screen with 'itunes store' on it is all I get when I try to get to the itunes store.
    With those symptoms, I'd try the following document:
    Apple software on Windows: May see performance issues and blank iTunes Store
    (If there's a SpeedBit LSP showing up in Autoruns, it's usually best to just uninstall your SpeedBit Video Accelerator.)

  • My iPhone is now saying it is synced with another library - despite me not changing my iPhone or iTunes since I last synced - related to downtime (2 June?)

    I synced my iPhone a couple of days ago no problems, and I always 'manually manage' my stuff between iTunes and my iPhone 4.
    Just now I plug in to drop a new album onto my phone, and the 'manually manage music and videos' box is unchecked (nobody else uses my machine, no other devices plugged into it) and when I check it, it tells me my iPhone is synced with another library.
    The only thing I have changed that I can think of is my iTunes password - while working out what was causing the downtime yesterday (error 5002 with the store, etc.)
    Is it related?

    I'm sorry, I am having a smilar problem and my contacts have already been deleted because of it. I recently reloaded my OS as my computer was having problems. I'm using Vista. I had to reload itunes and when I attempted to sync my phone it said my iphone was synced with another itunes library. I'm not sure if I messed up and created two apple ID's. When I log into apple and attempted to see if I had any other accounts it did not show any, but when I try the other name I thought I had used first, it said that account had been locked for security reasons. I actually hit the "accept" button by mistake and it deleted everything so I unplugged it really quick and all I lost was my contacts. How on earth do I fix this? I can plug my iphone in and sign on, but if I attempt to change anything it gives that same message.
    Thank you
    Brandy

  • How to find the level of each child table in a relational model?

    Earthlings,
    I need your help and I know that, 'yes, we can change'. Change this thread to a answered question.
    So: How to find the level of each child table in a relational model?
    I have a relacional database (9.2), all right?!
         O /* This is a child who makes N references to each of the follow N parent tables (here: three), and so on. */
        /↑\ Fks
       O"O O" <-- level 2 for first table (circle)
      /↑\ Fks
    "o"o"o" <-- level 1 for middle table (circle)
       ↑ Fk
      "º"Tips:
    - each circle represents a table;
    - red tables no have foreign key
    - the table in first line of tree, for example, has level 3, but when 3 becomes N? How much is N? This's the question.
    I started thinking about the following:
    First I have to know how to take the children:
    select distinct child.table_name child
      from all_cons_columns father
      join all_cons_columns child
    using (owner, position)
      join (select child.owner,
                   child.constraint_name fk,
                   child.table_name child,
                   child.r_constraint_name pk,
                   father.table_name father
              from all_constraints father, all_constraints child
             where child.r_owner = father.owner
               and child.r_constraint_name = father.constraint_name
               and father.constraint_type in ('P', 'U')
               and child.constraint_type = 'R'
               and child.owner = 'OWNER') aux
    using (owner)
    where child.constraint_name = aux.fk
       and child.table_name = aux.child
       and father.constraint_name = aux.pk
       and father.table_name = aux.father;Thinking...
    Let's Share!
    My thanks in advance,
    Philips
    Edited by: BluShadow on 01-Apr-2011 15:08
    formatted the code and the hierarchy for readbility

    Justin,
    Understood.
    Nocycle not work in 9.2 and, even that would work, would not be appropriate.
    With your help, I decided a much simpler way (but there is still a small problem, <font color=red>IN RED</font>):
    -- 1
    declare
      type udt_roles is table of varchar2(30) index by pls_integer;
      cRoles udt_roles;
    begin
      execute immediate 'create user philips
        identified by philips';
      select granted_role bulk collect
        into cRoles
        from user_role_privs
       where username = user;
      for i in cRoles.first .. cRoles.count loop
        execute immediate 'grant ' || cRoles(i) || ' to philips';
      end loop;
    end;
    -- 2
    create table philips.root1(root1_id number,
                               constraint root1_id_pk primary key(root1_id)
                               enable);
    grant all on philips.root1 to philips;
    create or replace trigger philips.tgr_root1
       before delete or insert or update on philips.root1
       begin
         null;
       end;
    create table philips.root2(root2_id number,
                               constraint root2_id_pk primary key(root2_id)
                               enable);
    grant all on philips.root2 to philips;
    create or replace trigger philips.tgr_root2
       before delete or insert or update on philips.root2
       begin
         null;
       end;
    create table philips.node1(node1_id number,
                               root1_id number,
                               node2_id number,
                               node4_id number,
                               constraint node1_id_pk primary key(node1_id)
                               enable,
                               constraint n1_r1_id_fk foreign key(root1_id)
                               references philips.root1(root1_id) enable,
                               constraint n1_n2_id_fk foreign key(node2_id)
                               references philips.node2(node2_id) enable,
                               constraint n1_n4_id_fk foreign key(node4_id)
                               references philips.node4(node4_id) enable);
    grant all on philips.node1 to philips;
    create or replace trigger philips.tgr_node1
       before delete or insert or update on philips.node1
       begin
         null;
       end;
    create table philips.node2(node2_id number,
                               root1_id number,
                               node3_id number,
                               constraint node2_id_pk primary key(node2_id)
                               enable,
                               constraint n2_r1_id_fk foreign key(root1_id)
                               references philips.root1(root1_id) enable,
                               constraint n2_n3_id_fk foreign key(node3_id)
                               references philips.node3(node3_id) enable);
    grant all on philips.node2 to philips;
    create or replace trigger philips.tgr_node2
       before delete or insert or update on philips.node2
       begin
         null;
       end;                          
    create table philips.node3(node3_id number,
                               root2_id number,
                               constraint node3_id_pk primary key(node3_id)
                               enable,
                               constraint n3_r2_id_fk foreign key(root2_id)
                               references philips.root2(root2_id) enable);
    grant all on philips.node3 to philips;
    create or replace trigger philips.tgr_node3
       before delete or insert or update on philips.node3
       begin
         null;
       end;                          
    create table philips.node4(node4_id number,
                               node2_id number,
                               constraint node4_id_pk primary key(node4_id)
                               enable,
                               constraint n4_n2_id_fk foreign key(node2_id)
                               references philips.node2(node2_id) enable);
    grant all on philips.node4 to philips;
    create or replace trigger philips.tgr_node4
       before delete or insert or update on philips.node4
       begin
         null;
       end;                          
    -- out of the relational model
    create table philips.node5(node5_id number,
                               constraint node5_id_pk primary key(node5_id)
                               enable);
    grant all on philips.node5 to philips;
    create or replace trigger philips.tgr_node5
       before delete or insert or update on philips.node5
       begin
         null;
       end;
    -- 3
    create table philips.dictionary(table_name varchar2(30));
    insert into philips.dictionary values ('ROOT1');
    insert into philips.dictionary values ('ROOT2');
    insert into philips.dictionary values ('NODE1');
    insert into philips.dictionary values ('NODE2');
    insert into philips.dictionary values ('NODE3');
    insert into philips.dictionary values ('NODE4');
    insert into philips.dictionary values ('NODE5');
    --4
    create or replace package body philips.pck_restore_philips as
      procedure sp_select_tables is
        aExportTablesPhilips     utl_file.file_type := null; -- file to write DDL of tables   
        aExportReferencesPhilips utl_file.file_type := null; -- file to write DDL of references
        aExportIndexesPhilips    utl_file.file_type := null; -- file to write DDL of indexes
        aExportGrantsPhilips     utl_file.file_type := null; -- file to write DDL of grants
        aExportTriggersPhilips   utl_file.file_type := null; -- file to write DDL of triggers
        sDirectory               varchar2(100) := '/app/oracle/admin/tace/utlfile'; -- directory \\bmduhom01or02 
        cTables                  udt_tables; -- collection to store table names for the relational depth
      begin
        -- omits all referential constraints:
        dbms_metadata.set_transform_param(dbms_metadata.session_transform, 'REF_CONSTRAINTS', false);
        -- omits segment attributes (physical attributes, storage attributes, tablespace, logging):
        dbms_metadata.set_transform_param(dbms_metadata.session_transform, 'SEGMENT_ATTRIBUTES', false);
        -- append a SQL terminator (; or /) to each DDL statement:
        dbms_metadata.set_transform_param(dbms_metadata.session_transform, 'SQLTERMINATOR', true);
        -- create/open files for export DDL:
        aExportTablesPhilips := utl_file.fopen(sDirectory, 'DDLTablesPhilips.pdc', 'w', 32767);
        aExportReferencesPhilips := utl_file.fopen(sDirectory, 'DDLReferencesPhilips.pdc', 'w', 32767);
        aExportIndexesPhilips := utl_file.fopen(sDirectory, 'DDLIndexesPhilips.pdc', 'w', 32767);
        aExportGrantsPhilips := utl_file.fopen(sDirectory, 'DDLGrantsPhilips.pdc', 'w', 32767);
        aExportTriggersPhilips := utl_file.fopen(sDirectory, 'DDLTriggersPhilips.pdc', 'w', 32767);
        select d.table_name bulk collect
          into cTables -- collection with the names of tables in the schema philips
          from all_tables t, philips.dictionary d
         where owner = 'PHILIPS'
           and t.table_name = d.table_name;
        -- execution
        sp_seeks_ddl(aExportTablesPhilips,
                     aExportReferencesPhilips,
                     aExportIndexesPhilips,
                     aExportGrantsPhilips,
                     aExportTriggersPhilips,
                     cTables);
        -- closes all files
        utl_file.fclose_all;
      end sp_select_tables;
      procedure sp_seeks_ddl(aExportTablesPhilips     in utl_file.file_type,
                             aExportReferencesPhilips in utl_file.file_type,
                             aExportIndexesPhilips    in utl_file.file_type,
                             aExportGrantsPhilips     in utl_file.file_type,
                             aExportTriggersPhilips   in utl_file.file_type,
                             cTables                  in out nocopy udt_tables) is
        cDDL       clob := null; -- colletion to save DDL
        plIndex    pls_integer := null;
        sTableName varchar(30) := null;
      begin
        for i in cTables.first .. cTables.count loop
          plIndex    := i;
          sTableName := cTables(plIndex);
           * Retrieves the DDL and the dependent DDL into cDDL clob       *      
          * for the selected table in the collection, and writes to file.*
          begin
            cDDL := dbms_metadata.get_ddl('TABLE', sTableName, 'PHILIPS');
            sp_writes_ddl(aExportTablesPHILIPS, cDDL);
          exception
            when dbms_metadata.object_not_found then
              null;
          end;
          begin
            cDDL := dbms_metadata.get_dependent_ddl('REF_CONSTRAINT', sTableName, 'PHILIPS');
            sp_writes_ddl(aExportReferencesPhilips, cDDL);
          exception
            when dbms_metadata.object_not_found2 then
              null;
          end;
          begin
            cDDL := dbms_metadata.get_dependent_ddl('INDEX', sTableName, 'PHILIPS');
            sp_writes_ddl(aExportIndexesPhilips, cDDL);
          exception
            when dbms_metadata.object_not_found2 then
              null;
          end;
          begin
            cDDL := dbms_metadata.get_dependent_ddl('OBJECT_GRANT', sTableName, 'PHILIPS');
            sp_writes_ddl(aExportGrantsPhilips, cDDL);
          exception
            when dbms_metadata.object_not_found2 then
              null;
          end;
          begin
            cDDL := dbms_metadata.get_dependent_ddl('TRIGGER', sTableName, 'PHILIPS');
            sp_writes_ddl(aExportTriggersPhilips, cDDL);
          exception
            when dbms_metadata.object_not_found2 then
              null;
          end;
        end loop;
      end sp_seeks_ddl;
      procedure sp_writes_ddl(aExport in utl_file.file_type,
                              cDDL    in out nocopy clob) is
        pLengthDDL  pls_integer := length(cDDL);
        plQuotient  pls_integer := null;
        plRemainder pls_integer := null;
      begin
          * Register variables to control the amount of lines needed   *
         * for each DDL and the remaining characters to the last row. *
        select trunc(pLengthDDL / 32766), mod(pLengthDDL, 32766)
          into plQuotient, plRemainder
          from dual;
          * Join DDL in the export file.                            *
         * ps. 32766 characters + 1 character for each line break. *
        -- if the size of the DDL is greater than or equal to limit the line ...
        if plQuotient >= 1 then
          -- loops for substring (lines of 32766 characters + 1 break character):
          for i in 1 .. plQuotient loop
            utl_file.put_line(aExport, substr(cDDL, 1, 32766));
            -- removes the last line, of clob, recorded in the buffer:
            cDDL := substr(cDDL, 32767, length(cDDL) - 32766);
          end loop;
        end if;
          * If any remains or the number of characters is less than the threshold (quotient = 0), *
         * no need to substring.                                                                 *
        if plRemainder > 0 then
          utl_file.put_line(aExport, cDDL);
        end if;
        -- record DDL buffered in the export file:
        utl_file.fflush(aExport);
      end sp_writes_ddl;
    begin
      -- executes main procedure:
      sp_select_tables;
    end pck_restore_philips;<font color="red">The problem is that I still have ...
    When creating the primary key index is created and this is repeated in the file indexes.
    How to avoid?</font>

  • App Store and 10.6.8 - What a Mess

    I know this appears in many discussions in this area, but I have searched the web and tried everything I could find to no avail.  I will note what I have done below, so if anyone has anymore ideas that have worked, I would appreciate the lead.  Hopefully, Apple will be working to fix this in 10.6.8, as I am seeing the same problem all over the web. 
    I am running Snow Leopard 10.6.8 on a MacBook Pro.  My intention was to dload Lion, excited to install the new OS.  I launch the App Store, and it launches fine.  I go to purchase and dload Lion, and it just sits and spins.  Nothing ever is purchased or dloaded.  I check the "Purchased" applications in the store, and it indicates I have not purchased anything yet.  Out of curiosity, I try to dload another app, a free one, from the App Store, and I get the same thing.  This is an App Store problem generally, not specifically related to the purchase and dload of Lion.  Based on ideas from the web, I have tried the following (none of these have worked at all - problem still exists exactly the same):
    1.  Dloaded the 10.6.8 Combo updater.  Installed.  Rebooted.  Didn't work.
    2.  Deleted the App Store application.  Rebooted.  Installed 10.6.8 Combo updater.  Robooted. App Store launches - still same problem.
    3.  Edited my apple.com.Boot.plist in Libarary/Preferences/SystemConfiguration as suggested online - also deleted the NetworkInterfaces.plist (in the same folder).  Rebooted.  Started the App Store.  App Store launches - still the same problem.
    4.  Logged into the App Store with a few different usernames (even created a new one).  Still same problem.
    5.  Logged into the App Store and re-verified my security code on my credit card (on all of my iTunes accounts).  Still same problem.
    6.  Started iTunes and made sure I was logged out of the account I am trying to purchase with in the App Store.  Lauch App Store with that username and try to purchase.  Still the same problem.
    7.  Started iTunes and logged into the account I am trying to use on the App Store.  In iTunes, re-verified my security code on my credit card there.  Logged out of the account in iTunes.  Lauched the App Store using this account.  Still same problem.
    8.  I did successfully purchase, dload, and install Lion on my Mac Pro at work.  I have logged into the App Store from my MacBook Pro using this same account.  When I go into Purchased, it does show there with an "Intall" button adjacent.  When I click the "Install" button, I basically get the same reaction.  The App Store sits and spins, but nothing is dloaded or installed.
    Again, I know there are a lot of posts on this issue.  However, the summary items above is a list of ideas I have found on the web.  Each item comes from suggestions I have found on the web.  I have tried each to no avail at all.  I have rebooted diligently as system changes have taken place.  The App Store launches fine.  The store basically just spins and no purchase or dload occurs.
    P.S. When I go into the Console under Utilities, I do get an error message over and over from the App Store.  It is the following:
    7/25/11 8:52:09 AM          [0x0-0x29029].com.apple.appstore[337]          Mon Jul 25 08:52:09 MacBookPro.local App Store[337] <Error>: CGBitmapContextGetBitsPerComponent: invalid context 0x101b86680
    7/25/11 8:52:09 AM          [0x0-0x29029].com.apple.appstore[337]          This isn't a bitmap context. Forcing destination format to ARGB_8 for CGContext.
    7/25/11 8:52:09 AM          App Store[337]          CGBitmapContextGetBitsPerComponent: invalid context 0x101b86680
    I have searched this error online and tried a few suggestions.  However, I still receive the same error in the Console and the App Store behaves the same.

    Actually, your suggestion is one of the first I tried.  I created a brand new user account using my wife's email.  It had the same problem.
    However, if anyone has the exact same issue as mine (e.g. you have installed it elsewhere successfully), it looks like I have sucessfully worked around it.  Here is what I did (am doing):
    1.  On the computer where I successfully accessed the App Store, dloaded and installed Lion, I logged back into the App Store with a different username.  From there, I re-purchased Lion (which I am fine with, as it is not overly expensive and I will be running the OS on two different computers).
    2.  Lion successfully downloaded
    3.  Lion will then try to begin installation - which you won't want to do (at least I didn't as I already having running on this machine)
    4.  The Lion installer will show on your dock.  If you right click it, you will be able to select Open in Finder.  When finder opens, I moved the "Install Mac OS X Lion" application to my desktop (just easier for me to find)
    5.  Next I used Toast (or any other CD/DVD burning program) to burn the "Install Mac OS X Lion" application to a DVD.  You will need to use a DVD as it is about 3.5 GB.
    6.  Once complete, I put the DVD into my MacBook Pro and copies the "Install Mac OS X Lion" application to the desktop of my MacBook Pro (remember, this the computer I could not access the App Store from)
    7.  Once the application is copied to the desktop, simply double-click it and it will begin the install.  From there, just follow the instructions on the screen.
    A bit convoluted - and I'm sure there are more efficient steps to do this.  I just wanted to outline how I did it.  In any event, I am now running Lion on my MacBook Pro after three days of trying to figure it out.  Good luck!

  • App store not working after on iphone after IOS 8.2 update

    after i updated my Iphone 5 to IOS 8.2 my app store loged my apple id account out and when i try and log back in or even try and download a app it saids that 'cannot connect to Itu

    There have been numerous problems with the App Store, iTunes and other Apple related sites. Basically any place that required your Apple ID and Password have been experiencing difficulty today. But it seem this has just recently been corrected.
    https://www.apple.com/support/systemstatus/

  • Graphs and parent-child with loops and duplicates

    There is a parent-child relation in the table t(prnt, chld) which allows duplicates (A->B, A->B) and opposite paths (A->B, B->A), and complicated loops. Is there a way to identify rows that form any separate "connections network" and assign a "name" to them of any kind (letter, number, wahtever)? I try to use WITH recursive clause to identify and group rows belonging to one graph but with no luck. Any help would be appreciated.
    thank you

    Frank, I posted inputs for all graphs (multiple inserts) and some allowable outputs for one graph. For all cases (ie. graphs) the rule is the same:
    1. identify all nodes belonging to a graph
    2. "name" that graph (min, max or whatever you like)
    3. print the output in the form (node_belonging_to_a_graph, name_of_the_graph) for all identified graphs
    And as you said, I am somewhat flexible. I don't want to constrain the problem with saying min, max because it's not important how you name it, but the way which is somehow natural and fits with requirements is the usage of nodes' values.
    You ask me if (1,1),(2,1),(3,1) is also OK as an output for sample graph (1,2)+(2,3). Yes it is. It is one of those I posted but with additional node which is chosen as a name for a graph. But as you can guess it doesn't matter which node you choose, and the additional information about a node named with its own name is not as important and the information that all other nodes are named with that name but it is 100% acceptable. If you changed the naming convention and started to use letters instead of node values then yes, it would be a must to have the output in the form (1,a),(2,a),(3,a).
    You also ask me about the result for 90x data inserted as 5 rows: (901,902)..(906,904) and present sample result:
    901 902
    905 902
    906 902
    And the answer is no, it is not good result. It misses the information about the nodes 904 and 903 which belong to this graph too. The correct result could be:
    901 902
    905 902
    906 902
    903 902
    904 902
    or any other "combination" which presents 5 nodes with the name of the sixth (in this case of 6-node graph). Just one have to be picked, it doesn't matter which one. The "vertical" order is also irrelevant.
    As you can see there is a lot of room that gives acceptable result. I don't want to constraint it because it can influence performance which is important when dealing with graph structures in relational databases (RDBMS are not predestined to easily cope with that sort of information). It can also influence the chosen algorithm and I'd like to pick the fastest one which gives acceptable result.
    Two numbers x and y are in the same group (graph) if (and only if) at least one of the following is true:
    (1) they appear on the same row together (it doesn't matter which number is in which of the 2 columns), or
    --(2) x appears on the same row with a third number, z, and z is in the same group as y--
    (2) there are other edges (entries) in the table that form a "path" from x to y. And because the direction of the path is not important for the problem (ie. the parent-child table structure can be forgotten for a moment), the path means "there exists connection" between x and y aka "you can walk from x to y".
    The output consists of 2 columns: id (which is unique in the result set) and grp (which identifies the group) *[correct]*
    The id column will always be one of the numbers in the group *[correct]*
    It doesn't matter what the grp column is, or even what data type, as long as it distinguishes between the different groups. *[correct, but as you noted using one, picked number from a graph is the prefferable way]*
    If there are N distinct numbers in the group, I need N rows of output for that group, with id showing all those distinct numbers. *[correct, but if you choose your naming convention as naming a graph with the value of the node belonging to it you can ommit the node which is named for itself (but it doesn't hurt is such row appear in the result)]*
    You ask me if the graph is directed. No it's not. Your example (x,y) and (y,x) is great, and it can be concluded from my first post when I say that "opposite paths" (A->B, B->A) exists. What matters is the connection between the nodes. The parent-child table somehow imposes that direction is important, but for this problem it is not.
    One of the motivations for my post is to know what other people think without affecting their minds with my approach. I don't want to skew anybody's mind into my solution which works, but it's not effective. I don't mind showing it but I kindly ask you to think about the problem before I post it. Diversity of approaches helps to distill the best one.
    As I said I did it with the usage of sys_connect_by_path. If it doesn't appear to you as possible usage then it is likely that I don't use it efficiently. Please understand, I will post it if you ask me one more time but if you can live for a while without my inefficient solution and suggest something with WITH clause I would appreciate it.
    There is no exact result I expect. There are many results which are correct and acceptable. They all must follow the rules described at the beginning.
    Thank you
    Edited by: 943276 on Jun 28, 2012 1:32 AM

  • Storing XML data in CLOB and relational tables

    I would like to ask whether there is a possibility to store XML data using normal relational tables and CLOBs in the same time. For example I have some XML data (structured data) which I would like update very often and some which are only a kind of description. I found something about it in http://technet.oracle.com/tech/xml/infoocs/otnwp/about_oracle_xml_products.htm . But I do not know how to use Oracle8i views and some functionality of XML SQL Utility to retrieve XML data in one file.
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Maciej Marczukajtis ([email protected]):
    I would like to ask whether there is a possibility to store XML data using normal relational tables and CLOBs in the same time. For example I have some XML data (structured data) which I would like update very often and some which are only a kind of description. I found something about it in http://technet.oracle.com/tech/xml/infoocs/otnwp/about_oracle_xml_products.htm . But I do not know how to use Oracle8i views and some functionality of XML SQL Utility to retrieve XML data in one file.<HR></BLOCKQUOTE>
    Czesc Maciek,
    There are some good examples with XSQL Servlet. From what I understand you have one XML file and you need to save a portion of document in relational tables and other portion in CLOB.
    Yes, you can do that.
    You can do it many ways. I can suggest (2).
    1. Use the views
    2. call your java procedure that will do
    the xml processing, brake it down and insert
    releval frogments into different tables/columns
    null

  • Howto: Save prediction query results to relational table

    I believe saving prediction query results to relational tables is possible (the BI studio does it!). I am not clear on how to do this w/o the BI studio, which means if I write a DMX query and want to store its output to a relational table, how do I do it?
    Tips, anyone?
    Thanks!

    a) You can write some code do this on the client-side. Use ADOMD.NET in your C# app to execute the DMX query and fetch a data reader, open up another connection to your relational database and write rows of data to the second connection as you read them from the first.
    b) You can create a linked server to your Analysis Server instance in your SQL Server relational server instance and then execute a "SELECT * INTO <newtable> FROM OPENQUERY(<linkedserver>, <DMX query>)" T-SQL statement from your relational database connection.

  • Horizontal Fragmentation in NoSql Data Stores

    Hello every body
    My question is :
    can we apply the optimization technique of " Horizontal fragmentation (partitioning)" in this new type of data stores (NoSql) just like in relational databases?
    thanks at advance

    No, not really. I suggest reading the documentation here:
    http://www.oracle.com/technetwork/products/nosqldb/overview/index.html
    You may want to start with the link "Intelligent Driver" and also read the Getting Started Guide.
    --mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Maybe you are looking for