SlideShare a Scribd company logo
10
Most read
HASH BASED
INVENTORY
SYSTEM
• Description: The main aim of this project is to implement a hashing algorithm to create a list of
• inventory parts and their quantities sold. There are three modules in this project
• Construction of hash table: HASH tables are widely used to quickly search and retrieve
• information from enormous amounts of data. In this for spare part code its code is taken and
• Search for an inventory item: In this the user has enter spare part code, it generates
• hash codrespectivee to access respective spare part record and prints that record indicates its quantity
• Reports: In this module it has to generate a complete report of spare parts and their quantity
• sold.
• generates hash code and spare part record to search retrieve.
• Requirements: To implement this project student should have knowledge on
• Indexing
• Hash tables
• Hashing functions
• Hash Table is a data structure which stores data in an associative manner. In a hash table, data
stored in an array format, where each data value has its own unique index value. Access of
becomes very fast if we know the index of the desired data.
• Thus, it becomes a data structure in which insertion and search operations are very fast
irrespective of the size of the data. Hash Table uses an array as a storage medium and uses
technique to generate an index where an element is to be inserted or is to be located from.
• HASHING:
• Hashing is a technique to convert a range of key values into a range of indexes of an array.
We're going to use modulo operator to get a range of key values.
• Basic Operations
• Following are the basic primary operations of a hash table.
• Search − Searches an element in a hash table.
• Insert − inserts an element in a hash table.
• delete − Deletes an element from a hash table.
• Search Operation
• Whenever an element is to be searched, compute the hash code of the key passed and locate
the element using that hash code as index in the array. Use linear probing to get the element
ahead if the element is not found at the computed hash code.
• Insersion operation
• Whenever an element is to be inserted, compute the hash code of the key passed and locate the
index using that hash code as an index in the array. Use linear probing for empty location, if an
element is found at the computed hash code.
• Delete Operation
• Whenever an element is to be deleted, compute the hash code of the key passed and locate the
index using that hash code as an index in the array. Use linear probing to get the element ahead
if an element is not found at the computed hash code. When found, store a dummy item there
to keep the performance of the hash table intact.
• Hashing is implemented in two steps:
• An element is converted into an integer by using a hash function. This element can be used as
an index to store the original element, which falls into the hash table.
• The element is stored in the hash table where it can be quickly retrieved using hashed key.
• hash = hashfunc(key)
• index = hash % array_size
• In this method, the hash is independent of the array size and it is then reduced to an index (a
number between 0 and array_size − 1) by using the modulo operator (%).
• Hash function
• A hash function is any function that can be used to map a data set of an arbitrary size to a data set
a fixed size, which falls into the hash table. The values returned by a hash function are called hash
values, hash codes, hash sums, or simply hashes.
• To achieve a good hashing mechanism, It is important to have a good hash function with the
following basic requirements:
• Easy to compute: It should be easy to compute and must not become an algorithm in itself.
• Uniform distribution: It should provide a uniform distribution across the hash table and should not
result in clustering.
• Less collisions: Collisions occur when pairs of elements are mapped to the same hash value. These
should be avoided.
• Note: Irrespective of how good a hash function is, collisions are bound to occur. Therefore, to
maintain the performance of a hash table, it is important to manage collisions through various
collision resolution techniques.
• Here, it will take O(n) time (where n is the number of strings) to access a specific string. This
shows that the hash function is not a good hash function.
• Let’s try a different hash function. The index for a specific string will be equal to sum of ASCII
values of characters multiplied by their respective order in the string after which it is modulo
with 2069 (prime number).
• String Hash function Index
• abcdef (971 + 982 + 993 + 1004 + 1015 + 1026)%2069 38
• bcdefa (981 + 992 + 1003 + 1014 + 1025 + 976)%2069 23
• cdefab (991 + 1002 + 1013 + 1024 + 975 + 986)%2069 14
• defabc (1001 + 1012 + 1023 + 974 + 985 + 996)%2069 11
• Hash table
• A hash table is a data structure that is used to store keys/value pairs. It uses a hash function to
compute an index into an array in which an element will be inserted or searched. By using a
good hash function, hashing can work well. Under reasonable assumptions, the average time
required to search for an element in a hash table is O(1).
Hash based inventory system

More Related Content

