Example output
DICTIONARY DATA:
Book:
book_id (integer): unique identifier for each book
title (string): title of the book
author (string): name of the author of the book
isbn (string): International Standard Book Number of the book
publication_date (date): date of publication of the book
library_id (integer): unique identifier for the library that owns the book
Borrower:
borrower_id (integer): unique identifier for each borrower
name (string): name of the borrower
email (string): email address of the borrower
Loan:
loan_id (integer): unique identifier for each loan
book_id (integer): foreign key referencing the book borrowed
borrower_id (integer): foreign key referencing the borrower who borrowed the book
start_date (date): date on which the loan started
end_date (date): date on which the loan ended
MLD:
Book (book_id [PK], title, author, isbn, publication_date, library_id [FK])
Borrower (borrower_id [PK], name, email)
Loan (loan_id [PK], book_id [FK], borrower_id [FK], start_date, end_date)
SQL CODE:
CREATE TABLE Book (
book_id INT PRIMARY KEY,
title VARCHAR(255),
author VARCHAR(255),
isbn VARCHAR(255),
publication_date DATE,
library_id INT,
FOREIGN KEY (library_id) REFERENCES Library(library_id)
);
CREATE TABLE Borrower (
borrower_id INT PRIMARY KEY,
name VARCHAR(255),
email VARCHAR(255)
);
CREATE TABLE Loan (
loan_id INT PRIMARY KEY,
book_id INT,
borrower_id INT,
start_date DATE,
end_date DATE,
FOREIGN KEY (book_id) REFERENCES Book(book_id),