SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Mar 2009
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Angry ER diagram for a pharmaceutical company

    Hi, i have to make a ER diagram for a pharmaceutical company. I tried to make that, but i can't succeed. so, i need your hel, guys. I have to submit the er diagram tomorrow with empty table. can anybody help me plz. Plz send me a er diagram for a pharma company with Medicine Representative info, medicine info, salary, bonus, promotional cost etc.

    Plz don't mind. i know i shold do this by myself, but i can't do that. believe me, i tried my best.


    thank you.

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    You should ask your instructor for help. We're not here to do your homework, and doing so would be unethical.

  3. #3
    SitePoint Member
    Join Date
    Mar 2009
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks Dan Grossman.
    i've made my er diagram but i can't draw it on PC. can anybody tell me any software name for erd drawing???

  4. #4
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,250
    Mentioned
    59 Post(s)
    Tagged
    3 Thread(s)
    there are many, many software tools for drawing ER diagrams, some of them completely free, some of them free to try (will expire in x days)

    google for them

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  5. #5
    SitePoint Member
    Join Date
    Mar 2009
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Table 1: Store
    store_no(prymary key)
    Table 2: Factory
    factory_no(prymary key)
    Table 3: store_prod
    store_no (Foreign key)
    factory_no(Foreign key)

    how to create the 3rd table?
    can anybody send me the sql code for oracle? plz.

  6. #6
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,250
    Mentioned
    59 Post(s)
    Tagged
    3 Thread(s)
    Code:
    CREATE TABLE Stores
    ( store_no     INTEGER     NOT NULL PRIMARY KEY
    , store_name   VARCHAR(37) NOT NULL
    );
    CREATE TABLE Factories
    ( factory_no   INTEGER     NOT NULL PRIMARY KEY
    , factory_name VARCHAR(37) NOT NULL
    );
    CREATE TABLE StoreFactories
    ( store_no     INTEGER NOT NULL
    , factory_no   INTEGER NOT NULL 
    , FOREIGN KEY ( store_no ) REFERENCES Stores ( store_no )
    , FOREIGN KEY ( factory_no ) REFERENCES Factories ( factory_no )
    , PRIMARY KEY ( store_no, factory_no )
    );
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •