I have a question about Surrogate keys, say i have two tables(in sql server):
Table A: Student_ID, Name, School, Section
Table B: Book_ID,Student_ID, IssueDate, BookName
If Student_ID is a clustered surrogate key and Name is unclustered index. How would one manually enter data into Table B without knowing the Student_ID. I know i might have to do a lookup in table A to find the IDs but that would not be efficient. Is there any way to make this efficient? I am trying to think how surrogate keys essentially work in terms of efficiency as a foreign key when considering inserts.