Explain an object-oriented method for a conversion between the E/R diagram

Somebody can explain me with an example an object-oriented method for a conversion between the E/R diagram and a relational database schema.
Thanks,

Hello here are some tips regarding how to convert ERD into Relational objects.
(1) One to many relationships:
One to many relationships can be explained by following example.
Take example of department and Employee. One employee can work in one department only but one department can have more then one employees. In one to many relationship Primary key of One side (here department table) goes to Many side as foreign key (here Employee table).
(2) Many to Many relationships:
Many to many relationships can be explained by following example.
One student can take many subjects and one subject can be taken by more then one student.
In this case one new table emerges which includes Primary keys of both the tables and establish composite primary key. e.g. here if PK of student is student_id and Pk of course is course_id then new table will emerge named (say) student_course with composite primary key of student_id and course_id (student_id and course_id are also foreign keys)
(3) One to One:
Example: A person can have only one tax file number and one tax file number can be allocated to only one person. In this case PK of any table can go to another table as foreign key.
(4) Super class-sub class relationship:
Example: person can be a man or woman. Such kinds of relationships are called super class- sub class relationship. There are many ways to convert such relationship into tables
we can make one table for super class (eg Table Person) and we can put PK of super class in subclass as primary key (eg if person_id is pk of table person then it will go in both sub classes (man, woman) as Pk and it will also be foreign key of the super class (person)
Note: This is just a way to solve super class relationships there are many other ways which you can choose.
Thanks
Ish

Similar Messages

  • What are object oriented methods?

    i dont seem to understand the term object oriented methods. i know that it is a technology which encompasses a body of methods,processes, and tools used to construct software systems from obejcts. i know that i provides a unifying paradigm for the three traditional phases of software development: analysis,design and implementation. so how do i get more information on this. i mean this is very limited information i have on my hands. how do i explain in detail about the major features of object oriented methods and their major benefits. is there a place where i can find out about it? please help me out?

    Object-Oriented Programming Concepts
    Object-oriented language basics
    Don't Fear the OOP

  • Open source my OIOIC, a completely new object-oriented mechanism for t

    OIOIC is a completely new object-oriented mechanism for the C programming language.
    Using OIOIC, you can describe the flower, birds, grass, insects, trees, houses ...
    Using OIOIC, you can describe the elements, atoms, protons, electrons ...
    Using OIOIC, you can describe the earth, the sun, the Milky Way galaxy, collapsar ...
    Using OIOIC, you can describe ...
    1. OIOIC perfectly supplies the gap of object-oriented technology for the C programming language;
    2. OIOIC perfectly solved the multiple inheritance problem in the Software World;
    3. OIOIC perfectly objectivizes multithreading access control of object;
    4. OIOIC unifies the norm of components in the Software World;
    5. OIOIC unifies the structure of code tree in the Software World;
    6. OIOIC unifies the thinking of object-oriented programming in the Software World;
    7. OIOIC unifies all advanced programming languages in the Software World, to make the C programming language as the preferred.
    For further information, please download the "OIOIC-Primer-2nd-Edition-English.tar.gz". (the English version of << OIOIC Primer >> )
    http://code.google.com/p/oioic/downloads/list
    Welcome your advice!

    SamC wrote:It is very, very hard to tell if this is spam. Are you an arch user? Do you think that arch users will be interested in this?
    Firstly, thank you. But it is not spam! The thinking of object-oriented programming is very important for any programmer. Do not you think so.

  • Best Method For Importing Clips Between FCP Projects

    What is the best method for importing clips between FCP 7.0.3 projects?  I am wondering whether or not pulling the clips from the Capture Scratch folder is the way to go or will using Import from the new FCP project create a new folder in Capture Scratch with the imported clips?  I have a new HD camcorder with different clips for different projects and Log and Transfer makes it so easy to bring them all in at once but now wondering how best to separate them into separate Capture Scratch folders for each project. 

    well, I simply either drag them in to the new/different project from the finder, or drag or copy and paste between open fcp projects.  Never had any problems working this way.  Just remember that if you delete a specific project scratch disk folder, you may be deleting media used in another project.

  • If I have an airport extreme and a time capsule is it possible for seamless switching between the 2 when a signal is weak or drops Main reason is as I move from my first floor to my attic office and would like to place one (airport extreme)downstairs and

    If I have an airport extreme and a time capsule is it possible for seamless switching between the 2 when a signal is weak or drops
    Main reason is as I move from my first floor to my attic office and would like to place one (airport extreme)downstairs and time capsule upstairs to get complete coverage

    In theory, yes. If you configure the two base station into either an extended or roaming network configuration, you should be able to walk a laptop between routers and the laptop should attempt to connect/reconnect to the base station providing the stronger signal ... but, in reality, this is not always 100% true.

  • When using the analog inputs and analog outputs of the PCI-7344, what is the conversion between the voltage entering the card to counts? Similarly, what is the conversion between counts to voltage at the output of the card?

    I am using the PCI-7344 to control my system. The analog inputs are connected to the output of my system while the analog outputs serve as feedback to the system. The system is a servo. I want to know what is the conversion between the voltage read at the input, to card counts, and finally to the voltage output to the system.

    Carole,
    If you are trying to do analog feedback with a servo motor, Chapter 14 of the manual talks about how to set up the torque feedback. Also linked below is a LabVIEW example of analog feedback.
    Chapter 14
    NI-Motion User Manual
    Automatic Analog Feedback with FlexMotion example
    A. Talley
    National Instruments

  • Display ALV List in Object Oriented Method

    Dear Guru ,
    I have encountered an issue which i am trying to resolve
    I am using following custom code to display lists of the entries of  <F_FS>  in ALV GRID FORMAT
    For display data in ALV GRID FORMAT i am using class cl_gui_alv_grid.
    But the requirment is like this i have to show it in ALV LIST Display Format .
    when i searched for class cl_gui_alv_list i found that Object Type CL_GUI_ALV_LIST does not exist
    Please show me some guide line how to achieve this .....
    DATA : gt_cust TYPE REF TO cl_gui_custom_container. "Custom Container
      DATA : cust TYPE scrfname VALUE 'CC_OUTPUT'. "Custom controller
      DATA : gt_grid TYPE REF TO cl_gui_alv_grid. "ALV List Viewer
      FIELD-SYMBOLS : <f_fs> TYPE table. "FieldSymbol for holding fields
      DATA  : t_cat     TYPE STANDARD TABLE OF lvc_s_fcat INITIAL SIZE 0."To hold Field Catalog
      IF gt_cust IS INITIAL.
        CREATE OBJECT gt_cust
          EXPORTING
            container_name = cust.
        CREATE OBJECT gt_grid
          EXPORTING
            i_parent = gt_cust.
    **--Display the data in the grid control
        CALL METHOD gt_grid->set_table_for_first_display
        EXPORTING
            i_buffer_active       = 'X'
            i_bypassing_buffer    = ' '
        CHANGING
            it_outtab = <f_fs>
            it_fieldcatalog = t_cat
        EXCEPTIONS
            invalid_parameter_combination = 1
            program_error = 2
            too_many_lines = 3
        OTHERS = 4    .
        IF sy-subrc <> 0.
        ENDIF.
      ENDIF.

    RECL_SALV_TABLE,     
    CL_SALV_COLUMNS_TABLE,
    CL_SALV_COLUMN_TABLE,

  • Best method for passing data between nested components

    I have a fairly good sized Flex application (if it was
    stuffed all into one file--which it used to be--it would be about
    3-4k lines of code). I have since started breaking it up into
    components and abstracting logic to make it easier to write,
    manage, and develop.
    The biggest thing that I'm running into is figuring out a way
    to pass data between components. Now, I know how to write and use
    custom events, so that you dispatch events up the chain of
    components, but it seems like that only works one way (bottom-up).
    I also know how to make public variables/functions inside the
    component and then the caller can just assign that variable or call
    that function.
    Let's say that I have the following chain of components:
    Component A
    --Component B
    -- -- Component C
    -- -- -- Component D
    What is the best way to pass data between A and D (in both
    directions)?
    If I use an event to pass from D to A, it seems as though I
    have to write event code in each of the components and do the
    bubbling up manually. What I'm really stuck on though, is how to
    get data from A to D.
    I have a remote object in Component A that goes out and gets
    some data from the server, and most all of the other components all
    rely on whatever was returned -- so what is the best way to be able
    to "share" data between all components? I don't want to have to
    pass a variable through B and C just so that D can get it, but I
    also don't want to make D go and request the information itself. B
    and C might not need the data, so it seems stupid to have to make
    it be aware of it.
    Any ideas? I hope that my explanation is clear enough...
    Thanks.
    -Jake

    Peter (or anyone else)...
    To take this example to the next (albeit parallel) level, how
    would you go about creating a class that will let you just
    capture/dispatch local data changes? Following along my original
    example (Components A-D),let's say that we have this component
    architecture:
    Component A
    --Component B
    -- -- Component C
    -- -- -- Component D
    -- -- Component E
    -- -- Comonnent F
    How would we go about creating a dispatch scheme for getting
    data between Component C and E/F? Maybe in Component C the user
    picks a username from a combo box. That selection will drive some
    changes in Component E (like triggering a new screen to appear
    based on the user). There are no remote methods at play with this
    example, just a simple update of a username that's all contained
    within the Flex app.
    I tried mimicking the technique that we used for the
    RemoteObject methods, but things are a bit different this time
    around because we're not making a trip to the server. I just want
    to be able to register Component E to listen for an event that
    would indicate that some data has changed.
    Now, once again, I know that I can bubble that information up
    to A and then back down to E, but that's sloppy... There has to be
    a similar approach to broadcasting events across the entire
    application, right?
    Here's what I started to come up with so far:
    [Event(name="selectUsername", type="CustomEvent")]
    public class LocalData extends EventDispatcher
    private static var _self:LocalData;
    // Constructor
    public function LocalData() {
    // ?? does anything go here ??
    // Returns the singleton instance of this class.
    public static function getInstance():LocalData {
    if( _self == null ) {
    _self = new LocalData();
    return _self;
    // public method that can be called to dispatch the event.
    public static function selectUsername(userObj:Object):void {
    dispatchEvent(new CustomEvent(userObj, "selectUsername"));
    Then, in the component that wants to dispatch the event, we
    do this:
    LocalData.selectUsername([some object]);
    And in the component that wants to listen for the event:
    LocalData.getInstance().addEventListener("selectUsername",
    selectUsername_Result);
    public function selectUsername_Result(e:CustomEvent):void {
    // handle results here
    The problem with this is that when I go to compile it, it
    doesn't like my use of "dispatchEvent" inside that public static
    method. Tells me, "Call to possibly undefined method
    "dispatchEvent". Huh? Why would it be undefined?
    Does it make sense with where I'm going?
    Any help is greatly appreciated.
    Thanks!
    -Jacob

  • HTTP post from ABAP using Object Oriented method

    Hi ,
    I want to call HTTP from ABAP. I came to know that using classes & objects is the best way to fulfill it.
    Interface:
    xml_document type ref to cl_xml_document
    method post_xml_document.
    data: client type ref to if_http_client,
    xml_response type ref to cl_xml_document.
    data: xml_string type string,
    xml_xstring type xstring.
    data: zsubrc type sy-subrc.
    cl_http_client=>create_by_url( exporting url = 'http://www.example.com/post-url.xml' importing client = client exceptions others = 1 ).
    client->request->set_header_field( exporting name = '~request_method' value = 'POST' ).
    client->request->set_header_field( exporting name = '~server_protocol' value = 'HTTP/1.1' ).
    client->request->set_header_field( exporting name = 'Content-Type' value = 'text/xml' ).
    xml_document->render_2_string( exporting pretty_print = 'X' importing stream = xml_string ).
    client->request->set_cdata( exporting data = xml_string offset = 0 ).
    client->authenticate( exporting proxy_authentication = space username = 'username' password = 'password' ).
    client->send( exceptions http_communication_failure = 1 http_invalid_state = 2 ).
    client->receive( exceptions http_communication_failure = 1 http_invalid_state = 2 http_processing_failed = 3 ).
    xml_xstring = client->response->get_data( ).
    zsubrc = xml_response->parse_xstring( stream = xml_xstring ).
    endmethod.
    Above code can be used to do my work.
    Apart from the code in ABAP, what are the configurational setting that we need to do ?
    Thanks,
    Shivaa..

    >
    mohammad afzal wrote:
    > apart from usin the code u should have configured the RFC destination
    Thats nonsense, create_by_url does not need an rfc connection. TA SICF is correct.

  • Proper object oriented design for factory class

    I have a factory class (UserFactory) it is capable of creating two types of classes (Customer and Employee) that extend User. User is an abstract class.
    At present any class could create a Customer of an Employee.
    How do I restrict access to the constructors of Customer and Employee only to UserFactory?
    I don't want to make both of these classes interfaces (in which case I could just have UserFactory implement both of them).
    Here is an example of how they are set up at present:
    public abstract class User {
    public class Customer extends User{
    public Customer{
    public class Employee extends User {
    public Employee {
    public class UserFactory ???? {
    private static UserFactory c_userFactory = null;
    private UserFactory (){
    public UserFactory getInstance(){
    //private clone method too
    public Customer createCustomer(){
    public Employee createEmployee(){
    Oh and I don't want to create two separate factory classes for Employee and Customer. In C++ there is a concept of friend classes that would have worked nicely in this case.
    Thanks for any and all suggestions,
    Tim

    So correct me if I'm wrong but your suggestion would be something along the lines of:
    public abstract class User {
    public class Customer extends User{
    protected Customer(){
    public class Employee extends User {
    protected Employee (){
    public class UserFactory ???? {
    private static UserFactory c_userFactory = null;
    private UserFactory (){
    public UserFactory getInstance(){
    //private clone method too
    public Customer createCustomer(){
    public Employee createEmployee(){
    public class AccessForCustomer extends Customer {
    public class AccessForEmployee extends Employee {
    Is the above about what you were talking about? I haven't used inner classes before, so I'm a bit curious. Does this mean no class other than UserFactory or derivatives thereof can access the two classes AccessForCustomer and AccessForEmployee?
    Thanks,
    Tim

  • Question about Object-Orientated design for GUI'S

    Hi everyone,
    I am designing a simple GUI, which basically enables a user to input and retreive data.
    So I have a prototype GUI lets call it "myFrame". It extends JFrame, and I place my components onto myFrame, JButtons, JTextfields etc. I have the GUI set up the way I want it, so I move onto implementing the actionListeners.
    The problem is that one of the components I have placed on myFrame has its own mouseListener. Its a type of Icon (i created in a seperate class)which extends JComponent, and I thought it would be sensible to give it control of its own mouseListener, so it cuts down on the code within the myFrame class.
    But I now realise that I can't alter the other components on myFrame from within the mouseListener in the icon class. I know the icon class doesn't have access to any of myFrames methods or instance fields, so how do I correctly implement this. Surely the answer isn't to bung all the code together into one class?
    visually what I have so far looks like this
    SERVER <---Requests---> myFrame --------> IconList ---------> Icon
    the IconList class looks up a server to update its array of Icons[]. But when one individual Icon is clicked on myFrame, i want its mouseListener to load some of its values onto myFrame's GUI components.
    I hope I'm making myself clear, im sorry if this seems like a muddled incoherent question, but any advice would be great. I only need to be shown the correct way to design, and then i carry on coding happily. If this kind of design is way off, please let me know!!
    Thanks

    You can absolutely do work on the frame from the mouse listener--It just needs an instance. i.e.
    public class MyMouseListener implements MouseListener {
      private MyFrame frame;
      public MyMouseListener(MyFrame frame) {
        this.frame = frame;
    }Does that make sense?
    That said, what you'll see more often is a Model-View-Control approach, wherein the Control (the mouse listener in your case) effects the Model and the Model notifies the View to update its display, rather than the Control updating the view directly. That's the extreme overview version, lots of good hits on google if you're interested beyond that

  • Best Method for Destroying Data on the Drive Before it Goes Back to Apple

    As the subject suggests....any ideas....i'd like to 'shred' the whole drive and clean install without any personal info on it.

    Run Disk Utility from the installation DVD and erase the drive with the option to write zeros. Once is fine although if you're paranoid you can choose a multiple pass option.
    Also, I would subsequently install Mac OS X on to so you can start it up if required.

  • If I bought an iMac for the family and a MacBook Pro for my daughter between the period for the free Mountain Lion update, would we have to submit the request form twice?

    I do not understand what it means by "right to copy."

    I love the portability my powerbook gives me. You can use a PB in your setup. You can run an external monitor for either PB or MBP. You can node. Universal Binary menas it is an application which has the components written for both PPC and Intel chips-so you don't need to do conversion. Nodes won't require you buy a nother license. so the answer is down to how much the 2 upgrades and 1 crossgrades will set you back vs how much use you'll get out of them. IMO the iMac is inexpensive (I mean that in a good way-worth hooding on to). Maybe just look at a refurb PB unless you really have the extra cash.

  • How do you go to marker  when there is a wait for mouse click between the markers?

    I cant seem to get by the wait for mouse click, when using                          go to (marker)
    I have a game that I have 2 push buttons one is
    on mouseUp me
      go to frame 9
    end
    on mouseUp me
       go to frame  29
    end
    There is a wait to click in between these 2  frames and when I click on the  2nd button to go to frame 29  it stops at the wait to click?
    I have tried  all these below and cant get past the click to wait?????
    go
    go to frame
    go to marker
    _movie.go
    _movie.marker
    _nextMarker=

    Think this issue is resolved but to ensure the full answer is available, here it is.
    First, it's a bad idea to use the Tempo channel at all. You can use a script to do anything that you can do there. I have Lingo alternates to the Tempo channel at:
    http://www.deansdirectortutorials.com/Lingo/tempoLingo.htm
    (think I need to update this page though)
    So - DO NOT USE the Tempo Channel setting - Wait for Mouse Click or Key Press.
    The above setting creates a type of pause that interferes with other interactivity.
    Instead - use a 'Hold on Frame' behavior (from the Library Palette - Navigation category) or it could be written as:
    on exitFrame
    go the frame
    end
    Once you have the above behaviour in you desired frame, you can attach a sprite behaviour to your buttons / links. A good one to use is the ‘Jump to Marker Button’ behaviour in the Controls category of the Library Palette. You can attach this behavior to different sprites and just change the marker setting of the behavior, removing the need to have individual hard-coded scripts for each button.
    Next – DO NOT link to frame numbers. Always link to a marker. You may insert or remove frames. This would cause your incorrect links since the frame number would no longer the right point.
    Next – the following all do the same thing:
    go to frame “markername”
    go to “markername”
    go “markername”
    So, you can leave out ‘frame’ or even ‘to’ as they are not needed. I still use ‘go to’ as it feels more natural to me (just history).
    or you could use:
    _movie.go("dean")
    Don’t use
    go to marker “markername”
    I think that did work at some point but not anymore.
    marker can be used as follows:
    go marker (-1)
    Where -1 is the amount of markers back (could be forward as well).
    Well, that gives the detailed answer to your question.
    Dean

  • What is the strict criteria for a Pure Object Oriented Language ?

    Can a fully object oriented language qualify as a pure Object Oriented Language.fF not what are the exact criteria for qualifying a language as Pure Object Oriented Language.Any examples of both would be greatly appreciated.
    Thanks in Advance.

    I guess you can check the link
    http://forums.sun.com/thread.jspa?forumID=31&threadID=725662 for this.
    I have no idea what point you're trying to make by posting a link to that thread.
    Again,if someone thinks that something does not exist,what's the point debating on it.There is no point in debating this.
    I don't care,Me neither.
    tell me the definition,Like I already said many times: there exists no widely accepted definition of what a "pure OO language" is!
    So, I ask you yet again: what is YOUR definition of such a thing? ANd don't go posting links to articles or other threads: just explain in your own wording of what YOU think a "pure OO language" is, and I'll answer your question by telling you if Java fits that definition.
    search on google,why do you need that are not answers to my questions I see it has no use arguing with you: you don't seem to understand me.
    ,but more irrelevant questions on my simple question.I see a chain of irrelevant question, starting with your original post.

Maybe you are looking for

  • PLEASE HELP!!!  Problem with Java and SQLServer Text data type

    Hi there, I have a java app. that reads from an MS SQLServer database. Originally, all long text fields were declared as NVARCHAR(200). The program worked fine. Someone then advised that I change all long text fields to the TEXT data type. The progra

  • CEPHtlmEngine quit unexpectedly in Mac OS 10.9

    Process:         CEPHtmlEngine [4317] Path:            /Applications/Adobe Illustrator CC 2014/Adobe Illustrator.app/Contents/MacOS/CEP/CEPHtmlEngine/CEPHtmlEngine.app/Contents/MacOS/CEPHtml Engine Identifier:      com.adobe.cep.CEPHtmlEngine Version

  • Issues with viewing Interactive PDF.

    I am a professor and use Indesign to design my digital slideshows-both images and videos. After exporting as Interactive PDF I view the files through Acrobat. I have two problems. After viewing one of the videos in acrobat I am not able to move on to

  • V04 Error and complete ineptitude on BT's behalf

    OK here is my BT vision experience: I moved into a brand new house with my girlfriend on 25 September and ordered BT vision, broadband and phone the week after. I was given an installation and activation date of 24th October. On the 24th I plugged al

  • Network Design Help Needed Large Office

    Hello all, I work in a single story office (about 10k sqr/ft) and we have pretty weak coverage of our wirless signal across the building. It is mainly offices (all drywall) and some what open. I'm trying to come up with a solution (money not that big