• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Confused by the URLyBird

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey, Ranchers,

Method create is required in the data module interface. But I do not see anywhere I can call this method. Besides, if a client makes a reservation. Do we need to update the owner field or mark this item "deleted" as well as updating the owner field.

Thanks,
Dahai
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi:

Method create is required in the data module interface



I program the create method, but use it, I think, is out of scope.

Do we need to update the owner field or mark this item "deleted" as well as updating the owner field.



I will to mark this field.


I hope this help you.

SCJP 1.4
 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Daniel - I think the forum's been around the block a few times about this debate. Search on 'create', 'delete', etc. to see what the suggestions are.

I'm not aware that many implement either function in the GUI. Some implement in the Data class to fulfill the "supplied" interface. Others implement both as no-op methods and document/justify in choices.txt. It's your call.

The instructions say this about booking a record"

"The id value (an 8 digit number) of the customer who has booked this. Note that for this application, you should assume that customers and CSRs know their customer ids. The system you are writing does not interact with these numbers, rather it simply records them. If this field is all blanks, the record is available for sale."

I wouldn't feel comfortable deleting this record. This might be a trivial example, but what if the hotels linked to this DB, or at least a replica of the DB? Searching for deleted records wouldn't be a very effective means of checking in a customer.

Moreover, there's no information in the schema that provides a context for the delete. For example, when was the record deleted? And by whom? Are you displaying deleted records to the CSRs? What about reserved rooms? That could also drive your choice of how to handle it.

I hope this proves useful.
reply
    Bookmark Topic Watch Topic
  • New Topic