Commit 6dd42912 authored by Sharon Joseph's avatar Sharon Joseph
Browse files

Add new file

parent e2a30edb
-- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 01, 2021 at 05:28 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @[email protected]@CHARACTER_SET_CLIENT */;
/*!40101 SET @[email protected]@CHARACTER_SET_RESULTS */;
/*!40101 SET @[email protected]@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `library_managment`
--
-- --------------------------------------------------------
--
-- Table structure for table `admin`
--
CREATE TABLE `admin` (
`id` int(11) NOT NULL,
`email` varchar(25) NOT NULL,
`pass` varchar(25) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `admin`
--
INSERT INTO `admin` (`id`, `email`, `pass`) VALUES
(1, '[email protected]', '123');
-- --------------------------------------------------------
--
-- Table structure for table `book`
--
CREATE TABLE `book` (
`id` int(11) NOT NULL,
`bookpic` varchar(25) NOT NULL,
`bookname` varchar(25) NOT NULL,
`bookdetail` varchar(110) NOT NULL,
`bookaudor` varchar(25) NOT NULL,
`bookpub` varchar(25) NOT NULL,
`branch` varchar(110) NOT NULL,
`bookprice` varchar(25) NOT NULL,
`bookquantity` varchar(25) NOT NULL,
`bookava` int(11) NOT NULL,
`bookrent` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `book`
--
INSERT INTO `book` (`id`, `bookpic`, `bookname`, `bookdetail`, `bookaudor`, `bookpub`, `branch`, `bookprice`, `bookquantity`, `bookava`, `bookrent`) VALUES
(4, 'arrow.jpg', 'Scott Gallagher', '1st edition', 'no idea', 'Suscipit', 'it', '756', '20', 16, 4),
(5, 'logo.png', 'Ferris Mclaughlin', 'Qui ex dolor fugiat ', 'Est voluptates offi', 'Dolorem earum accusa', 'electrical', '264', '157', 157, 0),
(6, 'arrow.png', 'harry', 'Ea quas nulla ration', 'Ut dolorem culpa ex', 'Eum proident quidem', 'it', '76', '3', 2, 1);
-- --------------------------------------------------------
--
-- Table structure for table `issuebook`
--
CREATE TABLE `issuebook` (
`id` int(11) NOT NULL,
`userid` int(11) NOT NULL,
`issuename` varchar(25) NOT NULL,
`issuebook` varchar(25) NOT NULL,
`issuetype` varchar(25) NOT NULL,
`issuedays` int(11) NOT NULL,
`issuedate` varchar(25) NOT NULL,
`issuereturn` varchar(25) NOT NULL,
`fine` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `issuebook`
--
INSERT INTO `issuebook` (`id`, `userid`, `issuename`, `issuebook`, `issuetype`, `issuedays`, `issuedate`, `issuereturn`, `fine`) VALUES
(2, 1, 'salman', 'Rich daddy poor dady', 'student', 3, '30/03/2021', '02/04/2021', 1800),
(3, 2, 'Randall Burch', 'Scott Gallagher', 'teacher', 4, '30/03/2021', '03/04/2021', 0),
(6, 1, 'salman', 'Scott Gallagher', 'student', 7, '30/03/2021', '06/04/2021', 1800),
(9, 5, 'salmannew', 'Scott Gallagher', 'teacher', 21, '30/03/2021', '20/04/2021', 0),
(10, 1, 'salman', 'Scott Gallagher', 'student', 7, '01/04/2021', '08/04/2021', 0),
(11, 1, 'salman', 'harry', 'student', 7, '01/04/2021', '08/04/2021', 0);
-- --------------------------------------------------------
--
-- Table structure for table `requestbook`
--
CREATE TABLE `requestbook` (
`id` int(11) NOT NULL,
`userid` int(11) NOT NULL,
`bookid` int(11) NOT NULL,
`username` varchar(25) NOT NULL,
`usertype` varchar(25) NOT NULL,
`bookname` varchar(25) NOT NULL,
`issuedays` varchar(25) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Table structure for table `userdata`
--
CREATE TABLE `userdata` (
`id` int(11) NOT NULL,
`name` varchar(25) NOT NULL,
`email` varchar(25) NOT NULL,
`pass` varchar(25) NOT NULL,
`type` varchar(25) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `userdata`
--
INSERT INTO `userdata` (`id`, `name`, `email`, `pass`, `type`) VALUES
(1, 'salman', '[email protected]', '123', 'student'),
(2, 'Randall Burch', '[email protected]', 'Ratione nulla dolore', 'teacher'),
(3, 'Gabriel Daugherty', '[email protected]', 'Voluptas explicabo ', 'teacher'),
(5, 'salmannew', '[email protected]', '123', 'teacher');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `admin`
--
ALTER TABLE `admin`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `book`
--
ALTER TABLE `book`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `issuebook`
--
ALTER TABLE `issuebook`
ADD PRIMARY KEY (`id`),
ADD KEY `pk_fk` (`userid`);
--
-- Indexes for table `requestbook`
--
ALTER TABLE `requestbook`
ADD PRIMARY KEY (`id`),
ADD KEY `pk_fk_book` (`bookid`),
ADD KEY `pk_fk_users` (`userid`);
--
-- Indexes for table `userdata`
--
ALTER TABLE `userdata`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `admin`
--
ALTER TABLE `admin`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `book`
--
ALTER TABLE `book`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT for table `issuebook`
--
ALTER TABLE `issuebook`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;
--
-- AUTO_INCREMENT for table `requestbook`
--
ALTER TABLE `requestbook`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT for table `userdata`
--
ALTER TABLE `userdata`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `issuebook`
--
ALTER TABLE `issuebook`
ADD CONSTRAINT `pk_fk` FOREIGN KEY (`userid`) REFERENCES `userdata` (`id`);
--
-- Constraints for table `requestbook`
--
ALTER TABLE `requestbook`
ADD CONSTRAINT `pk_fk_users` FOREIGN KEY (`userid`) REFERENCES `userdata` (`id`);
COMMIT;
/*!40101 SET [email protected]_CHARACTER_SET_CLIENT */;
/*!40101 SET [email protected]_CHARACTER_SET_RESULTS */;
/*!40101 SET [email protected]_COLLATION_CONNECTION */;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment