Advertisement
Guest User

SQL

a guest
Dec 7th, 2021
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.86 KB | None | 0 0
  1. -- phpMyAdmin SQL Dump
  2. -- version 5.0.2
  3. -- https://www.phpmyadmin.net/
  4. --
  5. -- Host: 127.0.0.1
  6. -- Generation Time: Dec 07, 2021 at 09:27 AM
  7. -- Server version: 10.4.13-MariaDB
  8. -- PHP Version: 7.4.8
  9.  
  10. SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
  11. START TRANSACTION;
  12. SET time_zone = "+00:00";
  13.  
  14.  
  15. /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  16. /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  17. /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
  18. /*!40101 SET NAMES utf8mb4 */;
  19.  
  20. --
  21. -- Database: `sample_db`
  22. --
  23.  
  24. -- --------------------------------------------------------
  25.  
  26. --
  27. -- Table structure for table `orders`
  28. --
  29.  
  30. CREATE TABLE `orders` (
  31. `id` int(11) NOT NULL,
  32. `property_id` int(11) DEFAULT NULL,
  33. `plot_id` int(11) DEFAULT NULL,
  34. `no_sqyds` int(11) DEFAULT NULL
  35. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  36.  
  37. --
  38. -- Dumping data for table `orders`
  39. --
  40.  
  41. INSERT INTO `orders` (`id`, `property_id`, `plot_id`, `no_sqyds`) VALUES
  42. (1, 1, 1, 25),
  43. (2, 1, 2, 50),
  44. (3, 1, 1, 25),
  45. (4, 1, 3, 50);
  46.  
  47. -- --------------------------------------------------------
  48.  
  49. --
  50. -- Table structure for table `properties`
  51. --
  52.  
  53. CREATE TABLE `properties` (
  54. `id` int(11) NOT NULL,
  55. `name` varchar(255) DEFAULT NULL
  56. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  57.  
  58. --
  59. -- Dumping data for table `properties`
  60. --
  61.  
  62. INSERT INTO `properties` (`id`, `name`) VALUES
  63. (1, 'Lake View Park');
  64.  
  65. -- --------------------------------------------------------
  66.  
  67. --
  68. -- Table structure for table `property_plots`
  69. --
  70.  
  71. CREATE TABLE `property_plots` (
  72. `id` int(11) NOT NULL,
  73. `property_id` int(11) DEFAULT NULL,
  74. `no_sqyds` int(11) DEFAULT NULL
  75. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  76.  
  77. --
  78. -- Dumping data for table `property_plots`
  79. --
  80.  
  81. INSERT INTO `property_plots` (`id`, `property_id`, `no_sqyds`) VALUES
  82. (1, 1, 50),
  83. (2, 1, 75),
  84. (3, 1, 100);
  85.  
  86. --
  87. -- Indexes for dumped tables
  88. --
  89.  
  90. --
  91. -- Indexes for table `orders`
  92. --
  93. ALTER TABLE `orders`
  94. ADD PRIMARY KEY (`id`);
  95.  
  96. --
  97. -- Indexes for table `properties`
  98. --
  99. ALTER TABLE `properties`
  100. ADD PRIMARY KEY (`id`);
  101.  
  102. --
  103. -- Indexes for table `property_plots`
  104. --
  105. ALTER TABLE `property_plots`
  106. ADD PRIMARY KEY (`id`);
  107.  
  108. --
  109. -- AUTO_INCREMENT for dumped tables
  110. --
  111.  
  112. --
  113. -- AUTO_INCREMENT for table `orders`
  114. --
  115. ALTER TABLE `orders`
  116. MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
  117.  
  118. --
  119. -- AUTO_INCREMENT for table `properties`
  120. --
  121. ALTER TABLE `properties`
  122. MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  123.  
  124. --
  125. -- AUTO_INCREMENT for table `property_plots`
  126. --
  127. ALTER TABLE `property_plots`
  128. MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
  129. COMMIT;
  130.  
  131. /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  132. /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  133. /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
  134.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement