-5

I have a table in database and I want mysql signal to my java code as soon as something adds to database. How can I make mysql understood to do that?

I do not really know where to start?

HMdeveloper
  • 2,772
  • 9
  • 45
  • 74

1 Answers1

1

no, this isn't what you want.

apps shouldn't be sharing a database this way.

a better design would be to put a data service in front of it to manage data access.

duffymo
  • 305,152
  • 44
  • 369
  • 561
  • Do you think he understand what you are saying? – Scary Wombat Jan 31 '14 at 00:47
  • no, i don't think he understands what he wants, either. – duffymo Jan 31 '14 at 00:48
  • Lets explain my scenario: I have a map and I crawl some locations and store them on database I want to show the location on the map as soon as they added to database so how can I understand the new rows is added? – HMdeveloper Jan 31 '14 at 00:49
  • the thing storing to the database should be signalling to the client that it should update. thinking that the database should be responsible suggests that you don't understand this problem. – duffymo Jan 31 '14 at 00:54
  • So can you tell who is responsible for that ? because I dont have access to crawler all I can have access is database and my part which is user interface so I think there should be some way to get signal from database when new row is added! – HMdeveloper Jan 31 '14 at 00:58
  • i think the thing that owns and initiates the crawler should be writing to the database. you have ui; there's a database. classic layering says there is a controller in the middle. that's what i'm talking about. – duffymo Jan 31 '14 at 01:35
  • I know you are right but the problem is that the crawler is run on a server and this is a very big project I dont have access to crawler the only part that I have access is database and UI so if any method is in the database that when new row is added it can signal that is great but apparently there is no such a thing – HMdeveloper Jan 31 '14 at 02:27
  • I do not know how you got my level of smartness but thanks for answering – HMdeveloper Jan 31 '14 at 03:01