-- SQLite schema for library system
CREATE TABLE authors (
    id INTEGER PRIMARY KEY,
    name TEXT NOT NULL
);

CREATE TABLE books (
    id INTEGER PRIMARY KEY,
    title TEXT NOT NULL,
    author_id INTEGER,
    FOREIGN KEY(author_id) REFERENCES authors(id)
);

-- Sample records
INSERT INTO authors (id, name) VALUES (1, 'Jane Austen'), (2, 'Mark Twain'), (3, 'Charles Dickens'), (4, 'Virginia Woolf'), (5, 'George Orwell');

INSERT INTO books (id, title, author_id) VALUES (1, 'Pride and Prejudice', 1), (2, 'Adventures of Huckleberry Finn', 2), (3, 'Great Expectations', 3), (4, 'Mrs Dalloway', 4), (5, '1984', 5);