How Many Types of Relationship Exist in Database Designing

There are three major relationship models:- One-to-one One-to-many Many-to-many In the context of Core Java or any programming language, the number of relationship types in database design is not specifically related to the language itself. Instead, it is a concept in database management systems (DBMS). In the context of database design, relationships between tables are … Read more

Performance of List Interface Implementations

LinkedList Performance of get and remove methods is linear time [ Big O Notation is O(n) ] – Performance of add and Iterator.remove methods is constant-time [ Big O Notation is O(1) ] ArrayList The size, isEmpty, get, set, iterator, and listIterator operations run in constant time. [ Big O Notation is O(1) ] – … Read more

Performance of Set Interface Implementations

HashSet The HashSet class offers constant-time [ Big O Notation is O(1) ] performance for the basic operations (add, remove, contains and size), assuming the hash function disperses the elements properly among the buckets. Iterating over this set requires time proportional to the sum of the HashSet instance’s size (the number of elements) plus the … Read more

Performance of Map Interface Implementations

Hashtable An instance of Hashtable has two parameters that affect its performance: initial capacity and load factor. The capacity is the number of buckets in the hash table, and the initial capacity is simply the capacity at the time the hash table is created. Note that the hash table is open: in the case of … Read more

What is Performance of Various Java Collection Implementations/Algorithms? What is Big ‘O’ notation for each of them?

Each java collection implementation class have different performance for different methods, which makes them suitable for different programming needs. The performance of various Java collection implementations and algorithms can vary based on the specific use case and the operations being performed. The Big O notation is a way to express the time complexity of algorithms … Read more