Hey!
Since youre talking about "root" 5ths and flat sevenths, I'm assuming you were looking into dominant seventh chords? They are composed of the root, minor third, perfect fifth and flat seventh. So for E7 we would be looking at E, G#, B and D. If you're looking at the octave then simply add an E at the end for E, G#, B, D and E. The D in this case is already the flattened 7th as the 7th of the E Major scale is D# (4th string 1st fret on guitar), so yea it isnt Db. Bear in mind the example you gave of E, B, D, E can also be seen as a Em7 missing the flat 3rd, G. Hope this helps! I recently started music theory as well (about 11 months now) so if I'm intepreting your question wrong do let me know and we can learn together!! Cheers!