NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

CREATE TABLE Books (
bid INT AUTO_INCREMENT,
title VARCHAR(100),
publication_year INT,
reading INT, -- 0: reading, 1: read, -1: will read
CONSTRAINT BOOKS_PK PRIMARY KEY (bid)
);

CREATE TABLE Authors (
aid INT AUTO_INCREMENT,
fname VARCHAR(20),
lname VARCHAR(20),
CONSTRAINT AUTHORS_PK PRIMARY KEY (aid)
);

CREATE TABLE Genres (
gid INT AUTO_INCREMENT,
name VARCHAR(30),
CONSTRAINT GENRES_PK PRIMARY KEY (gid)
);

CREATE TABLE Writes (
aid INT,
bid INT,
CONSTRAINT WRITES_PK PRIMARY KEY (aid,bid),
FOREIGN KEY (aid) REFERENCES Authors (aid)
ON DELETE CASCADE,
FOREIGN KEY (bid) REFERENCES Books (bid)
ON DELETE CASCADE
);

CREATE TABLE Is_of_genre (
bid INT,
gid INT,
CONSTRAINT IS_OF_GENRE_PK PRIMARY KEY (bid,gid),
FOREIGN KEY (bid) REFERENCES Books (bid)
ON DELETE CASCADE,
FOREIGN KEY (gid) REFERENCES Genres (gid)
ON DELETE CASCADE
);

INSERT INTO Authors (aid, fname, lname)
VALUES (1,'George','Orwell');

INSERT INTO Books (bid, title, publication_year, reading)
VALUES (1,'1984',1949,1);

INSERT INTO Genres (gid, name)
VALUES (1, 'Dystopian');
INSERT INTO Genres (gid, name)
VALUES (2, 'Political Fiction');
INSERT INTO Genres (gid, name)
VALUES (3, 'Sci-fi');

INSERT INTO Writes (aid, bid)
VALUES (1,1);

INSERT INTO IS_OF_GENRE (bid, gid)
VALUES (1,1);
INSERT INTO IS_OF_GENRE (bid, gid)
VALUES (1,2);
INSERT INTO IS_OF_GENRE (bid, gid)
VALUES (1,3);
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.