Question 32
Consider the following data models representing SQLite database tables and answer the given sub-questions.
class Student(db.Model): __tablename__ = "student" id=db.Column(db.Integer, primary_key=True) name=db.Column(db.String,not_null=False) tests=db.relationship('TestMarks',backref="student")
class TestMarks(db.Model): __tablename__ = "test_marks" id=db.Column(db.Integer, primary_key=True) test_name=db.Column(db.String,not_null=False) marks=db.Column(db.Integer,not_null=True) student_id=db.Column(db.Integer,db.ForeignKey('student.id'))Which of the following is the correct way of adding records into the ‘student’ and the ‘test_marks’ tables?