This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi all, First of all, i've read loads of comments on the javaranch, and i have to say it is a very good and helpfull resource. After reading some questions on database, am I right to assume that on this occasion the flightnumber is the unique key in the database for each record. I do know, that in real life this is not the case, but the find function in Data class, uses the first arrayfield (values.equals(toMatch) as a right match. Also the add method checks on this key to verify if there are duplicate keys. So can anyone confirm the flightnumber is the unique key. ? thanks, friso
swimming certificate (A & B), shoelaces diploma, and some useless java ones.
Yes you use the find methods by passing the flight number, and we hope that it is unique. And in the case of the records currently in db.db file it is unique. And the assignment does not have us add any more flights, so therefore it is unique. But let's say down the road they want that to change, so then it won't be the primary key. I think they added it that way because it makes the assignment easier for us to just get the first field and pass it to find and it finds the record for us. To me record number is the only guaranteed unique number for the db file. Mark
true, but even when adding records, it is enforced that the flightnumber is unique. So if at a later stage they change the uniqueness, then code for adding, and finding has to be changed as well. If I add this in my assumptions/considerations...
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com