Mysql – Relate few records in table to eachother


I need to relate groups of records, like I have 100 records in table, 3 of them should be known they are related, and other 5 are related to own group.
I don't need any group IDs or anything like that, I just need easy way to all records bound to given one.
Additionally, only very small part of records will need this, so I tried avoiding additional fields in table, but failed so far.
My best guess would be storing group id in the main table and somehow keeping track of highest group id used to not break anything (getting max value would work probably?)
It seems messy and somehow like too much overhead to me, I'd appreciate any suggestions

EDIT: my main table contains autoincremented unique id for each record, and rest of table might be considered blob, it is using innodb
for now I need to bind records created as batch, but I'm afraid it might be needed to bind already existing records (and I don't really want to mess too much with code maintaining the database, so I though of first creating all records, gathering their ids and then binding them)

EDIT2: I'm using ORM to manage DB records (Eloquent to be precise), so my question was purely about DB structure and I may even decide to use secondary table to store bulk ids and then create new bulk entity and then create new records with bulk id set for them

Best Answer

Ok, so as I forgot about one more important thing: I use soft deletes, I decided to:
- Create new table containing only autoincrementing unique id and nullable datetime containing date of soft delete
- Add nullable foreign key linking my main table to the new one with ondelete cascade to sort out hard deletes
- When batch adding create new records first create the bundle entity and link them to it on creation
- Make my bundle entity cascade soft deletes to all related records
- When (soft) deleting entity from main table call proper function on bundle entity (if exists) or main entity otherwise

This way everything works as I expected, but the extra table still hurts my eyes and I don't find it the solution, just something that works, but I wanted to avoid