Whats is referential integrity

Hi all,
What is referential integerity found in the communication structure ? what is it significance and when do you use in real time scenario. pls explain with an real time scenario.
what is cardinality ? and when shd u used cardinality and cardinality can be only defined in infocubes isnt it? can cardinality be defined in ods ?
thanxs in advance
hari

Hi Hari,
  Referential Integrity: Its a DataBase concept which combines(logically) the data of multiple table with the master table. Here master table has the primary key and rest of the tables have the same key as forienkey.
Here we use the characteristic (or combinations of Chars) call as referential char.
check this.
you might be knowing that generally refrential integrity is concerned with nothing but primary key and foriegn key relationship. Generally we use to check uniqueness of records.
In sap we use it during flexible updation...to check the data records of transaction data and master data.
In other words, to check before loading of data, that whether loading will be properly or not.
we will check(tick) the option in the maintainance of the
infosource--> communication structure
it will be better if you clearly mention your problem, if further help is needed.
http://help.sap.com/saphelp_nw2004s/helpdata/en/3a/14c43bb7137503e10000000a11402f/content.htm
Referential integrity is the property that guarantees that values from one column depend on values from another column.This property is enforced through integrity costraints....
see this link...
http://help.sap.com/saphelp_nw2004s/helpdata/en/6d/117c5fd14811d2a97400a0c9449261/content.htm
Please find the below url
https://www.sdn.sap.com/irj/sdn/advancedsearch?query=referential%20integrity&cat=sdn_all
thanks
@jay

