Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2010
    Posts
    3

    Question database question found very intresting to me

    Hello All,

    here is question asked to me , which I found very interesting
    i am pasting as it is.

    question:- I have one mainshop which is in FormalSHIRT business, my Formalshirt is in 4 different shop(like shop1,shop2,shop3,shop4) as a product, every shop has different database(like msacess,sqlserver,oracle,mysql), whenever shop1 or shop2 or shop3 or shop4 sale formalshirt it getting entred in shops own database .

    Now what I want to do that it should be getting updated on my Mysql database server so I can show like on my website like this

    shop1 has only 114 Formalshirt
    shop2 has only 360 Formalshirt
    shop3 has only 320 Formalshirt
    shop4 has only 10 Formalshirt

    -------------

    hope you understand ...above please have look at attached image for more info..
    Attached Thumbnails Attached Thumbnails data.PNG  
    Last edited by sam.demo; 07-30-10 at 12:40.

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    since you have read access to the individual shop databases, you will need to query each database separately and periodically -- set up some recurring jobs (scheduled tasks or cron jobs), pull out the data you want, and import it into your main database
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Jul 2010
    Posts
    3
    Quote Originally Posted by r937 View Post
    since you have read access to the individual shop databases, you will need to query each database separately and periodically -- set up some recurring jobs (scheduled tasks or cron jobs), pull out the data you want, and import it into your main database
    Thanks for replya r937,
    yes this is in my mind , I am little bit concerned about the strain on shops database with select query, if I set in cron job on every 5 to 10 min.
    as well as concerned about my database with insert query with every 5 to 10 min I hope you understand what I want to say ...

  4. #4
    Join Date
    Dec 2007
    Location
    Richmond, VA
    Posts
    1,328
    not sure why that would be a concern? are the queries being run through a dial up connection? or the databases on servers that are just very old? There are a lot of databases out there inserting millions of rows per day. Same with selects against a database. One system I worked on for a large telecommunications vendor saw 480 million SQL requests per day. I kind of doubt your 4 shops will do anything near that kind of volume.
    Dave

  5. #5
    Join Date
    Jul 2010
    Posts
    3
    Quote Originally Posted by dav1mo View Post
    not sure why that would be a concern? are the queries being run through a dial up connection? or the databases on servers that are just very old? There are a lot of databases out there inserting millions of rows per day. Same with selects against a database. One system I worked on for a large telecommunications vendor saw 480 million SQL requests per day. I kind of doubt your 4 shops will do anything near that kind of volume.
    Dave
    ohh thanks dav1mo,
    so here is the bottom line I will write query select get all data and insert it my db with help of cronjobs ... am I right over here or you have more suggestions...

Posting Permissions

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