Some basic questions about foriegn key , and relationships.

Hi
Thank you for reading my post
I read some documents about foreugn key and tables relation ships.
but i still can not understnad some stuff.
1-when we have a foreign key , we have two tables that we want to relate them together
in a way that one of ? table columns forced to be a value from ?? table column.
what is name of those two tables , i saw , child-parent , ..... which confuse me.
can some one please tell me correct name of those two tables ?
2-some times we need some kind of master details relation like :
one-to-many : i this case MANY table will have a column to point a record in ONE table , can this relation be a foreign key relation ?
3-we can achieve many-to-many relation only by using a helper table to host both tables primary keys in a record to relate them together.
can you point me to some resources that help me to find answers to this questions ?
or explain them to me ?
thank you for your time.

These are critical database basics that you need to understand. I would seriously recommend getting some study in, because proper relational database design relies on the basic principle of data and relationships and a process called normalization.
In reality, you only really need one gigantic table to host data. It would include everything you would want to know about something - let's take a sales order for example. You would have to record the customer's name, address, etc. along with every item they ordered, etc. You would have a HUGE table full of data that appeared over and over and over again. This is bad design for two basic reasons: it is difficult to query, and it is very easy to have minor mistakes like capitalization or alternate spellings that prevent things from matching up properly. For example, let's say Bob orders 40 widgets and 40 digits. In our hypothetical table, we could put it in as Bob - 40 widgets and Robert - 40 digits. See how confusing this can get even in a simple example? And let's say you wanted to correct all of Robert's orders to say Bob and you found out there were 40 orders from "Robert" How would you know which ones to change?
The process of normalization helps to reduce the chance for these types of errors in addition to creating a good basis for indexes. You normalize the data by creating sets of parent/child tables with a "key" value to match them. In our hypothetical situation, you could create a table for orders and a table for customers. In the customers table you give all the detail for the customer in one place, and you assign each customer a unique number or ID. In the orders table we add the customer ID (NOT the name) and we ensure that we are getting the customer we want, in addition to saving a lot of space and eliminating redundancy. In our example, the customers table is the "parent" table and the orders table is the "child" table. The child table references the unique entries in the parent table via that id. That reference is referred to as a foreign key. The foreign key in the child table points back to the original and complete record in the parent table and eliminates the redundancy of keeping all that extra data for every order. Foreign keys in child tables always refer to a primary/unique key in the parent field.
That help?

