/*M!999999\- enable the sandbox mode */ 
-- MariaDB dump 10.19-11.8.6-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: localhost    Database: ais
-- ------------------------------------------------------
-- Server version	11.8.6-MariaDB-0+deb13u1 from Debian

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*M!100616 SET @OLD_NOTE_VERBOSITY=@@NOTE_VERBOSITY, NOTE_VERBOSITY=0 */;

--
-- Table structure for table `answer`
--

DROP TABLE IF EXISTS `answer`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `answer` (
  `ideology` int(11) DEFAULT NULL,
  `question` int(11) DEFAULT NULL,
  `answer` int(11) DEFAULT NULL,
  KEY `answer_ideology` (`ideology`),
  KEY `answer_question` (`question`),
  KEY `answer_answer` (`answer`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `answer`
--

SET @OLD_AUTOCOMMIT=@@AUTOCOMMIT, @@AUTOCOMMIT=0;
LOCK TABLES `answer` WRITE;
/*!40000 ALTER TABLE `answer` DISABLE KEYS */;
INSERT INTO `answer` VALUES
(4,1,2),
(4,2,2),
(4,3,2),
(4,4,5),
(4,5,2),
(4,6,2),
(4,7,2),
(4,8,2),
(4,9,2),
(4,10,4),
(4,11,5),
(4,12,1),
(4,13,2),
(4,14,2),
(4,15,2),
(4,16,4),
(4,17,5),
(4,18,2),
(4,19,2),
(4,20,2),
(4,21,4),
(4,22,5),
(4,23,1),
(4,24,2),
(4,25,2),
(4,26,2),
(4,27,4),
(5,1,2),
(5,2,2),
(5,3,2),
(5,4,5),
(5,5,2),
(5,6,2),
(5,7,2),
(5,8,2),
(5,9,2),
(5,10,4),
(5,11,5),
(5,12,1),
(5,13,2),
(5,14,2),
(5,15,2),
(5,16,4),
(5,17,5),
(5,18,2),
(5,19,2),
(5,20,2),
(5,21,4),
(5,22,5),
(5,23,1),
(5,24,2),
(5,25,2),
(5,26,2),
(5,27,4),
(14,1,2),
(14,2,2),
(14,3,2),
(14,4,5),
(14,5,2),
(14,6,2),
(14,7,2),
(14,8,2),
(14,9,2),
(14,10,4),
(14,11,5),
(14,12,1),
(14,13,2),
(14,14,2),
(14,15,2),
(14,16,4),
(14,17,5),
(14,18,2),
(14,19,2),
(14,20,2),
(14,21,4),
(14,22,5),
(14,23,1),
(14,24,2),
(14,25,2),
(14,26,2),
(14,27,4);
/*!40000 ALTER TABLE `answer` ENABLE KEYS */;
UNLOCK TABLES;
COMMIT;
SET AUTOCOMMIT=@OLD_AUTOCOMMIT;

--
-- Temporary table structure for view `conflict`
--

DROP TABLE IF EXISTS `conflict`;
/*!50001 DROP VIEW IF EXISTS `conflict`*/;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8mb4;
/*!50001 CREATE VIEW `conflict` AS SELECT
 1 AS `id1`,
  1 AS `id2`,
  1 AS `question`,
  1 AS `ans1`,
  1 AS `ans2`,
  1 AS `conflict` */;
SET character_set_client = @saved_cs_client;

--
-- Temporary table structure for view `dsquared`
--

DROP TABLE IF EXISTS `dsquared`;
/*!50001 DROP VIEW IF EXISTS `dsquared`*/;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8mb4;
/*!50001 CREATE VIEW `dsquared` AS SELECT
 1 AS `id1`,
  1 AS `id2`,
  1 AS `ideology2`,
  1 AS `dsquared` */;
SET character_set_client = @saved_cs_client;

--
-- Table structure for table `ideology`
--

DROP TABLE IF EXISTS `ideology`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `ideology` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `ideology` varchar(40) DEFAULT NULL,
  `created` date DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `ideology`
--

SET @OLD_AUTOCOMMIT=@@AUTOCOMMIT, @@AUTOCOMMIT=0;
LOCK TABLES `ideology` WRITE;
/*!40000 ALTER TABLE `ideology` DISABLE KEYS */;
INSERT INTO `ideology` VALUES
(1,'','2026-06-29'),
(2,'','2026-06-29'),
(3,'','2026-06-29'),
(4,'anagorism','2026-06-29'),
(5,'anagorism','2026-06-29'),
(6,'','2026-06-29'),
(7,'','2026-06-29'),
(8,'','2026-06-29'),
(9,'','2026-06-29'),
(10,'','2026-06-29'),
(11,'','2026-06-29'),
(12,'','2026-06-29'),
(13,'','2026-06-29'),
(14,'anagorism','2026-06-29');
/*!40000 ALTER TABLE `ideology` ENABLE KEYS */;
UNLOCK TABLES;
COMMIT;
SET AUTOCOMMIT=@OLD_AUTOCOMMIT;

--
-- Temporary table structure for view `ppmcc`
--

DROP TABLE IF EXISTS `ppmcc`;
/*!50001 DROP VIEW IF EXISTS `ppmcc`*/;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8mb4;
/*!50001 CREATE VIEW `ppmcc` AS SELECT
 1 AS `q1`,
  1 AS `q2`,
  1 AS `r` */;
SET character_set_client = @saved_cs_client;

--
-- Table structure for table `question`
--

DROP TABLE IF EXISTS `question`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `question` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `section` bigint(20) DEFAULT NULL,
  `question` varchar(384) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `question`
--

SET @OLD_AUTOCOMMIT=@@AUTOCOMMIT, @@AUTOCOMMIT=0;
LOCK TABLES `question` WRITE;
/*!40000 ALTER TABLE `question` DISABLE KEYS */;
INSERT INTO `question` VALUES
(1,1,'Left to their own devices, human beings will slaughter each other.'),
(2,1,'Self interest is an inherent feature of human nature.'),
(3,1,'Self interest could be realized against others\' freedom.'),
(4,1,'There are no inherent features of human nature, i.e. there are as many types of human nature as there are humans.'),
(5,1,'Territorialism is a component of human nature.'),
(6,2,'There is more Power in government than there is in business.'),
(7,2,'That which is not 100% coerced is 100% voluntary, and vice versa, i.e. there is no in-between—every action is one or the other.'),
(8,2,'Human social groups are inherently hierarchical.'),
(9,3,'Authority is the ultimately the last line of defense against Power.'),
(10,3,'There is no such thing as legitimate authority.'),
(11,3,'Legitimate authority is a matter of expertise—the bootmaker is an authority concerning boots.'),
(12,4,'The potential wants of individuals for economic goods are limitless.'),
(13,4,'The Economic Calculation Argument of Ludwig Von Mises is accurate.'),
(14,4,'All economic actors (including the government) are price takers—there is no such thing as a price maker.'),
(15,4,'All private entities are price takers.'),
(16,4,'Economics is a human invention.'),
(17,4,'Some parts of human experience are outside economics.'),
(18,5,'There are some contexts in which fair competition between humyns of differing sexes is impossible.'),
(19,5,'The phenomenon called biological sex imposes hard constraints on knowledge and experience.'),
(20,6,'Dunbar\'s Number is a hard constraint on the size of consensus groups.'),
(21,6,'The Law of Fives is correct.'),
(22,6,'People from underprivileged minorities need to be offered advantages to compensate for their underprivileged status.'),
(23,7,'Without widespread belief in the truth of some religion, life would be very unsafe.'),
(24,7,'There are aspects of reality that are truly transcendent.'),
(25,8,'Some childhood imprints are so deep as to be immutable.'),
(26,8,'At least in the eyes of the larger society, the transition from childhood to adulthood should be instantaneous.'),
(27,8,'It takes a village to raise a child.');
/*!40000 ALTER TABLE `question` ENABLE KEYS */;
UNLOCK TABLES;
COMMIT;
SET AUTOCOMMIT=@OLD_AUTOCOMMIT;

--
-- Table structure for table `section`
--

DROP TABLE IF EXISTS `section`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `section` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `section` varchar(256) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `section`
--

SET @OLD_AUTOCOMMIT=@@AUTOCOMMIT, @@AUTOCOMMIT=0;
LOCK TABLES `section` WRITE;
/*!40000 ALTER TABLE `section` DISABLE KEYS */;
INSERT INTO `section` VALUES
(1,'Section 1: Beliefs about Human Nature'),
(2,'Section 2: Beliefs about Power'),
(3,'Section 3: Beliefs about Authority'),
(4,'Section 4: Beliefs about Economics'),
(5,'Section 5: Sex'),
(6,'Section 6: Identity, nationality, social groups, etc.'),
(7,'Section 7: Religion'),
(8,'Section 8: Human development');
/*!40000 ALTER TABLE `section` ENABLE KEYS */;
UNLOCK TABLES;
COMMIT;
SET AUTOCOMMIT=@OLD_AUTOCOMMIT;

--
-- Temporary table structure for view `ss`
--

DROP TABLE IF EXISTS `ss`;
/*!50001 DROP VIEW IF EXISTS `ss`*/;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8mb4;
/*!50001 CREATE VIEW `ss` AS SELECT
 1 AS `q`,
  1 AS `i`,
  1 AS `x`,
  1 AS `ss` */;
SET character_set_client = @saved_cs_client;

--
-- Temporary table structure for view `sums`
--

DROP TABLE IF EXISTS `sums`;
/*!50001 DROP VIEW IF EXISTS `sums`*/;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8mb4;
/*!50001 CREATE VIEW `sums` AS SELECT
 1 AS `q`,
  1 AS `sm`,
  1 AS `ssd` */;
SET character_set_client = @saved_cs_client;

--
-- Temporary table structure for view `survey`
--

DROP TABLE IF EXISTS `survey`;
/*!50001 DROP VIEW IF EXISTS `survey`*/;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8mb4;
/*!50001 CREATE VIEW `survey` AS SELECT
 1 AS `section_id`,
  1 AS `section`,
  1 AS `question_id`,
  1 AS `question` */;
SET character_set_client = @saved_cs_client;

--
-- Temporary table structure for view `total_conflict`
--

DROP TABLE IF EXISTS `total_conflict`;
/*!50001 DROP VIEW IF EXISTS `total_conflict`*/;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8mb4;
/*!50001 CREATE VIEW `total_conflict` AS SELECT
 1 AS `id1`,
  1 AS `id2`,
  1 AS `ideology2`,
  1 AS `conflict` */;
SET character_set_client = @saved_cs_client;

--
-- Final view structure for view `conflict`
--

/*!50001 DROP VIEW IF EXISTS `conflict`*/;
/*!50001 SET @saved_cs_client          = @@character_set_client */;
/*!50001 SET @saved_cs_results         = @@character_set_results */;
/*!50001 SET @saved_col_connection     = @@collation_connection */;
/*!50001 SET character_set_client      = utf8mb4 */;
/*!50001 SET character_set_results     = utf8mb4 */;
/*!50001 SET collation_connection      = utf8mb4_uca1400_ai_ci */;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`scott`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `conflict` AS select `a`.`ideology` AS `id1`,`b`.`ideology` AS `id2`,`a`.`question` AS `question`,`a`.`answer` AS `ans1`,`b`.`answer` AS `ans2`,-(`a`.`answer` - 3) * (`b`.`answer` - 3) AS `conflict` from (`answer` `a` join `answer` `b`) where `a`.`question` = `b`.`question` and `a`.`ideology` < `b`.`ideology` */;
/*!50001 SET character_set_client      = @saved_cs_client */;
/*!50001 SET character_set_results     = @saved_cs_results */;
/*!50001 SET collation_connection      = @saved_col_connection */;

--
-- Final view structure for view `dsquared`
--

/*!50001 DROP VIEW IF EXISTS `dsquared`*/;
/*!50001 SET @saved_cs_client          = @@character_set_client */;
/*!50001 SET @saved_cs_results         = @@character_set_results */;
/*!50001 SET @saved_col_connection     = @@collation_connection */;
/*!50001 SET character_set_client      = utf8mb4 */;
/*!50001 SET character_set_results     = utf8mb4 */;
/*!50001 SET collation_connection      = utf8mb4_uca1400_ai_ci */;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`scott`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `dsquared` AS select `a`.`ideology` AS `id1`,`b`.`ideology` AS `id2`,`ideology`.`ideology` AS `ideology2`,sum(pow(`a`.`answer` - `b`.`answer`,2)) AS `dsquared` from ((`answer` `a` join `answer` `b`) join `ideology`) where `a`.`question` = `b`.`question` and `ideology`.`id` = `b`.`ideology` and `b`.`ideology` <> `a`.`ideology` group by `a`.`ideology`,`b`.`ideology` order by sum(pow(`a`.`answer` - `b`.`answer`,2)) */;
/*!50001 SET character_set_client      = @saved_cs_client */;
/*!50001 SET character_set_results     = @saved_cs_results */;
/*!50001 SET collation_connection      = @saved_col_connection */;

--
-- Final view structure for view `ppmcc`
--

/*!50001 DROP VIEW IF EXISTS `ppmcc`*/;
/*!50001 SET @saved_cs_client          = @@character_set_client */;
/*!50001 SET @saved_cs_results         = @@character_set_results */;
/*!50001 SET @saved_col_connection     = @@collation_connection */;
/*!50001 SET character_set_client      = utf8mb4 */;
/*!50001 SET character_set_results     = utf8mb4 */;
/*!50001 SET collation_connection      = utf8mb4_uca1400_ai_ci */;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`scott`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `ppmcc` AS select `sa`.`q` AS `q1`,`sb`.`q` AS `q2`,sum(`ssa`.`ss` * `ssb`.`ss`) / count(0) AS `r` from (((`sums` `sa` join `sums` `sb`) join `ss` `ssa`) join `ss` `ssb`) where `sa`.`q` = `ssa`.`q` and `sb`.`q` = `ssb`.`q` and `sa`.`q` < `sb`.`q` and `ssa`.`i` = `ssb`.`i` group by `sa`.`q`,`sb`.`q` order by sum(`ssa`.`ss` * `ssb`.`ss`) / count(0) */;
/*!50001 SET character_set_client      = @saved_cs_client */;
/*!50001 SET character_set_results     = @saved_cs_results */;
/*!50001 SET collation_connection      = @saved_col_connection */;

--
-- Final view structure for view `ss`
--

/*!50001 DROP VIEW IF EXISTS `ss`*/;
/*!50001 SET @saved_cs_client          = @@character_set_client */;
/*!50001 SET @saved_cs_results         = @@character_set_results */;
/*!50001 SET @saved_col_connection     = @@collation_connection */;
/*!50001 SET character_set_client      = utf8mb4 */;
/*!50001 SET character_set_results     = utf8mb4 */;
/*!50001 SET collation_connection      = utf8mb4_uca1400_ai_ci */;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`scott`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `ss` AS select `answer`.`question` AS `q`,`answer`.`ideology` AS `i`,`answer`.`answer` AS `x`,(`answer`.`answer` - `sums`.`sm`) / `sums`.`ssd` AS `ss` from (`answer` join `sums`) where `answer`.`question` = `sums`.`q` */;
/*!50001 SET character_set_client      = @saved_cs_client */;
/*!50001 SET character_set_results     = @saved_cs_results */;
/*!50001 SET collation_connection      = @saved_col_connection */;

--
-- Final view structure for view `sums`
--

/*!50001 DROP VIEW IF EXISTS `sums`*/;
/*!50001 SET @saved_cs_client          = @@character_set_client */;
/*!50001 SET @saved_cs_results         = @@character_set_results */;
/*!50001 SET @saved_col_connection     = @@collation_connection */;
/*!50001 SET character_set_client      = utf8mb4 */;
/*!50001 SET character_set_results     = utf8mb4 */;
/*!50001 SET collation_connection      = utf8mb4_uca1400_ai_ci */;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`scott`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `sums` AS select `answer`.`question` AS `q`,avg(`answer`.`answer`) AS `sm`,std(`answer`.`answer`) AS `ssd` from `answer` group by `answer`.`question` */;
/*!50001 SET character_set_client      = @saved_cs_client */;
/*!50001 SET character_set_results     = @saved_cs_results */;
/*!50001 SET collation_connection      = @saved_col_connection */;

--
-- Final view structure for view `survey`
--

/*!50001 DROP VIEW IF EXISTS `survey`*/;
/*!50001 SET @saved_cs_client          = @@character_set_client */;
/*!50001 SET @saved_cs_results         = @@character_set_results */;
/*!50001 SET @saved_col_connection     = @@collation_connection */;
/*!50001 SET character_set_client      = utf8mb4 */;
/*!50001 SET character_set_results     = utf8mb4 */;
/*!50001 SET collation_connection      = utf8mb4_uca1400_ai_ci */;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`scott`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `survey` AS select `section`.`id` AS `section_id`,`section`.`section` AS `section`,`question`.`id` AS `question_id`,`question`.`question` AS `question` from (`section` join `question`) where `section`.`id` = `question`.`section` order by `section`.`id`,`question`.`id` */;
/*!50001 SET character_set_client      = @saved_cs_client */;
/*!50001 SET character_set_results     = @saved_cs_results */;
/*!50001 SET collation_connection      = @saved_col_connection */;

--
-- Final view structure for view `total_conflict`
--

/*!50001 DROP VIEW IF EXISTS `total_conflict`*/;
/*!50001 SET @saved_cs_client          = @@character_set_client */;
/*!50001 SET @saved_cs_results         = @@character_set_results */;
/*!50001 SET @saved_col_connection     = @@collation_connection */;
/*!50001 SET character_set_client      = utf8mb4 */;
/*!50001 SET character_set_results     = utf8mb4 */;
/*!50001 SET collation_connection      = utf8mb4_uca1400_ai_ci */;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`scott`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `total_conflict` AS select `a`.`id1` AS `id1`,`a`.`id2` AS `id2`,`b`.`ideology` AS `ideology2`,sum(`a`.`conflict`) AS `conflict` from (`conflict` `a` join `ideology` `b`) where `a`.`id2` = `b`.`id` group by `a`.`id1`,`a`.`id2` union select `a`.`id2` AS `id2`,`a`.`id1` AS `id1`,`b`.`ideology` AS `ideology`,sum(`a`.`conflict`) AS `conflict` from (`conflict` `a` join `ideology` `b`) where `a`.`id1` = `b`.`id` group by `a`.`id2`,`a`.`id1` */;
/*!50001 SET character_set_client      = @saved_cs_client */;
/*!50001 SET character_set_results     = @saved_cs_results */;
/*!50001 SET collation_connection      = @saved_col_connection */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!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 */;
/*M!100616 SET NOTE_VERBOSITY=@OLD_NOTE_VERBOSITY */;

-- Dump completed on 2026-06-29 16:45:48