Similar Messages

  • What  is self referential integrity? How does it effect the Database?

    Hello Gurus,
    What is self referential integrity?
    How could it is achieved and implemented?
    and what is effect on the Database?
    Thanks in advance.
    ~ SubbaReddy .M

    Self referential integrity simple means that the parent end of a foreign key constraint is in the same table as the child end. Consider the SCOTT.EMP table. Every manager is also an employee. Hence there is a foreign key between the MGR column and the EMPNO column.
    rgds, APC

  • What is mean by Referential Integrity? Where do we use it and Why..?

    Hi All,
    Can anybody tell me, What is mean by Referential Integrity? Where do we use it and Why..?
    Regards,
    Kiran Telkar

    Dear Kiran Telkar ,
    you might be knowing that generally refrential integrity is concerned with nothing but primary key and foriegn key relationship. Generally we use to check uniqueness of records.
    In sap we use it during flexible updation...to check the data records of transaction data and master data.
    In other words, to check before loading of data, that whether loading will be properly or not.
    we will check(tick) the option in the maintainance of the
    <b>infosource--> communication structure</b>
    it will be better if you clearly mention your problem, if further help is needed.
    hope this will help you.
    Regards
    vinay
    <i>please assign points to all who will help you.</i>

  • What is meant by referential integrity

    hi
    what is meant by referential integrity

    Hi,
    Referential integrity is the property that guarantees that values from one column depend on values from another column. This property is enforced through integrity constraints.
    If you set this flag a check for referential integrity is performed for this InfoObject, against the master data table or ODS object. The InfoObject is checked for valid characteristic values.
    It is used when v r doing Flexi update...
    Prerequisites for checking for referential integrity:
    Data is updated flexibly
    You have activated error handling in the BW scheduler (Tab page Update)
    On the Update tab page in the BW scheduler, you have selected the option Always update data, even when no master data exists for the data.
    send ur id, i will send u screen shot of ref.integrity
    regards
    reena

  • Maintaining referential integrity using MS SQL server

    Some time ago I posted a question relating to the following extension:
    <extension vendor-name="kodo" key="jdbc-delete-action" value="null"/>
    Kodo generates a "on delete set null" constraint for this, however ms sql
    server does not support this. Since I don't want to matain this referential
    integrity in my java code (meaning as soon as an object is deleted, setting
    all references to it to null), I tried to implement a custom dictionary with
    the default ms sql server solution for this problem: creating a trigger by
    overriding the "getAddForeignKeySQL" method. This works fine when creating a
    database from scratch using the schema tool, however, when updating an
    existing databasebase schema, this is ignored, thereby not solving the
    problem of having the database maintenance automated. I suppose I have to
    write code for checking whether the trigger already exists. Browsing through
    the code, I couldn't figure out how this is done. Can someone give me
    suggestions on how to do this (and if this takes a lot of effort).
    I also would like to know whether solarmetric has intentions to deal with
    this problem in their framework. To be honest, I was quite surprised that
    Kodo doesnt take care of this, leaving my database in an inconsistent state.
    kind regards,
    Christiaan

    "Abe White" <[email protected]> schreef in bericht
    news:caaunu$ecj$[email protected]..
    >
    I also would like to know whether solarmetric has intentions to dealwith
    this problem in their framework. To be honest, I was quite surprisedthat
    Kodo doesnt take care of this, leaving my database in an inconsistentstate.
    >
    Well, I would say that you're the one leaving the database in an
    inconsistent state by not keeping your object model consistent :)From the manual:
    6.2.2.12. jdbc-delete-action
    If a field holds a relation to another object, you can use the
    jdbc-delete-action field extension to control the delete action of the
    database foreign key that models this relation. Possible values are:
    null: Null the column(s) of this foreign key when the related record is
    deleted.
    It does mean that if the primary key record is deleted, all foreign keys to
    the record are set to null, right? Since the jdo framework is about database
    independence, not writing sql code (and of course lots more;) and Kodo
    supports ms sql server, I would have expected that kodo to set the foreign
    key to null if the object is deleted. Even if I do know sql server supports
    does not support a 'on delete set null' sql statement;)
    >
    We have no plans to create triggers at this time.
    What do you mean when you say "it is ignored" when you're updating?
    Exactly what tool are you running, what actions are you running with, is
    the foreign key extension present, and what is the outcome?Like I said, I wrote code in the "getAddForeignKeySQL" in the dictionary, so
    a trigger is created when creating the database in the workbench (by running
    the schematool). However, if the table already exists, but not the trigger,
    refreshing the database from the workbench does not call the
    getAddForeignKeySql to add the trigger to the table.

  • I have been interested in how lightroom uses the catalog so was poking around a backup of the catalog. I found it rather concerning that although the database (catalog) is pretty well designed, there is no referential integrity defined or enforced.

    I have been interested in how lightroom uses the catalog so was poking around a backup of the catalog.  I am a database administrator and I found it rather concerning that although the database (catalog) is pretty well designed, there is no referential integrity defined or enforced. This is non-standard practice and could well be the source of corrupt catalogs I have seen many people complain about. I would strongly recommend the developers modify the catalog and adopt best practices if they want to improve the stability of Lightroom and the catalog.

    I would imagine that data integrity is not enforced for performance reasons. In a closed environment like LR where the application has complete control over the data, enforcing data integrity may not be worth the performance hit. Often what is done in an environment like this is to have data integrity on in test environments which would expose data integrity bugs but where the impact of performance is low. In "production" it is then turned off to get as much performance as possible. I would say there are many more complaints about performance than corrupt catalogs. And corrupt catalogs are more likely due to interruptions in writing to the catalog (like crashes, backups or dropbox activity while LR is running, etc). Data integrity would not help in these cases as they are outside the databases control.

  • CDG-01141 ERROR: Module Component Table Usage ...  Table usage ... requires primary key column for referential integrity

    For some strange reason when I modified a form, (commented out some code in a when-window-activated trigger) I now get the following error.
    CDG-01141 ERROR: Module Component Table Usage GR1130A.CUSTOMER.GR_CUSTOMER.GC: Table usage GR_CUSTOMER requires primary key column for referential integrity
    I am sure this is not related to my change, but do not know what may have caused this or how to fix it.
    Anyone seen this error before? been able to fix it?
    Thanks!
    Windows 7
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0
    Designer Version 6.5.95.4.8

    You know that Developer/Designer 6i is not certified for Windows 7, right? Also, your version is not the latest one, so you can try to install the latest patch set first.
    >Table usage GR_CUSTOMER requires primary key column for referential integrity
    Check if there is a PK in the table definition (not in the database, but in Designer).

  • Self Referential integrity constraint?

    What is self-referential integrity constraint? Is it a foreign key where the same column acts as the parent key too.

    The good old EMP table in the SCOTT schema is one example. Managers are employees, so the MGR column refers back to the EMPNO primary key. If I wanted to create my own table...
      1  create table emp2 (
      2   empno number primary key,
      3   mgr   number references emp2( empno )
      4* )
    SCOTT @ hp92 Local> /
    Table created.Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Referential Integrity

    Hi,
    Is there a way to ensure semantic consistency of the ontology stored in Oracle 11g at insert/update/delete time? This would be equivelant to referential integrity in the relational model.
    Thanks,
    Essam

    Reponse to Essam: One possibility is to call the validation procedure via a trigger on inserts. But of course that would be computationally intensive. But perhaps there are only some situations that could lead to semantic inconsistency, and the trigger could be used for only those situations (and not on every insert)?
    Response to Christian: This is something we can look at in the future. If you have more detailed feedback on what you like to see do write to me at melliyal <dot> annamalai <at> oracle <dot> com
    Melli

  • Foreign Key or Referential Integrity

    Hi All,
    I would like to know whether Sun Java System Directory Server supports the concept of foreign key or referential integrity? I would like to have LDAP entries point to other LDAP entries in a different subtree of the same DIT. Is this possible?
    Please help.
    Rgds,
    anna
    (http://missingrainbow.blogspot.com)

    What you're asking is called Aliases in the LDAP terminology.
    Sun Directory Server does support creating alias objects, but does not support dereferencing them during searches or reads.
    Referential Integrity is about removing or changing attributes with the DN syntax when the entry they reference is deleted or renamed. Sun DS does support referential integrity via a plugin. The list of attributes for which it's enforced is configurable (and should be indexed).
    Regards,
    Ludovic.

  • Issue with Referential Integrity check in Oracle VPD Policy

    Hi,
    Lets assume I have two tables - Customer and Order, with cust_id in Order table referring to primary key of Customer table.
    Example Data;
    Customer
    cust_id Name
    1 abc
    2 def
    3 ghi
    Order
    Order_id cust_id Order_type
    1 1 A
    2 2 A
    3 1 B
    Now I have policies defined on both the tables;
    - for "Select, Insert, Update" queries on Customer table.
    - for "Select" queries on Order Table.
    Policy 1 on Order Table;
    Irrespective of the user, predicate = 'Order_type = ''A'''
    Policy 2 on Customer Table;
    Irrespective of the user, predicate = '(select count(1) from order o where o.cust_id = customer.cust_id and o.order_type = ''B'') > 0'
    My intention is to show only those customers who have atleast one order of type 'B'. And this policy works fine in case a user tries to read data from customer table. (for example, record for cust_id = 2 will not be returned as it don't have any orders of type "B")
    However, when a user tries to insert record in Order Table, because of the existing referential integrity constraint, the Policy on Customer table is also getting triggered. And an exception is being raised "ORA-28113: policy predicate has error".
    Could someone please explain why this is happening ?

    I'm afraid, there is no such a mean.
    At least I do not know about it.

  • What are the integration pts of RFX and Reverse Auctions & ways of creating

    Hi Friends
    What are the integration points of RFX and Reverse Auctions & ways of creating them
    Regards
    Surya
    Edited by: surya K on Jan 14, 2009 4:56 AM

    Hi Surya
    You need to be more clear on the thread.
    Please detail out what you are looking at
    Whether you are trying to integrate SRM Bid Invitation O/P to SAP E-Sourcing RFx draft
    or some other integration.
    Please spell out clearly
    Regards
    Tridip Chakraborthy

  • DRI (declarative referential integrity) and speed improvements.

    EDITED: See my second post--in my testing, the relevant consideration is whether the parent table has a compound primary key or a single primary key.  If the parent has a simple primary key, and there is a trusted (checked) DRI relation
    with the child, and a query requests only records from the child on an inner join with the parent, then sql server (correctly) skips performing the join (shown in the execution plan).  However, if the parent has a compound primary key, then sql server
    performs a useless join between parent and child.   tested on sql 2008 r2 and denali.  If anyone can get sql server NOT to perform the join with compound primary keys on the parent, let me know.
    ORIGINAL POST: I'm not seeing the join behavior in the execution plan given in the link provided (namely that the optimizer does not bother performing a join to the parent tbl when a query needs information from the child side only AND
    trusted DRI exists between the tables AND the columns are defined as not null).  The foreign key relation "is trusted" by Sql server ("is not trusted" is false), but the plan always picks both tables for the join although only one is needed. 
    If anyone has comments on whether declarative ref integrity does produce speed improvements on certain joins, please post.  thanks.
    http://dinesql.blogspot.com/2011/04/does-referential-integrity-improve.html

    I'm running sql denali ctp3 x64 and sql 2008 r2 x64, on windows 7 sp1. I've tested it on dozens of tables, and I defy anyone to provide a counter-example (you can create ANY parent table with two ints as a composite primary key, and then a child table using
    that compound as a foreign key, and create a trusted dri link between them and use the above queries I posted)--any table with a compound foreign key relation as the basis for the DRI apparently does not benefit from referential integrity between those tables
    (in terms of performance). Or to be more precise, the execution plan reveals that sql server performs a costly and unnecessary join in these cases, but not when the trusted DRI relation between them is a single primary key. If anyone has seen a different result,
    please let me know, since it does influence my design decisions.
    fwiw, a similar behavior is true of sql server's date correlation optimization: it doesn't work if the tables are joined by a composite key, only if they are a joined by a single column:
    "There must be a single-column
    foreign key relationship between the tables. "
    So I speculate, knowing absolutely nothing, that there must be something deep in the bowels of the engine that doesn't optimize compound key relations as well as single column ones.
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[parent](
    [pId1] [int] NOT NULL,
    [pId2] [int] NOT NULL,
    CONSTRAINT [PK_parent] PRIMARY KEY CLUSTERED
    [pId1] ASC,
    [pId2] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    ) ON [PRIMARY]
    GO
    CREATE TABLE [dbo].[Children](
    [cId] [int] IDENTITY(1,1) NOT NULL,
    [pid1] [int] NOT NULL,
    [pid2] [int] NOT NULL,
    CONSTRAINT [PK_Children] PRIMARY KEY CLUSTERED
    [cId] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    ) ON [PRIMARY]
    GO
    ALTER TABLE [dbo].[Children] WITH CHECK ADD CONSTRAINT [FK_Children_TO_parent] FOREIGN KEY([pid1], [pid2])
    REFERENCES [dbo].[parent] ([pId1], [pId2])
    ON UPDATE CASCADE
    ON DELETE CASCADE
    GO
    /* the dri MUST be trusted to work, but it doesn't work anyway*/
    ALTER TABLE [dbo].[Children] CHECK CONSTRAINT [FK_Children_TO_parent]
    GO
    /* Enter data in parent and children */
    select c.cId FROM dbo.Children c INNER JOIN Parent p
    ON p.pId1 = c.pId1 AND p.pId2 = c.pId2;
    /* Execution plan will be blind to the trusted DRI--performs the join!*/

  • Query to display the tables with referential integrity

    Hello,
    I need to display the Tables which are having referential integrity..
    Like need to dispaly the parent and child tables
    Please give me some idea on this..
    Thanks,

    Here's a nice query you can use:
    with temp_constraints as (
    select table_name
    ,      constraint_name pkey_constraint
    ,      null fkey_constraint
    ,      null r_constraint_name
    from   user_constraints
    where  constraint_type = 'P'
    union all
    select a.table_name
    ,      a.constraint_name pkey_constraint
    ,      b.constraint_name fkey_constraint
    ,      b.r_constraint_name
    from   user_constraints a, user_constraints b
    where  a.table_name = b.table_name
    and a.constraint_type = 'P'
    and b.constraint_type = 'R'
    select rpad( '*', (level-1)*2, '*' ) || table_name relation
    from   temp_constraints
    start with fkey_constraint is null
    connect by pkey_constraint <> r_constraint_name
    and prior  pkey_constraint = r_constraint_name;From http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:661009003696#tom69115451356231

  • Tables with referential integrity

    Hi All,
    I am generating scripts to insert data from one schema to another. something like this:
    Insert into schemaA.table1
    select *from schemaB.table1;There are many tables with referential integrity in the schema. how can generate the scripts in an order so that there
    won' t be any referential integrity issue....
    Thanks.
    AJR

    Hi,
    Thanks.
    I tried, but it gives me 6 sets of data.
    SELECT TABLE_NAME--, LTRIM(SYS_CONNECT_BY_PATH(TABLE_NAME, '=>'),'=>') TABLE_NAME_PATH,CONSTRAINT_NAME, R_CONSTRAINT_NAME, LEVEL
    FROM   USER_CONSTRAINTS,ALL_OBJECTS B
    --WHERE  LEVEL > 1
    WHERE
    USER_CONSTRAINTS.OWNER = B.OWNER AND
    USER_CONSTRAINTS.TABLE_NAME = B.OBJECT_NAME AND
    B.OBJECT_TYPE = 'TABLE'
    CONNECT BY R_CONSTRAINT_NAME = PRIOR CONSTRAINT_NAME
    ORDER BY TABLE_NAME;AJR

Maybe you are looking for