Similar Messages

  • Some basic question about SCM Installation

    Hi Folks,
    Could you please advice me about some basic questions about SCM and its installation -
    Q1. Do I need to have an R/3 System to be able to practice OR demo the SCM system?
    Q2. If, yes, which version of SCM is compatible with the ECC 5.0?
    Q3. What are the basic requirements to install SCM (version compatible with ECC 5.0) and ECC on a oracle db and windows OS?
    Q4. Does SCM have APO and BI as an inbuilt functionality OR does the user need to purchase these as an Add-On?
    I know these are some basic questions, but these will help me give me a direction.
    With best wishes,
    Krishna

    Hello Krishna -
    Q1. Do I need to have an R/3 System to be able to practice OR demo the SCM system?
    ---> There are various Modules in SCM Like APO (Sub Modules  DP (stand alone), SNP Needs Master data from R/3 and has to pass on transactional Data to R/3, PPDS same as SNP, GATP same as SNP), ICH needs Data from R/3 to work with. Core Interface (CIF) connects R/3 to APO for transferring data.
    Q2. If, yes, which version of SCM is compatible with the ECC 5.0?
    -->For thorough understanding explore the following links
    http://help.sap.com/saphelp_scm41/helpdata/en/9b/954d3baf755b67e10000000a114084/frameset.htm
    http://help.sap.com/saphelp_scm50/helpdata/en/9b/954d3baf755b67e10000000a114084/frameset.htm
    Q3. What are the basic requirements to install SCM (version compatible with ECC 5.0) and ECC on a oracle db and windows OS?
    -->Refer Above
    Q4. Does SCM have APO and BI as an inbuilt functionality OR does the user need to purchase these as an Add-On?
    --> APO comes with a small BI inbuilt functionality. you can only perform certain functions using that BI.
    Hope this helps.
    Regards,
    Suresh Garg

  • Some basic questions about DAC

    Hello
    I am just starting to use DAC now and I have some basic questions about DAC..
    1: How many different kinda image tables are there, what are they used for?
    2: In order to check which ETL mapping with in the same execution plan is taking a long time, what to do? I mean is there a table that stores such info?
    3: How to determine which ETL task to run after and which after?
    4: Is subject area always map to the Informatica workflow folder? Or what should subject area be?
    Please shed some lights on it, deeply appreciate!
    Thanks

    Hi,
    I have problems to understand you question but will do a try:
    From a logical point of view objects can be only serialized reasonabely when they have a state of it's own which can be reestablished at a later point in time and space without further dependencies.
    F.E. a "serialized file" would NOT make much sense cause it depends heavily on the state of the underlying file system.
    You can't expected that is can be deserialized at a later point of time (physical file refered may not longer exists) or on another machine, where the serialized object was transported to.
    Technical - at zero approach - it's more or less trivial. Simply implement Serializable and all non static, non transient fields of your object will be serialized automatically.
    But there is a couple of pitfalls, you should study documentations regarding this feature.
    Hope this helps
    Martin

  • Some basic questions about serialization

    Hi,
    I have some basic questions on serialization.
    1. What are the basic criteria to make an object serializable(except that it must implement serializable ?) I mean that objects of some class inherently cannot be serialized so any object must have some features which makes it serializable/non serializable.
    2. I know it makes no sense to serialize a socket because it is fixed only by specifying ip and port at both ends, and is valid only when the network connection remains valid. Still in the context of my previous question, I would like to know why a socket cannot be serialized.

    Hi,
    I have problems to understand you question but will do a try:
    From a logical point of view objects can be only serialized reasonabely when they have a state of it's own which can be reestablished at a later point in time and space without further dependencies.
    F.E. a "serialized file" would NOT make much sense cause it depends heavily on the state of the underlying file system.
    You can't expected that is can be deserialized at a later point of time (physical file refered may not longer exists) or on another machine, where the serialized object was transported to.
    Technical - at zero approach - it's more or less trivial. Simply implement Serializable and all non static, non transient fields of your object will be serialized automatically.
    But there is a couple of pitfalls, you should study documentations regarding this feature.
    Hope this helps
    Martin

  • Some basic questions about rmi registry  context  "bind" and "lookup"

    We have more processing to do than can be accomplished with a single computer. To solve the problem I've implemented a distributed computing solution using RMI. (The first time I saw RMI was about 2 weeks ago, so please bear with me!)
    The implementation is a proof of concept not a fully fleshed out system. I have one "Workunit Distributor" computer and any number of "Data Processor" computers all on the same lan segment. "Workunit Distributor" and "Data Processor" computers are both RMI client and server to each other. The "Data Processor" computers are given the ip address and name of the "Data Distributor" on the commandline when they start. They communicate their willingness to receive and process a workunit to the ""Workunit Distributor" via a RMI call. Work units are sent to available "DataProcessors" and results are eventually returned to the "WorkunitDistributor" (minutes or hours later). The model program works quite well, and appears to be capable of doing the processing we need to get done.
    But now that it seems viable, I've been asked to make it a little more scalable, flexible and self configuring. In particular, instead of one "Workunit Distributor", any number of "Workunit Distributors" should be allowed to show up or disappear from the lan at any time and the system should continue to function. I've worked out a good scheme for how this can be done, but I have a couple of questions about the RMI registry (registries?). I'm trying to keep from implementing some functionality that may already be available as a library or subsystem.
    With my current model design, each computer binds to its own registry with a unique name. For instance:
    CRDataProcessorImpl crdpi = new CRDataProcessorImpl(svr);
    Context crDataProcessingContext = new InitialContext();
    crDataProcessingContext.bind("rmi:"+hostName, crdpi);
    Currently the "Data Processors" get the info they need for a Context lookup() of the one and only "Workunit Distributor" from the commandline. And the info the "Workunit Distributor" needs to do a Context lookup() of a "DataProcessor" is passed to it from each "DataProcessor" via a RMI call.
    But in the newer (yet to be implemented) scheme where any and all "Workunit Distributors" show up and disappear whenever they feel like, the naming bootstrapping scheme described above won't work.
    I can imagine a few ways of solving this problem. For instance, having "Workunit Distributors" multicast their contact information on the lan and have a worker thread on each "Data Processor" keep track of the naming information that was multicast. Another alternative (more organized, but more complex) might be to have a dedicated host with a "well known" address and port that "Workunit Distributors" and "Data Processors" could all go to, to register or look up at an application level. Sort of a "domain name service" for RMI. But both these schemes look like a lot of work to implement , debug and maintain.
    The BEST thing would be if there was one plain vanilla RMI registry that was usable by all RMI enabled computers instead of having each computer have its own local name registry. In volume 2 of the Core Java2 book it says that every registry must be local. I'm only hoping there's been progress since the book was published and now a central rmi registry is available.
    If you have any ideas about this I'd like to hear what you know.
    Thanks in advance for any advice.
    Lenny Wintfeld
    ps - I don't believe web services, as full featured as it is, is a useful alternative. I'm moving 100's (in the future possibly 1000's) of megabytes back an forth for processing.

    The local bind/rebind/unbind restriction is still there and it will always be there.
    I would look at
    (a) RMI/IIOP, where you use COSNaming as a registry, which doesn't have that registriction, and which also has location-independent object identifiers
    (b) Jini.

  • Basic questions about connection sharing and radio mode

    I just got TC and have a couple of basic questions.
    At home I have a D-Link ADSL modem/router (no wifi) plugged into the wall, and would like TC to provide wifi. I've connected the WAN port to some LAN port of the router and everything works fine. The intented usage of the setup is wifi-only. Would you recommend TC to do DHCP/NAT? Or is Bridge mode better? In the latter case I don't fully understand who's routing the wifi network (though it actually works).
    Second question is about radio mode. My wife has an iBook G4 that is not capable of talking 801.11n, so I selected the n mode compatible with b/g. In that mode my black MacBook will still be able to talk 801.11n with TC? The iBook has very low usage, it is fine that computer uses 801.11g for TC, but I'd like the MacBook to go full-speed. (If that's not possible I'd ponder purchasing an 801.11n adaptor of some sort for the iBook.)

    Would you recommend TC to do DHCP/NAT? Or is Bridge mode better?
    It doesn't matter.
    In the latter case I don't fully understand who's routing the wifi network (though it actually works).
    The D-Link modem/router.
    In that mode my black MacBook will still be able to talk 801.11n with TC?
    Yes. It will only suffer lower bandwidth if the iBook G4 is actively connected.

  • Basic questions about Bigdata, NOSQL and Hadoop

    Hi,
    I've basic questions related to Bigdata. (I've googled it but still wants to confirm with experts)
    Please correct me if I am wrong on below.
    1) As far as I know big data is collection of unstructured data. Even we can store relational data as well.
    2) NOSQL is an Oracle product to handle bigdata (un structured data and relational data as well)
    3) Hadoop is the only one frame work which is avilable in market to manage the bigdata.
    What are the other database systems we have in the market to manage the bigdata.
    Cheers,
    Suri

    Hi Suri,
    1)  "Big Data" does not have a crystal clear, black and white definition. 
    It is generally characterized as being the processing and management of an amount and type of data that makes a specific workload on that data slow and/or expensive.
    Most commonly, Big Data involves processing and management of unstructured data of large volume and the typical technology used to store/process it is Hadoop, However, on occasion a NoSQL database will also deal with unstructured data.
    Big Data is also seen often in the form of simple, semi-structured data of both large volume and/or large velocity and the typical technology used to store/process it is a NoSQL database.  However, on occasion Hadoop will also deal with semi-structured data of large volume.
    In some cases, Big Data is seen in the form of highly connected data that will be manipulated by advanced algorithms that will need to touch a lot of the data and the typical technology used to store/process it is a Graph type of NoSQL database.
    2)  NoSQL is a category of database technologies most often dealing with the issues as outlined in bullet 2 above.   The Oracle NoSQL Database is oracle's product in the NoSQL category of database technologies.   It does NOT store relational data.   When using NoSQL relations between the data must be managed within the application code.
    3)  Hadoop and NoSQL booth manage Big Data, but different aspects as discussed in (1) above.   Hadoop is a batch based, slow processing data technology, but the "slow" is relative because it can process very large amounts of data, so minutes is commonly seen as fast.   NoSQL is a near real-time data processing technology and typically deals with Big Data where access times are in the single digit millisecond range.
    Hope this helps,
    -Robert

  • Some basic questions about an applet

    Hi all,
    I am planning to make a project in JAVA and I have some problems, which I need to solve. I am not a total beginner in JAVA but I have never made an applet. So I need to know if it is possible to make an upload of files from clients computers to servers and the second problem is if there will be some problems with printing services and applets?
    Thank you all for your helpfull replies.

    Read all about Applets' capabilities and (perhaps even more) incapabilities here:
    http://java.sun.com/docs/books/tutorial/deployment/applet/index.html

  • Very urgent! some basic questions about discoveror

    1. if i made some changes to a workbook (e.g: change some conditions) on discoveror desktop,will them take effect at the same time on discoveror plus???
    2. how and where can I make control for one user to access some workbooks and another user to access some other workbooks both on desktop and plus? (workbook accessibility control)
    Thanks in advance,

    Hi,
    if i made some changes to a workbook (e.g: change some conditions) on discoveror desktop,will them take effect at the same time on discoveror plus???When you save the report using the desktop the workbook in changed for all users including the Plus,
    But in order to see the change in the Plus you will have to re-login to Plus.
    This is since the workbook is saved to memory of the user's PC.
    how and where can I make control for one user to access some workbooks and another user to access some other workbooks both on desktop and plus? (workbook accessibility control)Only the owner of the workbook can do that.
    This is done in the desktop as well as in Plus.
    In desktop go to the tool bar "File -> Manage Workbooks -> Sharing" then choose the workbook and share it with whom ever you like.
    In Plus you can find it in the tool bar "File -> Manage Workbooks" then click on any of the reports and select the "Share" from the right.
    You have to make sure that the shared user have access to the BA that the workbook is based on, and that the user have the privilege to use the desktop/Plus (this is done in the Administrator tool)
    Tamir

  • Some basic questions about Java ME

    Hi,
    I am new in the world of Java ME, I started to read about the technologies around it and for this reason I have some questions.
    There are 2 platforms CDC and CLDC and on top of these platforms there are some profiles, for example Personal Profile for CDC or MIDP2 for CLDC. On the next level (on top of these profiles) are some JSRs which are treated as optional packages.
    I saw that the CLDC emulator from SUN - WTK contains for example JSR 179 for Location based services and JSR 226 - SVG rendering. But the counterpart for CDC doesn't contain them.
    How can these JSRs be added to the CDC stack? are there some implementations of these JSRs as jars or something like this? or on the JCP site are only the specifications of this JSRs and if someone wants to add these JSRs to an emulator (virtual machine) he should implement these specifications?
    I hope that I have explained properly my "puzzle" and that someone will answer to my questions.
    Thank you

    1.    String[] numString = {"1","2","345678","9","abc"};
        int[] numInt = new int[numString.length];
        for (int x=0; x<numString.length; x++) {
          try {
         numInt[x] = Integer.parseInt(numString[x]);
          } catch (NumberFormatException nfe) {
         System.out.println(nfe.getMessage());
            numInt[x] = Integer.MIN_VALUE;
        }2. Best for what?

  • Some basic Questions about Solaris

    Hi...
    I�ve further got some problems ...
    1. Can anyone tell me where i can get a list with
    Commands for the SOLARIS 8 system ???
    For example: I would like to know how to start
    the Xwindow from the bash ...
    (like you can start it with startx in SuSE)
    Need to know the basic commands.
    C ya

    I recommend http://sun.drydog.com/faq, which deals
    with a good deal of questions concerning Solaris on
    Intel PC. Ther, you will find hints and links which
    enable you to go further. http://docs.sun.com is
    an important site for all of Solaris documentation.
    While I can't tell you how to keep X inactive and
    restart it on demand (maybe lowering initdefault?),
    you may choose a text session from the login
    screen. X is deactivated, then, and you are
    working on a full screen ascii console. Unfortionately,
    as far as I know, there aren't virtual consoles like
    under SCO, Interactive, or Linux. But you may
    obtain and start the GPL screen program, which
    provides virtual multi-terminal function on ascii
    screens (even for modem-based connections).
    HTH
    regards, e.sanio

  • Some basic questions about Arch.

    Hey guys, I am a newbie so bear with me please
    1) I have fairly well supported hardware and don't use any fancy software. I keep hearing that rolling release causes dramas. Realistically, how often should I expect difficulties to happen?
    2) How do you compare the variety of Arch repositories to that of Debian systems? What are the differences between pacman and aptitude today?
    3) How does the speed and efficiency of a basic Arch system compare to Ubuntu on minimal install (I am not talking about the bloated out of the box version, I am talking about build from the ground up minimal CD).
    4) Last but not least.. I never used KDE. How do you guys survive without Gnome Do? Is there some good alternative?
    Thank you.

    corsakh wrote:Hey guys, I am a newbie so bear with me please
    Hi, we're all newbies !
    corsakh wrote:2) How do you compare the variety of Arch repositories to that of Debian systems? What are the differences between pacman and aptitude today?
    Variety is well sufficient because :
    corsakh wrote:I [...] don't use any fancy software.
    corsakh wrote:3) How does the speed and efficiency of a basic Arch system compare to Ubuntu on minimal install (I am not talking about the bloated out of the box version, I am talking about build from the ground up minimal CD).
    I'd say it's better, because Arch is the best !
    corsakh wrote:4) Last but not least.. I never used KDE. How do you guys survive without Gnome Do? Is there some good alternative?
    I hate KDE, Arch isn't tied up to KDE, in fact it isn't tied up to anything expect maybe Pacman. If you like Gnome, well, install gnome !
    Personnally I enjoy Awesome as WM and I don't have a Desktop Environnement.

  • [JS] Basic question about event listeners and event handlers

    I am very new to the whole topic of event listeners and event handlers.  I'd run the test for the following problem myself, but I don't know where to start, and I just want to know if it's impossible -- that is, if I'm misunderstanding what event listeners and event handlers do.
    Say I have an InDesign document with a text frame that is linked to an InCopy story.  Can I use an "afterImport" event listener on the text frame to perform some action any time the link to the InCopy story gets updated?  And will the event handler have access to both the story that is imported, and the pathname of the InCopy file?
    Thanks.

    Thank you, Kasyan.
    Both of those are good solutions.
    We are currently using InDesign CS4 and InCopy CS5.  I'm hoping to get them to purchase the whole CS5 suite soon, since I'd like to start writing scripts for InDesign CS5 as soon as possible, as long as I'm going to have to be doing it in the not too distant future anyway.  The greater variety of event handlers sounds like it might be something that is crucial to the project I'm working on, so that adds to the argument for getting CS5.
    Thanks again.  You have no idea how helpful this is.  I made some promises to my boss yesterday that I later realized were  based on assumptions of mine about the InDesign/InCopy system that didn't make any sense, and I was going  to have to retract my promises.  But after reading your response I think I can still deliver, in a slightly different way that I had been thinking before.
    Richard

  • Basic questions about word spacing and vertical alignment with CSS

    I'm sill very new to Dreamweaver and web page designing. I've
    read the entire manual SC3, one book, and starting another but I
    have almost 0 practice.
    Q1. so far I haven't been able to produce the effect of the
    Word Spacing property. I tried all kinds of tests and I don't know
    in what scenario this effect will show. Can someone give me a
    simple example that shows the effect of this CSS property.
    Q2. Vertical Alignment: this works well with images inserted
    into text but I also expected this to work with text against other
    text. For example I typed TEST© and assigned a different SCC
    style to the © so that I can make it smaller and put it up
    with the Vertical Alignment property. Surprisingly this propery
    didn't produce any effect. How is htis suppose to be done?

    > This is some text. This is some text.
    You forgot to wrap your text in <p> tags so the style
    rule you created
    doesn't apply.
    Walt
    "emil emil" <[email protected]> wrote in
    message
    news:[email protected]...
    >
    quote:
    Originally posted by:
    Newsgroup User
    > i don't know about Q1. but for Q2. just delete what you
    already have for
    > the copyright symbol, and then insert the copyright
    special character.
    > there's a couple ways to do it: on the main menu at the
    top of the
    > window, go to Insert, then HTML, then Special
    Characters, and select
    > Copyright. or you can also find it in the Insert panel,
    which is below
    > the menu, under Text. ...
    >
    >
    > Thanks courtney, but that was exactly the way I created
    the © character
    > and
    > like in this text here it needs to be scaled down and
    moved up
    > independently
    > from the surrounding text. Can someone please post a
    simple code showing
    > the
    > effect of the vertical alignment of text in relation to
    surrounding text.
    >
    >
    >
    quote:
    Originally posted by:
    Newsgroup User
    > Q1
    >
    > <html>
    > <head>
    > <style type="text/css">
    > p
    > {
    > word-spacing: 30px
    > }
    > </style>
    > </head>
    > <body>
    >
    > <p>
    > This is some text. This is some text.
    > </p>
    >
    > </body>
    > </html>
    >
    >
    > Thank you Ken, your code works but not the code
    generated from
    > Dreamweaver
    > when I type in the Design View and assing CSS style to
    the p tag. Does
    > Dreamweaver have trouble generating properly working
    HTML or I'm missing
    > something here? Here is the code that Dreamweaver
    generates and the word
    > spacing doesn't work with it.
    >
    > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN"
    > "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    > <html xmlns="
    http://www.w3.org/1999/xhtml">
    > <head>
    > <meta http-equiv="Content-Type" content="text/html;
    charset=utf-8" />
    > <title>Untitled Document</title>
    > <style type="text/css">
    > <!--
    > p {
    > word-spacing: 50em;
    > }
    > -->
    > </style>
    > </head>
    >
    > <body>
    > This is some text. This is some text.
    > </body>
    > </html>
    >
    >
    >

  • Some basic questions about JAAS

    I am confused about the general use of the JAAS mechanism in Java. Hopefully someone can answer these hopefully not too naive questions:
    1. Does it ever make sense to use java.net.Authenticator instead of JAAS?
    2. JAAS allows the definition of an assumedly text based Configuration file that instructs the LoginContext how to stack various login mechanisms on top of each other. Wouldn't this be easily hacked by the user, where one would only need to edit this known file and remove the authentication requirement(s)?
    3. I am confused about the utility of the Subject.doAs... priviledged security actions. Specifically, does this absolutely prevent a hacker from running the program in a debugger and running certain bytecode? I have read the tutorial section on what Subject.doAs... provides, but does this stop a hacker from obtaining the PrivilegedAction object (or code inside it) and somehow executing that code in a debugger or in a custom jar?
    Thank You,
    Eric

    I'll follow up to my own post with two more questions:
    4. The app I'm targeting here is a JavaWebStart client, that connects to a remote server app. Assuming I use JAAS on the client, do I also use it on the server to re-check the client-login (to prevent a hacker from circumventing the client-side JAAS authentication checks)?
    5. If I use JAAS for authorization in a JavaWebStart app, but I need the JNLP to include the following:
    <security>
    <all-permissions/>
    </security>
    Does this completely circumvent any authorization checks I need to do using JAAS, seeing as I'm already granting all-permissions to the Java security module?

Maybe you are looking for