Skip to content

This repository contains SQL queries to create views for analyzing various aspects of a library database. Each view provides specific insights into the library's data, such as the number of books lent, overdue books, genres, publishers, and authors.

Notifications You must be signed in to change notification settings

sanaxamjad/LendingLibrary

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Library Database Views

This repository contains SQL queries to create views for analyzing various aspects of a library database. Each view provides specific insights into the library's data, such as the number of books lent, overdue books, genres, publishers, and authors.

Database Schema

Before running the queries, ensure your database contains the following tables:

  • users

    • user_id
    • fname
    • lname
  • lending

    • user_id
    • days_overdue
  • books

    • book_id
    • genre_id
    • publisher_id
    • author_id
  • genre

    • genre_id
    • genre_name
  • publishers

    • publisher_id
    • publisher_name
  • authors

    • author_id
    • fname
    • lname

Instructions

  1. Switch to the library database:

    USE library;

About

This repository contains SQL queries to create views for analyzing various aspects of a library database. Each view provides specific insights into the library's data, such as the number of books lent, overdue books, genres, publishers, and authors.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published