Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
-- version 4.4.11
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jan 12, 2016 at 10:47 PM
-- Server version: 5.5.46-0ubuntu0.14.04.2
-- PHP Version: 5.5.9-1ubuntu4.14
--
-- Database: `library`
--
CREATE DATABASE IF NOT EXISTS `library` DEFAULT CHARACTER SET latin1 COLLATE
latin1_swedish_ci;
USE `library`;
-- --------------------------------------------------------
--
-- Table structure for table `books`
--
-- --------------------------------------------------------
--
-- Table structure for table `book_categories`
--
-- --------------------------------------------------------
--
-- Table structure for table `book_issue`
--
CREATE TABLE IF NOT EXISTS `book_issue` (
`issue_id` int(11) NOT NULL,
`book_id` int(11) NOT NULL,
`available_status` tinyint(1) NOT NULL DEFAULT '1',
`added_by` int(11) NOT NULL,
`added_at_timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE
CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `book_issue_log`
--
-- --------------------------------------------------------
--
-- Table structure for table `branches`
--
-- --------------------------------------------------------
--
-- Table structure for table `students`
--
-- --------------------------------------------------------
--
-- Table structure for table `student_categories`
--
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
--
-- Indexes for dumped tables
--
--
-- Indexes for table `books`
--
ALTER TABLE `books`
ADD PRIMARY KEY (`book_id`);
--
-- Indexes for table `book_categories`
--
ALTER TABLE `book_categories`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `book_issue`
--
ALTER TABLE `book_issue`
ADD PRIMARY KEY (`issue_id`);
--
-- Indexes for table `book_issue_log`
--
ALTER TABLE `book_issue_log`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `branches`
--
ALTER TABLE `branches`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `students`
--
ALTER TABLE `students`
ADD PRIMARY KEY (`student_id`);
--
-- Indexes for table `student_categories`
--
ALTER TABLE `student_categories`
ADD PRIMARY KEY (`cat_id`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `books`
--
ALTER TABLE `books`
MODIFY `book_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `book_categories`
--
ALTER TABLE `book_categories`
MODIFY `id` int(5) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `book_issue`
--
ALTER TABLE `book_issue`
MODIFY `issue_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `book_issue_log`
--
ALTER TABLE `book_issue_log`
MODIFY `id` int(16) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `branches`
--
ALTER TABLE `branches`
MODIFY `id` int(5) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `students`
--
ALTER TABLE `students`
MODIFY `student_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `student_categories`
--
ALTER TABLE `student_categories`
MODIFY `cat_id` int(2) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;