This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Database Dsign Issues in B&S Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Database Dsign Issues in B&S" Watch "Database Dsign Issues in B&S" New topic
Author

Database Dsign Issues in B&S

Muhammad Shafique
Ranch Hand

Joined: Sep 30, 2006
Posts: 59
Hi there,
I am working on B&S database. There are some confusions and which I want to discuss there.
In database interface, find method has description like:

// Returns an array of record numbers that match the specified
// criteria. Field n in the database file is described by
// criteria[n]. A null value in criteria[n] matches any field
// value. A non-null value in criteria[n] matches any field
// value that begins with criteria[n]. (For example, "Fred"
// matches "Fred" or "Freddy".)
public int [] find(String [] criteria) throws RecordNotFoundException;

Could anybody please explain this �criteria� further? What is record number? Is it index of record in file because apparently there is no key field in record and I must not add or remove any field because of compatibility with existing data?

In the same interface, delete method has description like this:
// Deletes a record, making the record number and associated disk
// storage available for reuse.
public void delete(int recNo) throws RecordNotFoundException

But in database file format description, it is written that records are not deleted physically they are only marked as deleted (00 implies valid, 0xFF implies deleted). This is really confusing!! Please help!!

Shafique
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Can I suggest that you spend some time (some people spend a few weeks) browsing back through earlier topics in this SCJD forum. I'm quite sure your questions have already been answered.


Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Database Dsign Issues in B&S
 
Similar Threads
About:My URLyBird1.3.2 Locking
[URLyBirdHotel 1.3.3] Can I add more interfaces on Data.java?
B&S: Quesion about RecNo
Do i have to create new exception for my interface
NX: URLy Bird 1.3.1 Hashmap (or Hashtable)