SlideShare a Scribd company logo
1 of 21
Record Management System: Record
Storage,Writing and Reading Record
Presented by,
PARVATHY S DILEEP
Contents
➢Record Storage
➢Record Management System (RMS)
➢Record Store
Record Store Scope
➢Setting Up a Record Store
Creating, Opening, Closing, and Removing a Record Store
Writing and Reading Records
Writing and Reading String based records
Writing and Reading Mixed Data Types
➢References
Records
• An individual data item.
• It does not have any data type.
• It is represented by an array of bytes
• A record can contain a string, number, array, image,etc
Record Storage
● Most Operating environments contain a file system to
store information in non-volatile resources.
Eg: CD-ROM and disk drive
●But not all small computing devices have a file system and
therefore we are unable to store information in the manner
that we are familiar with.
●To solve this problem we have the Record Management
System, that is used to store and maintain persistence in a
small computing devices.
Record Management System (RMS)
●RMS is a combination of file system and database
management system
● It enables storage of data in columns and rows
● RMS performs the functionality of DBMS
●It uses the RMS application programming interface
and the enumeration application programming
interface to interact with data.
●These interfaces are used to sort, search, and
manipulate information stored in persistence.
Record Store
● A record store is a collection of records organized as
rows (records) and columns (fields)
● Here, the columns contain like data and rows contain
related data.
● A unique integer known as the Record Id is assigned
to each record.
● A Record Id is the primary key of the record store.
● A record store remains in nonvolatile memory even
after the small computing device is powered down.
While naming the records, consider the following,
1. The name of a record store must be a minimum
of one character and not more than 32 characters
2. Characters are Unicode and case sensitive.
Record Store Scope
●Record stores can be shared among MIDlets that are within the same MIDlet
suite.
●Let MIDlet A contain information about customers from a sales
representative and MIDlet B display customer information collected by MIDlet
A. Here, MIDlet B is unable to access customer information as MIDlet A and
MIDlet B are in different MIDlet suites.
●However, MIDlet B would have been able to access customer information if
both MIDlet A and MIDlet B were in the same MIDlet suite.
Setting Up a Record Store
➢Creating, Opening, Closing, and Removing a Record Store
openRecordStore() method
• This method is called to create a new record store and to open an
existing record store.
• • This method requires two parameters:
a) a string containing the name of the record store.
b) a boolean value indicating whether the record store should
be created if the record store doesn’t exist.
True value => It causes the record store to be created if the record store isn’t
in the MIDlet suite and also opens the record store.
False value=> It does not create the record store if the record store isn’t
located
listRecordStores() method
• This method returns a null value if no record stores
exist on the device
closeRecordStore() method
• This method is used to close a record store.
• It does not have any parameters.
●Being the nonvolatile memory ,the record store has to be
managed efficiently.
●This is done by removing all record stores that are no
longer being used by MIDlets.
deleteRecordStore() method
• This method is used to delete a record store.
• It consist of one parameter, which is a string
containing the name of the record store that is to be
removed from the device .
➢Writing and Reading Records
● When a MIDlet opens a record store, it can write records to the
record store and read information already stored there.
●This can be done using two techniques.
1.The first technique is used to write and read a string of data
and is used primarily whenever you have one data column in the
record store such as a list of abbreviations of states.
2.The other technique is used to write and read multiple
columns of data of different types such as string, integer, and
boolean.
addRecord() method
• This method is used to write a record to the record store.
• It requires three parameters
a) The first is a byte array containing the byte value of
the string being written to the record store.
b) The second is an integer representing the index of
the first byte of the byte array that is to be written to the
record store. It will be usually zero.
c) The third is the total number of bytes that is to be
written to the record store.it will be the length of the byte
array.
Writing a string to a record store
●First we have to create an instance of a string and
assign text to the instance.
●Then the string must be converted to a byte array by
calling the getBytes() method.
getBytes() method
• It is used to convert a string to a byte array.
• This method returns a byte array
Reading from a record
●Information is read from a record store one record at a time
and stored in a byte array.
●The byte array is then converted to a string, which is then
displayed on the screen or processed further based on the
needs of the application.
●For MIDlet to know the number of records in a record store,
we use getNumRecords() method.
getNumRecords() method
• It is a method of the Record Store class
• This method returns an integer that represents the total number of
records in the record store
getRecord() method
• This method returns bytes from the RecordStore, which are stored in a
byte array that we create.
• It requires three parameters.
a) The first parameter is the record ID
b) The second parameter is the byte array that you create for storing the
record.
c) The third parameter is an integer representing the position in the record
from which to begin copying into the byte array .
1.Writing and Reading String based records
2.Writing and Reading Mixed Data Types
References
●J2ME :The Complete Reference by James Keogh
●https://www.slideshare.net/muthusvm/session9-j2me-
record-management-system
●Google Wikepedia
THANK YOU

More Related Content

What's hot

Internet of Things: Challenges and Issues
Internet of Things: Challenges and IssuesInternet of Things: Challenges and Issues
Internet of Things: Challenges and Issuesrjain51
 
Siebel CTMS Best Practices
Siebel CTMS Best PracticesSiebel CTMS Best Practices
Siebel CTMS Best PracticesPerficient
 
Applications of ad hoc and wireless sensor networks
Applications of ad hoc and wireless sensor networksApplications of ad hoc and wireless sensor networks
Applications of ad hoc and wireless sensor networksparuvathavardhinipra
 
Mobile Application Development With Android
Mobile Application Development With AndroidMobile Application Development With Android
Mobile Application Development With Androidguest213e237
 
Topological Sorting (Decrease and Conquer)
Topological Sorting (Decrease and Conquer)Topological Sorting (Decrease and Conquer)
Topological Sorting (Decrease and Conquer)Gem WeBlog
 
Session9 J2ME Record Management System
Session9 J2ME Record Management SystemSession9 J2ME Record Management System
Session9 J2ME Record Management Systemmuthusvm
 
Conceptual dependency
Conceptual dependencyConceptual dependency
Conceptual dependencyJismy .K.Jose
 
Advanced Web Programming (Question Paper) [October – 2018 | Choice Based Syll...
Advanced Web Programming (Question Paper) [October – 2018 | Choice Based Syll...Advanced Web Programming (Question Paper) [October – 2018 | Choice Based Syll...
Advanced Web Programming (Question Paper) [October – 2018 | Choice Based Syll...Mumbai B.Sc.IT Study
 
Smart antenna systems
Smart antenna systems Smart antenna systems
Smart antenna systems Apoorva Shetty
 
IOT15_Unit6.pptx
IOT15_Unit6.pptxIOT15_Unit6.pptx
IOT15_Unit6.pptxsuptel
 
wireless sensor network my seminar ppt
wireless sensor network my seminar pptwireless sensor network my seminar ppt
wireless sensor network my seminar pptEisha Madhwal
 
Wireless sensor network
Wireless sensor networkWireless sensor network
Wireless sensor networkNeha Kulkarni
 
Prim's Algorithm on minimum spanning tree
Prim's Algorithm on minimum spanning treePrim's Algorithm on minimum spanning tree
Prim's Algorithm on minimum spanning treeoneous
 

What's hot (20)

J2ME
J2MEJ2ME
J2ME
 
Internet of Things: Challenges and Issues
Internet of Things: Challenges and IssuesInternet of Things: Challenges and Issues
Internet of Things: Challenges and Issues
 
Siebel CTMS Best Practices
Siebel CTMS Best PracticesSiebel CTMS Best Practices
Siebel CTMS Best Practices
 
MFC Message Handling
MFC Message HandlingMFC Message Handling
MFC Message Handling
 
Applications of ad hoc and wireless sensor networks
Applications of ad hoc and wireless sensor networksApplications of ad hoc and wireless sensor networks
Applications of ad hoc and wireless sensor networks
 
Mobile Application Development With Android
Mobile Application Development With AndroidMobile Application Development With Android
Mobile Application Development With Android
 
Topological Sorting (Decrease and Conquer)
Topological Sorting (Decrease and Conquer)Topological Sorting (Decrease and Conquer)
Topological Sorting (Decrease and Conquer)
 
Session9 J2ME Record Management System
Session9 J2ME Record Management SystemSession9 J2ME Record Management System
Session9 J2ME Record Management System
 
Zigbee Presentation
Zigbee PresentationZigbee Presentation
Zigbee Presentation
 
Design & Analysis Of Algorithm
Design & Analysis Of AlgorithmDesign & Analysis Of Algorithm
Design & Analysis Of Algorithm
 
Conceptual dependency
Conceptual dependencyConceptual dependency
Conceptual dependency
 
Advanced Web Programming (Question Paper) [October – 2018 | Choice Based Syll...
Advanced Web Programming (Question Paper) [October – 2018 | Choice Based Syll...Advanced Web Programming (Question Paper) [October – 2018 | Choice Based Syll...
Advanced Web Programming (Question Paper) [October – 2018 | Choice Based Syll...
 
Smart antenna systems
Smart antenna systems Smart antenna systems
Smart antenna systems
 
IOT15_Unit6.pptx
IOT15_Unit6.pptxIOT15_Unit6.pptx
IOT15_Unit6.pptx
 
wireless sensor network my seminar ppt
wireless sensor network my seminar pptwireless sensor network my seminar ppt
wireless sensor network my seminar ppt
 
Wireless sensor network
Wireless sensor networkWireless sensor network
Wireless sensor network
 
M2M technology in IOT
M2M technology in IOTM2M technology in IOT
M2M technology in IOT
 
Power control in 3 g
Power control in 3 gPower control in 3 g
Power control in 3 g
 
Mobile platforms
Mobile platformsMobile platforms
Mobile platforms
 
Prim's Algorithm on minimum spanning tree
Prim's Algorithm on minimum spanning treePrim's Algorithm on minimum spanning tree
Prim's Algorithm on minimum spanning tree
 

Similar to Record management system_parvathy

Recordmanagment
RecordmanagmentRecordmanagment
Recordmanagmentmyrajendra
 
Microprocessor Unit -1 SE computer-II.pptx
Microprocessor  Unit -1 SE computer-II.pptxMicroprocessor  Unit -1 SE computer-II.pptx
Microprocessor Unit -1 SE computer-II.pptxakshathsingh2003
 
Intel x86 and ARM Data types
Intel x86 and ARM Data typesIntel x86 and ARM Data types
Intel x86 and ARM Data typesRowena Cornejo
 
introduction of microprocessor
introduction of microprocessorintroduction of microprocessor
introduction of microprocessorReetika Singh
 
WiredTiger In-Memory vs WiredTiger B-Tree
WiredTiger In-Memory vs WiredTiger B-TreeWiredTiger In-Memory vs WiredTiger B-Tree
WiredTiger In-Memory vs WiredTiger B-TreeSveta Smirnova
 
Advanced High-Performance Computing Features of the OpenPOWER ISA
 Advanced High-Performance Computing Features of the OpenPOWER ISA Advanced High-Performance Computing Features of the OpenPOWER ISA
Advanced High-Performance Computing Features of the OpenPOWER ISAGanesan Narayanasamy
 
MongoDB at MapMyFitness from a DevOps Perspective
MongoDB at MapMyFitness from a DevOps PerspectiveMongoDB at MapMyFitness from a DevOps Perspective
MongoDB at MapMyFitness from a DevOps PerspectiveMongoDB
 
Performance Tuning by Dijesh P
Performance Tuning by Dijesh PPerformance Tuning by Dijesh P
Performance Tuning by Dijesh PPlusOrMinusZero
 
Beyond the Basics 1: Storage Engines
Beyond the Basics 1: Storage Engines	Beyond the Basics 1: Storage Engines
Beyond the Basics 1: Storage Engines MongoDB
 
MariaDB ColumnStore
MariaDB ColumnStoreMariaDB ColumnStore
MariaDB ColumnStoreMariaDB plc
 
Happy To Use SIMD
Happy To Use SIMDHappy To Use SIMD
Happy To Use SIMDWei-Ta Wang
 
7. Key-Value Databases: In Depth
7. Key-Value Databases: In Depth7. Key-Value Databases: In Depth
7. Key-Value Databases: In DepthFabio Fumarola
 
NYJavaSIG - Big Data Microservices w/ Speedment
NYJavaSIG - Big Data Microservices w/ SpeedmentNYJavaSIG - Big Data Microservices w/ Speedment
NYJavaSIG - Big Data Microservices w/ SpeedmentSpeedment, Inc.
 
8085 microprocessor ramesh gaonkar
8085 microprocessor   ramesh gaonkar8085 microprocessor   ramesh gaonkar
8085 microprocessor ramesh gaonkarjemimajerome
 

Similar to Record management system_parvathy (20)

Recordmanagment
RecordmanagmentRecordmanagment
Recordmanagment
 
Microprocessor Unit -1 SE computer-II.pptx
Microprocessor  Unit -1 SE computer-II.pptxMicroprocessor  Unit -1 SE computer-II.pptx
Microprocessor Unit -1 SE computer-II.pptx
 
Protected mode memory addressing 8086
Protected mode memory addressing 8086Protected mode memory addressing 8086
Protected mode memory addressing 8086
 
Record store
Record storeRecord store
Record store
 
Intel x86 and ARM Data types
Intel x86 and ARM Data typesIntel x86 and ARM Data types
Intel x86 and ARM Data types
 
introduction of microprocessor
introduction of microprocessorintroduction of microprocessor
introduction of microprocessor
 
Percona FT / TokuDB
Percona FT / TokuDBPercona FT / TokuDB
Percona FT / TokuDB
 
U I - 4. 80386 Real mode.pptx
U I - 4. 80386 Real mode.pptxU I - 4. 80386 Real mode.pptx
U I - 4. 80386 Real mode.pptx
 
WiredTiger In-Memory vs WiredTiger B-Tree
WiredTiger In-Memory vs WiredTiger B-TreeWiredTiger In-Memory vs WiredTiger B-Tree
WiredTiger In-Memory vs WiredTiger B-Tree
 
Advanced High-Performance Computing Features of the OpenPOWER ISA
 Advanced High-Performance Computing Features of the OpenPOWER ISA Advanced High-Performance Computing Features of the OpenPOWER ISA
Advanced High-Performance Computing Features of the OpenPOWER ISA
 
MongoDB at MapMyFitness from a DevOps Perspective
MongoDB at MapMyFitness from a DevOps PerspectiveMongoDB at MapMyFitness from a DevOps Perspective
MongoDB at MapMyFitness from a DevOps Perspective
 
Performance Tuning by Dijesh P
Performance Tuning by Dijesh PPerformance Tuning by Dijesh P
Performance Tuning by Dijesh P
 
Beyond the Basics 1: Storage Engines
Beyond the Basics 1: Storage Engines	Beyond the Basics 1: Storage Engines
Beyond the Basics 1: Storage Engines
 
MariaDB ColumnStore
MariaDB ColumnStoreMariaDB ColumnStore
MariaDB ColumnStore
 
ram.pdf
ram.pdfram.pdf
ram.pdf
 
Happy To Use SIMD
Happy To Use SIMDHappy To Use SIMD
Happy To Use SIMD
 
7. Key-Value Databases: In Depth
7. Key-Value Databases: In Depth7. Key-Value Databases: In Depth
7. Key-Value Databases: In Depth
 
NYJavaSIG - Big Data Microservices w/ Speedment
NYJavaSIG - Big Data Microservices w/ SpeedmentNYJavaSIG - Big Data Microservices w/ Speedment
NYJavaSIG - Big Data Microservices w/ Speedment
 
8085 microprocessor ramesh gaonkar
8085 microprocessor   ramesh gaonkar8085 microprocessor   ramesh gaonkar
8085 microprocessor ramesh gaonkar
 
SOSCON 2016 JerryScript
SOSCON 2016 JerryScriptSOSCON 2016 JerryScript
SOSCON 2016 JerryScript
 

Recently uploaded

Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 

Recently uploaded (20)

Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 

Record management system_parvathy

  • 1. Record Management System: Record Storage,Writing and Reading Record Presented by, PARVATHY S DILEEP
  • 2. Contents ➢Record Storage ➢Record Management System (RMS) ➢Record Store Record Store Scope ➢Setting Up a Record Store Creating, Opening, Closing, and Removing a Record Store Writing and Reading Records Writing and Reading String based records Writing and Reading Mixed Data Types ➢References
  • 3. Records • An individual data item. • It does not have any data type. • It is represented by an array of bytes • A record can contain a string, number, array, image,etc
  • 4. Record Storage ● Most Operating environments contain a file system to store information in non-volatile resources. Eg: CD-ROM and disk drive ●But not all small computing devices have a file system and therefore we are unable to store information in the manner that we are familiar with. ●To solve this problem we have the Record Management System, that is used to store and maintain persistence in a small computing devices.
  • 5. Record Management System (RMS) ●RMS is a combination of file system and database management system ● It enables storage of data in columns and rows ● RMS performs the functionality of DBMS ●It uses the RMS application programming interface and the enumeration application programming interface to interact with data. ●These interfaces are used to sort, search, and manipulate information stored in persistence.
  • 6. Record Store ● A record store is a collection of records organized as rows (records) and columns (fields) ● Here, the columns contain like data and rows contain related data. ● A unique integer known as the Record Id is assigned to each record. ● A Record Id is the primary key of the record store. ● A record store remains in nonvolatile memory even after the small computing device is powered down.
  • 7. While naming the records, consider the following, 1. The name of a record store must be a minimum of one character and not more than 32 characters 2. Characters are Unicode and case sensitive.
  • 8. Record Store Scope ●Record stores can be shared among MIDlets that are within the same MIDlet suite. ●Let MIDlet A contain information about customers from a sales representative and MIDlet B display customer information collected by MIDlet A. Here, MIDlet B is unable to access customer information as MIDlet A and MIDlet B are in different MIDlet suites. ●However, MIDlet B would have been able to access customer information if both MIDlet A and MIDlet B were in the same MIDlet suite.
  • 9. Setting Up a Record Store ➢Creating, Opening, Closing, and Removing a Record Store openRecordStore() method • This method is called to create a new record store and to open an existing record store. • • This method requires two parameters: a) a string containing the name of the record store. b) a boolean value indicating whether the record store should be created if the record store doesn’t exist. True value => It causes the record store to be created if the record store isn’t in the MIDlet suite and also opens the record store. False value=> It does not create the record store if the record store isn’t located
  • 10. listRecordStores() method • This method returns a null value if no record stores exist on the device closeRecordStore() method • This method is used to close a record store. • It does not have any parameters.
  • 11. ●Being the nonvolatile memory ,the record store has to be managed efficiently. ●This is done by removing all record stores that are no longer being used by MIDlets. deleteRecordStore() method • This method is used to delete a record store. • It consist of one parameter, which is a string containing the name of the record store that is to be removed from the device .
  • 12.
  • 13. ➢Writing and Reading Records ● When a MIDlet opens a record store, it can write records to the record store and read information already stored there. ●This can be done using two techniques. 1.The first technique is used to write and read a string of data and is used primarily whenever you have one data column in the record store such as a list of abbreviations of states. 2.The other technique is used to write and read multiple columns of data of different types such as string, integer, and boolean.
  • 14. addRecord() method • This method is used to write a record to the record store. • It requires three parameters a) The first is a byte array containing the byte value of the string being written to the record store. b) The second is an integer representing the index of the first byte of the byte array that is to be written to the record store. It will be usually zero. c) The third is the total number of bytes that is to be written to the record store.it will be the length of the byte array.
  • 15. Writing a string to a record store ●First we have to create an instance of a string and assign text to the instance. ●Then the string must be converted to a byte array by calling the getBytes() method. getBytes() method • It is used to convert a string to a byte array. • This method returns a byte array
  • 16. Reading from a record ●Information is read from a record store one record at a time and stored in a byte array. ●The byte array is then converted to a string, which is then displayed on the screen or processed further based on the needs of the application. ●For MIDlet to know the number of records in a record store, we use getNumRecords() method.
  • 17. getNumRecords() method • It is a method of the Record Store class • This method returns an integer that represents the total number of records in the record store getRecord() method • This method returns bytes from the RecordStore, which are stored in a byte array that we create. • It requires three parameters. a) The first parameter is the record ID b) The second parameter is the byte array that you create for storing the record. c) The third parameter is an integer representing the position in the record from which to begin copying into the byte array .
  • 18. 1.Writing and Reading String based records
  • 19. 2.Writing and Reading Mixed Data Types
  • 20. References ●J2ME :The Complete Reference by James Keogh ●https://www.slideshare.net/muthusvm/session9-j2me- record-management-system ●Google Wikepedia