PDF
Seminar report on cloud computing
PPTX
Introduction-to-the-IAM-Platform-Implementation-Plan.pptx
PPTX
Smart shopping trolley using rfid and remote controlling
PPTX
Hidden surface removal algorithm
PPTX
Cyber Security –PPT
PDF
Mobile cloud computing
PPTX
Distributed Mutual Exclusion and Distributed Deadlock Detection
PPTX
Curve clipping
Seminar report on cloud computing
Introduction-to-the-IAM-Platform-Implementation-Plan.pptx
Smart shopping trolley using rfid and remote controlling
Hidden surface removal algorithm
Cyber Security –PPT
Mobile cloud computing
Distributed Mutual Exclusion and Distributed Deadlock Detection
Curve clipping

What's hot (20)

PPTX
Windowing and clipping final1
PPTX
Smart Shopping System
PPTX
RFID BASED ATTENDANCE SYSTEM PPT
DOCX
Comparing public and private cloud
DOCX
Inventory Management System
PPT
Firewalls
PPTX
PORTFOLIO BY USING HTML & CSS
PPTX
UAV Network in IoT communication
PPTX
Line clipping algorithm (Detailed)
PPTX
Eucalyptus, Nimbus & OpenNebula
PPTX
Distributed computing
PPTX
Arduino vs Raspberry Pi
PPT
Lecture _Line Scan Conversion.ppt
PPTX
Inetsecurity.in Ethical Hacking presentation
DOC
Online shopping cart system file
PPTX
34088.Chapter-2.pptx
DOCX
Cloud computing notes unit I as per RGPV syllabus
PPTX
Data security in cloud computing
PPT
Cloud deployment models
Windowing and clipping final1
Smart Shopping System
RFID BASED ATTENDANCE SYSTEM PPT
Comparing public and private cloud
Inventory Management System
Firewalls
PORTFOLIO BY USING HTML & CSS
UAV Network in IoT communication
Line clipping algorithm (Detailed)
Eucalyptus, Nimbus & OpenNebula
Distributed computing
Arduino vs Raspberry Pi
Lecture _Line Scan Conversion.ppt
Inetsecurity.in Ethical Hacking presentation
Online shopping cart system file
34088.Chapter-2.pptx
Cloud computing notes unit I as per RGPV syllabus
Data security in cloud computing
Cloud deployment models
Ad

Similar to Hash based inventory system (20)

PPTX
Ts project Hash based inventory system
PPTX
Data Structures-Topic-Hashing, Collision
PPTX
Hashing techniques, Hashing function,Collision detection techniques
PPTX
hashing in data structure for Btech.pptx
PPTX
Hashing And Hashing Tables
PPTX
hashing in data structure for engineering.pptx
PPTX
hashing in data structure for Btech .pptx
PPTX
Hashing
PPTX
hashing in data structures and its applications
PPTX
Lec12-Hash-Tables-27122022-125641pm.pptx
PPTX
hashing in data strutures advanced in languae java
PDF
Hashing notes data structures (HASHING AND HASH FUNCTIONS)
PPTX
Hashing Technique In Data Structures
PPTX
Hashing.pptx
PPTX
unit-1-dsa-hashing-2022_compressed-1-converted.pptx
PDF
hashtableeeeeeeeeeeeeeeeeeeeeeeeeeee.pdf
PPTX
unit-1-data structure and algorithms-hashing-2024-1 (1).pptx
PDF
Algorithms notes tutorials duniya
PDF
Hashing and File Structures in Data Structure.pdf
Ts project Hash based inventory system
Data Structures-Topic-Hashing, Collision
Hashing techniques, Hashing function,Collision detection techniques
hashing in data structure for Btech.pptx
Hashing And Hashing Tables
hashing in data structure for engineering.pptx
hashing in data structure for Btech .pptx
Hashing
hashing in data structures and its applications
Lec12-Hash-Tables-27122022-125641pm.pptx
hashing in data strutures advanced in languae java
Hashing notes data structures (HASHING AND HASH FUNCTIONS)
Hashing Technique In Data Structures
Hashing.pptx
unit-1-dsa-hashing-2022_compressed-1-converted.pptx
hashtableeeeeeeeeeeeeeeeeeeeeeeeeeee.pdf
unit-1-data structure and algorithms-hashing-2024-1 (1).pptx
Algorithms notes tutorials duniya
Hashing and File Structures in Data Structure.pdf
Ad

Recently uploaded (20)

PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PDF
composite construction of structures.pdf
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PDF
Digital Logic Computer Design lecture notes
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PDF
PPT on Performance Review to get promotions
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
DOCX
573137875-Attendance-Management-System-original
PPTX
CH1 Production IntroductoryConcepts.pptx
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PPTX
Geodesy 1.pptx...............................................
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PPTX
bas. eng. economics group 4 presentation 1.pptx
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
UNIT-1 - COAL BASED THERMAL POWER PLANTS
composite construction of structures.pdf
R24 SURVEYING LAB MANUAL for civil enggi
Digital Logic Computer Design lecture notes
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PPT on Performance Review to get promotions
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
573137875-Attendance-Management-System-original
CH1 Production IntroductoryConcepts.pptx
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
Geodesy 1.pptx...............................................
Model Code of Practice - Construction Work - 21102022 .pdf
bas. eng. economics group 4 presentation 1.pptx

Hash based inventory system

  • 2. • Description: The main aim of this project is to implement a hashing algorithm to create a list of • inventory parts and their quantities sold. There are three modules in this project • Construction of hash table: HASH tables are widely used to quickly search and retrieve • information from enormous amounts of data. In this for spare part code its code is taken and • Search for an inventory item: In this the user has enter spare part code, it generates • hash codrespectivee to access respective spare part record and prints that record indicates its quantity • Reports: In this module it has to generate a complete report of spare parts and their quantity • sold. • generates hash code and spare part record to search retrieve.
  • 3. • Requirements: To implement this project student should have knowledge on • Indexing • Hash tables • Hashing functions • Hash Table is a data structure which stores data in an associative manner. In a hash table, data stored in an array format, where each data value has its own unique index value. Access of becomes very fast if we know the index of the desired data. • Thus, it becomes a data structure in which insertion and search operations are very fast irrespective of the size of the data. Hash Table uses an array as a storage medium and uses technique to generate an index where an element is to be inserted or is to be located from.
  • 4. • HASHING: • Hashing is a technique to convert a range of key values into a range of indexes of an array. We're going to use modulo operator to get a range of key values. • Basic Operations • Following are the basic primary operations of a hash table. • Search − Searches an element in a hash table. • Insert − inserts an element in a hash table. • delete − Deletes an element from a hash table.
  • 5. • Search Operation • Whenever an element is to be searched, compute the hash code of the key passed and locate the element using that hash code as index in the array. Use linear probing to get the element ahead if the element is not found at the computed hash code. • Insersion operation • Whenever an element is to be inserted, compute the hash code of the key passed and locate the index using that hash code as an index in the array. Use linear probing for empty location, if an element is found at the computed hash code. • Delete Operation • Whenever an element is to be deleted, compute the hash code of the key passed and locate the index using that hash code as an index in the array. Use linear probing to get the element ahead if an element is not found at the computed hash code. When found, store a dummy item there to keep the performance of the hash table intact.
  • 6. • Hashing is implemented in two steps: • An element is converted into an integer by using a hash function. This element can be used as an index to store the original element, which falls into the hash table. • The element is stored in the hash table where it can be quickly retrieved using hashed key. • hash = hashfunc(key) • index = hash % array_size • In this method, the hash is independent of the array size and it is then reduced to an index (a number between 0 and array_size − 1) by using the modulo operator (%).
  • 7. • Hash function • A hash function is any function that can be used to map a data set of an arbitrary size to a data set a fixed size, which falls into the hash table. The values returned by a hash function are called hash values, hash codes, hash sums, or simply hashes. • To achieve a good hashing mechanism, It is important to have a good hash function with the following basic requirements: • Easy to compute: It should be easy to compute and must not become an algorithm in itself. • Uniform distribution: It should provide a uniform distribution across the hash table and should not result in clustering. • Less collisions: Collisions occur when pairs of elements are mapped to the same hash value. These should be avoided. • Note: Irrespective of how good a hash function is, collisions are bound to occur. Therefore, to maintain the performance of a hash table, it is important to manage collisions through various collision resolution techniques.
  • 8. • Here, it will take O(n) time (where n is the number of strings) to access a specific string. This shows that the hash function is not a good hash function. • Let’s try a different hash function. The index for a specific string will be equal to sum of ASCII values of characters multiplied by their respective order in the string after which it is modulo with 2069 (prime number).
  • 9. • String Hash function Index • abcdef (971 + 982 + 993 + 1004 + 1015 + 1026)%2069 38 • bcdefa (981 + 992 + 1003 + 1014 + 1025 + 976)%2069 23 • cdefab (991 + 1002 + 1013 + 1024 + 975 + 986)%2069 14 • defabc (1001 + 1012 + 1023 + 974 + 985 + 996)%2069 11 • Hash table • A hash table is a data structure that is used to store keys/value pairs. It uses a hash function to compute an index into an array in which an element will be inserted or searched. By using a good hash function, hashing can work well. Under reasonable assumptions, the average time required to search for an element in a hash table is O(1).