As Holch says, this may be more work than it is worth, but you could:
1) Create an array-text question with the maximum possible rows
2) Use JavaScript to make columns A, B, C, F "readonly"
3) Make an AJAX call to a remote script that queries your "books" database and populates columns A, B, C, F
4) Let the respondent fill in columns D, E, G
2) Use JavaScript to hide any rows without books
1) Create an array-text question with the maximum possible rows
2) Use JavaScript to make columns A, B, C, F "readonly"
3) Make an AJAX call to a remote script that queries your "books" database and populates columns A, B, C, F
4) Let the respondent fill in columns D, E, G
2) Use JavaScript to hide any rows without books