Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Do all records need to have the same length?

 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've had a look through the example given in the spec and found out that the records in a record store are basically in the same length. It looks a lot like record management using traditional file processing...

Can anyone confirm that all records in a record store are in the same length? Thanks...
 
Alibabra Sanjie
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The answer is NO, Content of record can be anything, even empty string "" or null
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Alibabra Sanjie:
The answer is NO, Content of record can be anything, even empty string "" or null


Really, Alibabra? Suppose the format of the record store of Names and Scores is as the following...

David 150
John 120
Mary 180


While the normal format is names and scores, can they be stored as?

David 150
John 120
Mary 180 Highest!


Thanks...
 
Wilder C Rodrigues
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Alibabra is right. When you create a RecordStore and add a record, the record length is not tied to the content added. It is possible:


Rick 180
Mary 150


And after...


John 200 Highest!


I hope it's help you.

Regards,
Wilder
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actuall, think of it this way, each record is just an array of bytes. Each array can be any size/length, and they don't all have to be the same size/length.

Mark
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
YESH!!! I got it!!! Thanks a lot, guys...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic