Forums Register Login

Reading db.db in Data Structure.

+Pie Number of slices to send: Send
Hi,
I want to know,is it valid if I read db.db file in data structure ? I have read all the topics related to db.db file posted in this forum and to my perception it is not necessary...the flat file is what required. Again, having soft copy of data is faster and its easy to implement search algorithm with data structure.
I don't want my points to cut just because I'm thinking complex...can anybody clear my ideas regarding this first step in java assignment.
I'll be thankful.
Pallavi Mahajan.
+Pie Number of slices to send: Send
 


I want to know,is it valid if I read db.db file in data structure ? I have read all the topics related to db.db file posted in this forum and to my perception it is not necessary...the flat file is what required. Again, having soft copy of data is faster and its easy to implement search algorithm with data structure.


If you are talking about replicating and manipulating the database in memory, then no, it's not what this assignment about. Your JTable would reflect the database, but all the operations, such as modify() should be done on the database directly.
Eugene.
+Pie Number of slices to send: Send
Hi Eugene,
I want to implement shortest path algorithm for flight search, for that I want to store my data in matrix. Can I do that?
Pallavi
+Pie Number of slices to send: Send
I want to implement shortest path algorithm for flight search, for that I want to store my data in matrix.
Do you mean the fastest algorithm? Your instructions say something to the effect that if increased performance is accompanied by increased complexity, you would be penalized.
Eugene.
+Pie Number of slices to send: Send
Eugene said:
If you are talking about replicating and manipulating the database in memory, then no, it's not what this assignment about.
Where does it say this, Eugene?
+Pie Number of slices to send: Send
My instructions say:
For any design choice concerning topics not specifically described in the requirements, marks are awarded for a clear and consistent approach, rather than for any particular solution. Design decisions must be described briefly but clearly in your comments.
There is no mention of penalization (except for rolling your own when you can get it off the J2SDK API shelf)
+Pie Number of slices to send: Send
Hi Eugene,
Yes I mean fastest algorithm ..and it does use data structure. So what do you suggest me to do? Not to use that and use only flat file?
Pallavi
+Pie Number of slices to send: Send
Hi Pallavi,
I really don't know what u mean fastest algorithm. Do u mean reading bytes from flat file(database from here onwards)? database is the authoritative one for data. Suppose, if other application also modifying the database concurrently, then loading the data from database into a data structure, does not carry meaning, I suppose(every time we should read the data from database is right way). Please correct me, if I am wrong.
There can be ways to read the data from the database at a faster pase. But here one thing we should really keep in mind. How long are we holding the database reference with in the method, which reads data from database. Surely we can minimise holding time of this database reference(i mean file object/input stream). Instead of reading byte by byte, if we makeout to read one full record in a single go, and release file object, then we are in a position that we are optimising resource usage, increases the performance. Please go through the database schema section in ur assignment instructions carefully, and makeout some mathematical relation to index to the record user wish to read, if u reach to that position by seek, and read that particular lenght of record in single go(like randomAccessFile.readFully(bytearray[int lengthOfRecord])), it will be meaningful.
I don't know about the details of ur assignment really, and I couldn't makeout what u really want. If it is not useful to what u r looking for, let our gurus clarify ur doubt.
Thanks
GVRao
+Pie Number of slices to send: Send
Hi GVRao,
Please go through the database schema section in ur assignment instructions carefully, and makeout some mathematical relation to index to the record user wish to read, if u reach to that position by seek, and read that particular lenght of record in single go(like randomAccessFile.readFully(bytearray[int lengthOfRecord])), it will be meaningful.
I'm really sorry for confusing everybody....I myslef was so much confused.
What you've told is really helpful to me. Actually I was thinking of which data structure will be useful while user search in CriteriaFind. If I'm not wrong Map , hashMap are most suitable.
Please correct me if I'm wrong. Can you clarify which will be better Map or hashMap?
Thank you and sorry for confused statements.
pallavi
+Pie Number of slices to send: Send
Barry Gaunt: There is no mention of penalization (except for rolling your own when you can get it off the J2SDK API shelf)
Unfortunately I deleted my instructions (I passed some time ago), so I can't quote directly, but from what I can remember it said very explicitely that the solutions that add complexity for the sake of performance will be penalized. I took the FBN version of the exam, so I guess the instructions have changed since then.
Eugene.
+Pie Number of slices to send: Send
Hi,
The information regarding complexity is as follows
Clarity and Maintainability.
A clear design, such as will be readily understood by junior programmers, will be preferred to a complex one, even if the complex one is a little more efficient than the simple choice. However, poor algorithm design where standard solutions are well known will be penalized.

so it says poor algorithm design will be penalized.
Thank you
Pallavi
+Pie Number of slices to send: Send
In my NX instructions it says only:

A clear design, such as will be readily understood by junior programmers, will be preferred to a complex one, even if the complex one is a little more efficient. Code complexity, including nesting depth, argument passing, and the number of classes and interfaces, should be reasonable.


Now what happens if we make it a lot more efficient rather than a little more efficient?
[ April 25, 2003: Message edited by: Barry Gaunt ]
+Pie Number of slices to send: Send
 

Originally posted by Barry Gaunt:
Now what happens if we make it a lot more efficient rather than a little more efficient?


Something like rewriting the JVM and packaging it with your assignment?
Eugene.
[ April 25, 2003: Message edited by: Eugene Kononov ]
+Pie Number of slices to send: Send
 

Originally posted by Eugene Kononov:

Something like rewriting the JVM and packaging it with your assignment?


Got no answer to that one, yet, but I'm sure going to think of one...
The moustache of a titan! The ad of a flea:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 853 times.
Similar Threads
Is it just me? SCJD Beta
persistence layer
Java Writer, Java Filer, Tokenizer
Partial Integrity test on Data file
Adding and Deleting Records
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 16:43:01.