text stringlengths 6 9.38M |
|---|
-- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: 16-Abr-2019 ร s 01:54
-- Versรฃo do servidor: 5.7.21
-- PHP Version: 7.2.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!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 */;
--
-- Database: `bd_teste`
--
-- --------------------------------------------------------
--
-- Estrutura da tabela `cargos`
--
DROP TABLE IF EXISTS `cargos`;
CREATE TABLE IF NOT EXISTS `cargos` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`nome_cargo` varchar(255) COLLATE utf8_esperanto_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_esperanto_ci;
--
-- Extraindo dados da tabela `cargos`
--
INSERT INTO `cargos` (`id`, `nome_cargo`) VALUES
(1, 'administrador');
-- --------------------------------------------------------
--
-- Estrutura da tabela `clientes`
--
DROP TABLE IF EXISTS `clientes`;
CREATE TABLE IF NOT EXISTS `clientes` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`nome` varchar(255) COLLATE utf8_esperanto_ci NOT NULL,
`cargo` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_esperanto_ci;
--
-- Extraindo dados da tabela `clientes`
--
INSERT INTO `clientes` (`id`, `nome`, `cargo`) VALUES
(1, 'Joao', 1),
(2, 'Willian ', 1),
(3, 'Felipe ', 2),
(4, 'Lucas', 2);
COMMIT;
/*!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 */;
|
SELECT * FROM SCOTT.EMP;
SELECT*FROM SCOTT.DEPT;
SELECT MGR, SAL,EMPNO, ENAME,EMPNO FROM SCOTT.EMP;
SELECT SAL FROM SCOTT.EMP;
SELECT SUM(SAL) FROM SCOTT.EMP;
SELECT SUM(SAL), DEPTNO FROM SCOTT.EMP GROUP BY DEPTNO;
SELECT...;
INSERT...;
UPDATE...;
DELETE...;
DROP...;-- DELETE THE WHOLE TABLE --DELETE OBJECT ITSELF
CREATE...;
AS SELECT...; --SAME AS X
FROM X WHERE .. IN WANTED_RESULT;
-- * MEANS ALL
--CREATE UR OWN SCHEMA:-
CREATE TABLE EMP AS SELECT *FROM SCOTT.EMP;
CREATE TABLE BONUS AS SELECT *FROM SCOTT.BONUS;
CREATE TABLE SAL AS SELECT *FROM SCOTT.SALGRADE;
CREATE TABLE DEPT AS SELECT *FROM SCOTT.DEPT;
--//
--CREATE UR OWN SCHEMA:-
CREATE TABLE COUNTRIES AS SELECT * FROM HR.COUNTRIES;
CREATE TABLE DEPARTMENTS AS SELECT * FROM HR.DEPARTMENTS;
CREATE TABLE EMPLOYEES AS SELECT * FROM HR.EMPLOYEES;
CREATE TABLE JOB_HISTORY AS SELECT * FROM HR.JOB_HISTORY;
CREATE TABLE JOBS AS SELECT * FROM HR.JOBS;
CREATE TABLE LOCATIONS AS SELECT * FROM HR.LOCATIONS;
CREATE TABLE REGIONS AS SELECT * FROM HR.REGIONS;
--//
SELECT * FROM employees;
SELECT employee_id, first_name, email, hire_date, salary FROM employees;
SELECT hire_date, salary, employee_id, first_name, email FROM employees;
SELECT salary, 12*(salary+100) FROM employees;
SELECT DISTINCT department_id From employees;
SELECT last_name, salary FROM employees WHERE salary BETWEEN 2500 AND 3500;
SELECT last_name, manager_id FROM employees WHERE manager_id IN (100,101,201);
SELECT first_name, salary FROM employees ORDER BY salary ASC;;
--//
SELECT SUM (1.12* SAL)FROM EMP;
|
/*13. Given a personโs identifier, list all the job categories that a person is qualified for. */
SELECT cate_code
FROM (
SELECT cate_code, COUNT(skill_code) as reqs
FROM core_skills
GROUP BY cate_code
)
NATURAL JOIN
(
SELECT cate_code, COUNT(skill_code) as has
FROM (SELECT DISTINCT cate_code, skill_code
FROM has_skill NATURAL JOIN skills_category NATURAL JOIN core_skills
WHERE per_id=123)
GROUP BY cate_code
)
WHERE reqs=has |
{% macro spark__datediff(first_date, second_date, datepart) %}
{%- if datepart in ['day', 'week', 'month', 'quarter', 'year'] -%}
{# make sure the dates are real, otherwise raise an error asap #}
{% set first_date = spark_utils.assert_not_null('date', first_date) %}
{% set second_date = spark_utils.assert_not_null('date', second_date) %}
{%- endif -%}
{%- if datepart == 'day' -%}
datediff({{second_date}}, {{first_date}})
{%- elif datepart == 'week' -%}
case when {{first_date}} < {{second_date}}
then floor(datediff({{second_date}}, {{first_date}})/7)
else ceil(datediff({{second_date}}, {{first_date}})/7)
end
-- did we cross a week boundary (Sunday)?
+ case
when {{first_date}} < {{second_date}} and dayofweek({{second_date}}) < dayofweek({{first_date}}) then 1
when {{first_date}} > {{second_date}} and dayofweek({{second_date}}) > dayofweek({{first_date}}) then -1
else 0 end
{%- elif datepart == 'month' -%}
case when {{first_date}} < {{second_date}}
then floor(months_between(date({{second_date}}), date({{first_date}})))
else ceil(months_between(date({{second_date}}), date({{first_date}})))
end
-- did we cross a month boundary?
+ case
when {{first_date}} < {{second_date}} and dayofmonth({{second_date}}) < dayofmonth({{first_date}}) then 1
when {{first_date}} > {{second_date}} and dayofmonth({{second_date}}) > dayofmonth({{first_date}}) then -1
else 0 end
{%- elif datepart == 'quarter' -%}
case when {{first_date}} < {{second_date}}
then floor(months_between(date({{second_date}}), date({{first_date}}))/3)
else ceil(months_between(date({{second_date}}), date({{first_date}}))/3)
end
-- did we cross a quarter boundary?
+ case
when {{first_date}} < {{second_date}} and (
(dayofyear({{second_date}}) - (quarter({{second_date}}) * 365/4))
< (dayofyear({{first_date}}) - (quarter({{first_date}}) * 365/4))
) then 1
when {{first_date}} > {{second_date}} and (
(dayofyear({{second_date}}) - (quarter({{second_date}}) * 365/4))
> (dayofyear({{first_date}}) - (quarter({{first_date}}) * 365/4))
) then -1
else 0 end
{%- elif datepart == 'year' -%}
year({{second_date}}) - year({{first_date}})
{%- elif datepart in ('hour', 'minute', 'second', 'millisecond', 'microsecond') -%}
{%- set divisor -%}
{%- if datepart == 'hour' -%} 3600
{%- elif datepart == 'minute' -%} 60
{%- elif datepart == 'second' -%} 1
{%- elif datepart == 'millisecond' -%} (1/1000)
{%- elif datepart == 'microsecond' -%} (1/1000000)
{%- endif -%}
{%- endset -%}
case when {{first_date}} < {{second_date}}
then ceil((
{# make sure the timestamps are real, otherwise raise an error asap #}
{{ spark_utils.assert_not_null('to_unix_timestamp', second_date) }}
- {{ spark_utils.assert_not_null('to_unix_timestamp', first_date) }}
) / {{divisor}})
else floor((
{{ spark_utils.assert_not_null('to_unix_timestamp', second_date) }}
- {{ spark_utils.assert_not_null('to_unix_timestamp', first_date) }}
) / {{divisor}})
end
{% if datepart == 'millisecond' %}
+ cast(date_format({{second_date}}, 'SSS') as int)
- cast(date_format({{first_date}}, 'SSS') as int)
{% endif %}
{% if datepart == 'microsecond' %}
{% set capture_str = '[0-9]{4}-[0-9]{2}-[0-9]{2}.[0-9]{2}:[0-9]{2}:[0-9]{2}.([0-9]{6})' %}
-- Spark doesn't really support microseconds, so this is a massive hack!
-- It will only work if the timestamp-string is of the format
-- 'yyyy-MM-dd-HH mm.ss.SSSSSS'
+ cast(regexp_extract({{second_date}}, '{{capture_str}}', 1) as int)
- cast(regexp_extract({{first_date}}, '{{capture_str}}', 1) as int)
{% endif %}
{%- else -%}
{{ exceptions.raise_compiler_error("macro datediff not implemented for datepart ~ '" ~ datepart ~ "' ~ on Spark") }}
{%- endif -%}
{% endmacro %}
|
-- Write a query in SQL to find the name and year of the movies
SELECT mov_title, mov_year
FROM movie;
-- Write a query in SQL to find the year when the movie American Beauty released.
SELECT mov_year
FROM movie
WHERE mov_title='American Beauty';
-- Write a query in SQL to find the movie which was released in the year 1999
SELECT mov_title
FROM movie
WHERE mov_year=1999;
-- Write a query in SQL to find the movies which was released before 1998
select mov_title
from movie
where mov_year=1998;
-- I collected the name of reviewer and union them together with a union
-- Write a query to return the name of reviewers and name of movies together in a single list
SELECT reviewer.rev_name
FROM reviewer
UNION
(SELECT movie.mov_title
FROM movie);
-- Write a query in SQL to find the name of all reviewers who have rated 7 or more stars to their rating
SELECT reviewer.rev_name
FROM reviewer, rating
WHERE rating.rev_id = reviewer.rev_id
AND rating.rev_stars>=7
AND reviewer.rev_name IS NOT NULL;
-- Write a query in SQL to find the titles of all movies that have no ratings.
SELECT mov_title
FROM movie
WHERE mov_id NOT IN (
SELECT mov_id
FROM rating
);
-- Write a query in SQL to find the name of all reviewers who have rated their ratings with a NULL value
select rev_id,rev_name
from reviewer
where rev_name is null;
-- Write a query in SQL to find the name of movie and director (first and last names) who directed a
-- movie that casted a role for 'Eyes Wide Shut'.
SELECT dir_fname, dir_lname, mov_title
FROM director
NATURAL JOIN movie_direction
NATURAL JOIN movie
NATURAL JOIN movie_cast
WHERE role IS NOT NULL
AND mov_title='Eyes Wide Shut'; |
-- phpMyAdmin SQL Data
-- https://www.phpmyadmin.net/
--
-- Host: http://192.168.64.2/
/*!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 */;
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
--
-- Database: `hitman`
--
CREATE DATABASE IF NOT EXISTS hitmanDB;
USE hitmanDB;
-- Drop for testing/display
DROP TABLE IF EXISTS `admin`;
DROP TABLE IF EXISTS `contracts`;
DROP TABLE IF EXISTS `transaction`;
DROP TABLE IF EXISTS `clients`;
DROP TABLE IF EXISTS `hitman`;
-- --------------------------------------------------------
--
-- Table structure for table `admin`
--
CREATE TABLE `admin` (
`admin_id` INT(11) NOT NULL PRIMARY KEY,
`admin_email` VARCHAR(50) NOT NULL,
`admin_password` VARCHAR(15) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Sample data for table `admin`
--
INSERT INTO `admin` (`admin_id`, `admin_email`, `admin_password`)
VALUES
(1, 'timolyphant@gmail.com', 'password'),
(2, 'admin@gmail.com', 'admin123');
-- --------------------------------------------------------
--
-- Table structure for table `clients`
--
CREATE TABLE `clients` (
`client_id` INT(11) NOT NULL PRIMARY KEY,
`client_fname` VARCHAR(30) NOT NULL,
`client_lname` VARCHAR(30) NOT NULL,
`client_email` VARCHAR(50) NOT NULL,
`client_password` VARCHAR(15) NOT NULL,
`client_phone` INT(13) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Sample data for table `clients`
--
--
INSERT INTO `clients` (`client_id`, `client_fname`, `client_lname`, `client_email`, `client_password`, `client_phone`) VALUES
(3, 'James', 'West', 'a@gmail.com', '1234', '5553456789');
-- (2, 'Domino', 'b@gmail.com', '1234', '3106636532'),
-- (4, 'West', 'c@gmail.com', '1234', '3235456464'),
-- (5, 'Bond', 'd@gmail.com', '1234', '2345352333'),
-- (7, 'Brando', 'e@gmail.com', '1234', '6579807557');
-- --------------------------------------------------------
--
-- Table structure for table `hitman`
--
CREATE TABLE `hitman` (
`hitman_id` INT(11) NOT NULL PRIMARY KEY,
`hitman_fname` VARCHAR(30) NOT NULL,
`hitman_lname` VARCHAR(30) NOT NULL,
`hitman_codename` VARCHAR(30) NOT NULL,
`hitman_email` VARCHAR(50) NOT NULL,
`hitman_password` VARCHAR(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Sample data for table `hitman`
--
INSERT INTO `hitman` (`hitman_id`, `hitman_fname`, `hitman_lname`, `hitman_codename`, `hitman_email`, `hitman_password`)
VALUES
(9, 'David', 'Webster', 'Shark', 'kshark@gmail.com', '1234');
-- (9, `David`, `Webster`, 'Shark', 'killershark@gmail.com', '1234');
-- (10, 'Ana Lucia Gomez', 'Vertigo', 'killervertigo@gmail.com', '1234', '3456787890', 'Paris, France', '$2000'),
-- (11, 'Eddie Jones', 'Hammerhead', 'hammerhead@gmail.com', '1234', '5532564547', 'San Diego, CA', '$5000');
-- --------------------------------------------------------
--
-- Table structure for table `contracts`
--
CREATE TABLE `contracts` (
`contract_id` INT(11) AUTO_INCREMENT PRIMARY KEY,
`contract_value` VARCHAR(11),
`client_id` INT(11) NOT NULL REFERENCES clients,
`hitman_id` INT(11) NOT NULL REFERENCES hitman,
`contract_description` VARCHAR(255)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Sample data for 'contracts'
--
INSERT INTO `contracts` (`contract_id`, `contract_value`, `client_id`, `hitman_id`, `contract_description`)
VALUES
-- (11, '$800000', 'B546', 'Evil Person #1 - Los Angeles, CA','2', '9'),
-- (12, '$75000', 'CS34', 'Evil Person #2 - Very Dangerous', '3', '10'),
-- (13, '$1000', 'D567', 'Evil Person #3','7', '11'),
-- (14, '$10000', 'M542', 'Evil Person #4', '5', '9'),
(1, '$115000', 3, 9, 'Evil Person #5');
--
-- Table structure for table `transaction`
--
CREATE TABLE `transaction` (
`transaction_id` int(11) NOT NULL,
`hitman_id` int(11) NOT NULL REFERENCES hitman,
`client_id` int(11) NOT NULL REFERENCES clients,
`transaction_date` date NOT NULL,
`transaction_amount` varchar(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Sample data for table `transaction`
--
INSERT INTO `transaction` (`transaction_id`, `hitman_id`, `client_id`, `transaction_date`, `transaction_amount`)
VALUES
-- (9,'2019-07-23', '$500'),
-- (10, '2019-03-05', '$5000'),
-- (11, '2017-01-06', '$2000'),
-- (12, '2016-10-17', '$4500'),
(1, 9, 3, '2019-12-23', '$5000');
-- COMMIT;
/*!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 */;
|
-- LGAMITO
--
-- Estrutura da tabela `config_preventiva`
--
CREATE TABLE IF NOT EXISTS `config_preventiva` (
`id` int(4) NOT NULL auto_increment,
`conf_num_chamado` int(4) NOT NULL,
`conf_tempo_min` int(4) NOT NULL,
`conf_tempo_max` int(4) NOT NULL,
`conf_maq_nova` int(4) NOT NULL,
`conf_data_inic` date NOT NULL,
`conf_tipo_equip` varchar(20) default NULL,
`conf_equip_situac` varchar(20) default NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Configuraรงรฃo de Preventivas' AUTO_INCREMENT=2 ;
--
-- Extraindo dados da tabela `config_preventiva`
--
INSERT INTO `config_preventiva` (`id`, `conf_num_chamado`, `conf_tempo_min`, `conf_tempo_max`, `conf_maq_nova`, `conf_data_inic`, `conf_tipo_equip`, `conf_equip_situac`) VALUES
(1, 50, 90, 120, 120, '2012-01-01', '1,2,3', '1,3,8,10,11');
--
-- Extraindo dados da tabela `sistemas`
--
/*
Script de Alteraรงรฃo de Tabela
Essa รฉ a inclusรฃo dos Campos a mais da versรฃo lrgamito
*/
ALTER TABLE `equipamentos`
ADD(
`comp_leitor` int(5) unsigned default NULL,
`comp_os` int(5) unsigned default NULL,
`comp_sn_os` varchar(50) default NULL
);
/*
Descomente as linhas de baixo se quizer um cรณdigo de etiqueta que usa ALFANUMรRICOS
*/
/*
ALTER TABLE `equipamentos`
CHANGE comp_inv comp_inv varchar(20);
*/ |
SELECT COLUMN_VALUE as Value FROM TABLE(asf_splitclob2('Active,Pending,Closed,Deleted', ',')) |
-- validation trigger exercise
-- 1. Create a trigger to raise an error if an employee salary being entered is greater than 25000.
-- 2. Name the trigger TR_VALIDATE_SALARY.
-- 3. The trigger should reference the SALARY field on the EMPLOYEES table.
-- 4. Test the trigger by verifying that you can set the salary of employee_id 100 to an acceptable value but that an error occurs if the salary is above 25000.
-- 5. Drop the trigger when you have finished testing.
create or replace trigger tr_validate_salary
before insert or update of salary on employees
for each row
begin
if :new.salary > 25000 then
raise_application_error(-20001, 'Salary > $25,000. Salary entered: '||:new.salary);
end if;
end;
/
-- test trigger
-- update salary <= $25,000
update employees
set salary = 25000
where employee_id = 100; -- 1 row updated.
-- show
select employee_id, salary from employees
where employee_id = 100;
-- rollback update
rollback;
-- update salary > $25,000
update employees
set salary = 250000
where employee_id = 100;
/* Error report
ORA-20001: Salary > $25,000. Salary entered: 250000
ORA-06512: at "HR.TR_VALIDATE_SALARY", line 3
ORA-04088: error during execution of trigger 'HR.TR_VALIDATE_SALARY'
*/
-- drop trigger
drop trigger tr_validate_salary;
|
--Problem at https://www.hackerrank.com/challenges/weather-observation-station-4/problem
/*
Enter your query here.
Please append a semicolon ";" at the end of the query and enter your query in a single line to avoid error.
*/
SELECT COUNT(CITY) - COUNT(DISTINCT CITY) AS N FROM STATION |
SELECT scheduler_id, current_tasks_count, runnable_tasks_count
FROM sys.dm_os_schedulers
WHERE scheduler_id < 255
SELECT Round(((CONVERT(FLOAT, ws.wait_time_ms) / ws.waiting_tasks_count) / (CONVERT(FLOAT, si.os_quantum) / si.cpu_ticks_in_ms) * cpu_count), 2) AS Additional_CPUs_Necessary
,Round((((CONVERT(FLOAT, ws.wait_time_ms) / ws.waiting_tasks_count) / (CONVERT(FLOAT, si.os_quantum) / si.cpu_ticks_in_ms) * cpu_count) / hyperthread_ratio), 2) AS Additional_Sockets_Necessary
FROM sys.dm_os_wait_stats ws
CROSS apply sys.dm_os_sys_info si
WHERE ws.wait_type = 'SOS_SCHEDULER_YIELD' --example provided by
|
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- ะฅะพัั: 127.0.0.1
-- ะัะตะผั ัะพะทะดะฐะฝะธั: ะฏะฝะฒ 22 2020 ะณ., 18:11
-- ะะตััะธั ัะตัะฒะตัะฐ: 10.4.6-MariaDB
-- ะะตััะธั PHP: 7.3.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!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 */;
--
-- ะะฐะทะฐ ะดะฐะฝะฝัั
: `registration`
--
-- --------------------------------------------------------
--
-- ะกัััะบัััะฐ ัะฐะฑะปะธัั `hashes`
--
CREATE TABLE `hashes` (
`id` int(10) NOT NULL,
`pass_hash` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='information about password''s hash';
--
-- ะะฐะผะฟ ะดะฐะฝะฝัั
ัะฐะฑะปะธัั `hashes`
--
INSERT INTO `hashes` (`id`, `pass_hash`) VALUES
(5, '4759e3069d83a882086b75c2230c8ddd'),
(4, '5cf4390e39a3edb3228c221c956cf3b2'),
(3, 'dbfg45y_)9;ijhm'),
(6, 'dgrwts'),
(2, 'esbd56yh'),
(1, 'sdfv43465tgb');
--
-- ะะฝะดะตะบัั ัะพั
ัะฐะฝัะฝะฝัั
ัะฐะฑะปะธั
--
--
-- ะะฝะดะตะบัั ัะฐะฑะปะธัั `hashes`
--
ALTER TABLE `hashes`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `id` (`id`,`pass_hash`),
ADD KEY `pass_hash` (`pass_hash`),
ADD KEY `pass_hash_2` (`pass_hash`),
ADD KEY `pass_hash_3` (`pass_hash`);
COMMIT;
/*!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 */;
|
USE lab_mysql;
CREATE TABLE ejemplo (columna VARCHAR(20));
SHOW TABLES; |
USE app;
SET FOREIGN_KEY_CHECKS = 0;
TRUNCATE TABLE category;
TRUNCATE TABLE category_preference;
TRUNCATE TABLE venue;
TRUNCATE TABLE venue_metrics;
TRUNCATE TABLE city;
TRUNCATE TABLE weather;
TRUNCATE TABLE city_weather;
TRUNCATE TABLE city_venue_metrics;
TRUNCATE TABLE user;
TRUNCATE TABLE category_preference;
SET FOREIGN_KEY_CHECKS = 1; |
-- -----------------------------------------------------
-- Schema domhain
-- -----------------------------------------------------
SET GLOBAL local_infile=1;
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';
-- -----------------------------------------------------
-- remove database if it already exists
-- -----------------------------------------------------
DROP DATABASE IF EXISTS domhain;
-- -----------------------------------------------------
-- create new database
-- -----------------------------------------------------
CREATE DATABASE domhain;
USE domhain;
-- -----------------------------------------------------
-- Table domain.Demographic
-- -----------------------------------------------------
CREATE TABLE Demographic (
study_id VARCHAR(255) NOT NULL,
dob DATE,
visit_num VARCHAR(255),
age_y INT,
age_m INT,
sex VARCHAR(255),
study_group VARCHAR(255),
PRIMARY KEY (study_id)
);
-- -----------------------------------------------------
-- Table domain.Sample_manifest
-- -----------------------------------------------------
CREATE TABLE Sample_manifest (
manifest_id VARCHAR(255) NOT NULL,
study_id VARCHAR(255),
visit_num INT,
facility VARCHAR(255),
sample_type VARCHAR(255),
tube_type VARCHAR(255),
collection_date DATE,
collection_time TIME,
aliquot_number INT,
aliquot_type VARCHAR(255),
aliquot_code VARCHAR(255),
initial_ml VARCHAR(255),
current_ml VARCHAR(255),
box_num INT,
row_num VARCHAR(255),
col_num INT,
hiv_status VARCHAR(255),
PRIMARY KEY (manifest_id),
FOREIGN KEY (study_id)
REFERENCES Demographic(study_id)
);
-- -----------------------------------------------------
-- Table domain.Breast_feeding
-- -----------------------------------------------------
CREATE TABLE Breast_feeding (
study_id VARCHAR(255) NOT NULL,
breast_fed VARCHAR(255),
breast_min INT,
breast_hrs INT,
breast_days INT,
colostrum INT,
water_before_breast_fed INT,
infant_formula INT,
drink_fluids INT,
stop_breast_fed INT,
why_not_breast_fed INT,
PRIMARY KEY (study_id),
FOREIGN KEY (study_id)
REFERENCES Demographic(study_id)
);
-- -----------------------------------------------------
-- Table domain.Diet
-- -----------------------------------------------------
CREATE TABLE Diet (
study_id VARCHAR(255) NOT NULL,
visit_id INT,
food VARCHAR(255) NOT NULL,
is_food_taken INT,
how_often INT,
last_24hrs_frequency INT,
PRIMARY KEY (study_id, food),
FOREIGN KEY (study_id)
REFERENCES Demographic(study_id)
);
-- -----------------------------------------------------
-- Table domain.Diet_food_taken
-- -----------------------------------------------------
CREATE TABLE Diet_food_taken (
study_id VARCHAR(255) NOT NULL,
visit_num INT,
antibiotics_syrup INT,
beans INT,
biscuits_cookies INT,
bread INT,
cake_buns_puffpuff INT,
eba_amala_fufu INT,
eggs INT,
fizzy_drinks INT,
fura INT,
ice_cream INT,
indomie_noodles INT,
juices INT,
maize_other_corn_meal INT,
meat_fish_chicken INT,
multivitamins_syrup INT,
other_solids INT,
pap_ogi_akamu INT,
rice INT,
soya_milk INT,
sugar_or_glucose_water INT,
sugar_salt_soin_ors INT,
sugary_liquids INT,
sweets_chocolate INT,
tea_chocolate_drink INT,
tinned_powdered_milk INT,
vegetables_fruits INT,
yam_yam_pottage INT,
PRIMARY KEY (study_id),
FOREIGN KEY (study_id)
REFERENCES Demographic(study_id)
);
-- -----------------------------------------------------
-- Table domain.Diet_24hrs
-- -----------------------------------------------------
CREATE TABLE Diet_24hrs (
study_id VARCHAR(255) NOT NULL,
visit_num INT,
antibiotics_syrup INT,
beans INT,
biscuits_cookies INT,
bread INT,
cake_buns_puffpuff INT,
eba_amala_fufu INT,
eggs INT,
fizzy_drinks INT,
fura INT,
ice_cream INT,
indomie_noodles INT,
juices INT,
maize_other_corn_meal INT,
meat_fish_chicken INT,
multivitamins_syrup INT,
other_solids INT,
pap_ogi_akamu INT,
rice INT,
soya_milk INT,
sugar_or_glucose_water INT,
sugar_salt_soin_ors INT,
sugary_liquids INT,
sweets_chocolate INT,
tea_chocolate_drink INT,
tinned_powdered_milk INT,
vegetables_fruits INT,
yam_yam_pottage INT,
PRIMARY KEY (study_id),
FOREIGN KEY (study_id)
REFERENCES Demographic(study_id)
);
-- -----------------------------------------------------
-- Table domain.Clinical
-- -----------------------------------------------------
CREATE TABLE Clinical (
study_id VARCHAR(255) NOT NULL,
assign_date DATE,
hiv_diagnosis DATE,
delivery_method INT,
membrane_rupture INT,
gestational_age INT,
birth_weight INT,
pre_mature INT,
arv_at_birth INT,
art_during_pregnancy INT,
definitive_diagnosis INT,
last_pcr_or_antibody_test DATE,
pcr_or_antibody_result INT,
viral_load INT,
aids_symptoms INT,
symptom_type VARCHAR(255),
pneumonia INT,
no_medication INT,
sickle_cell INT,
measles INT,
upper_respiratory_tract INT,
other_medication VARCHAR(255),
cd4_percent INT,
cd4_per_mm3 INT,
current_viral_load INT,
current_weight INT,
current_height INT,
first_regimen_arv VARCHAR(255),
first_dosage_form DATE,
second_regimen_arv VARCHAR(255),
second_dosage_form DATE,
fixed_dose VARCHAR(255),
fixed_dose_form VARCHAR(255),
fixed_dose_am INT,
fixed_dose_pm INT,
fixed_treatment_duration VARCHAR(255),
single_drugs VARCHAR(255),
single_drugs_form VARCHAR(255),
single_drugs_am INT,
single_drugs_pm INT,
single_drugs_duration VARCHAR(255),
oi_drugs VARCHAR(255),
oi_drugs_form VARCHAR(255),
oi_drugs_am INT,
oi_drugs_pm INT,
oi_drugs_duration VARCHAR(255),
staff_name VARCHAR(255),
data_tech VARCHAR(255),
PRIMARY KEY (study_id),
FOREIGN KEY (study_id)
REFERENCES Demographic(study_id)
);
-- -----------------------------------------------------
-- Table domain.Lab
-- -----------------------------------------------------
CREATE TABLE Lab (
sample_id VARCHAR(255) NOT NULL,
study_id VARCHAR(255) NOT NULL,
plaque_amount INT,
ul_for_extraction INT,
extraction_date DATE,
dna_concentration_ngul FLOAT(3,2),
PRIMARY KEY (sample_id),
FOREIGN KEY (study_id)
REFERENCES Demographic(study_id)
);
-- -----------------------------------------------------
-- Load data files
-- -----------------------------------------------------
-- NOTE: if you have a windows computer you'll need to change the carriage return (\r) to newline (\n)
LOAD DATA LOCAL INFILE 'sample_manifest.csv' INTO TABLE Sample_manifest FIELDS TERMINATED BY ',' LINES TERMINATED BY '\r' IGNORE 1 ROWS;
LOAD DATA LOCAL INFILE 'breast_feeding.csv' INTO TABLE Breast_feeding FIELDS TERMINATED BY ',' LINES TERMINATED BY '\r' IGNORE 1 ROWS;
LOAD DATA LOCAL INFILE 'demographic.csv' INTO TABLE Demographic FIELDS TERMINATED BY ',' LINES TERMINATED BY '\r' IGNORE 1 ROWS;
LOAD DATA LOCAL INFILE 'diet.csv' INTO TABLE Diet FIELDS TERMINATED BY ',' LINES TERMINATED BY '\r' IGNORE 1 ROWS;
LOAD DATA LOCAL INFILE 'diet_24hrs.csv' INTO TABLE Diet_24hrs FIELDS TERMINATED BY ',' LINES TERMINATED BY '\r' IGNORE 1 ROWS;
LOAD DATA LOCAL INFILE 'diet_food_taken.csv' INTO TABLE Diet_food_taken FIELDS TERMINATED BY ',' LINES TERMINATED BY '\r' IGNORE 1 ROWS;
LOAD DATA LOCAL INFILE 'clinical.csv' INTO TABLE Clinical FIELDS TERMINATED BY ',' LINES TERMINATED BY '\r' IGNORE 1 ROWS;
LOAD DATA LOCAL INFILE 'lab.csv' INTO TABLE Lab FIELDS TERMINATED BY ',' LINES TERMINATED BY '\r' IGNORE 1 ROWS; |
DROP VIEW IF EXISTS grape.v_users;
CREATE OR REPLACE VIEW grape.v_users AS
SELECT u.user_id,
u.username,
u.email,
u.fullnames,
u.active,
u.employee_guid AS guid,
u.employee_info,
u.auth_info->>'totp_status' AS totp_status,
u.auth_info->>'auth_server' AS auth_server,
u.auth_info->>'mobile_status' AS mobile_status,
(SELECT array_agg(g) FROM grape.get_user_roles(u.user_id) g) AS role_names,
(SELECT array_agg(g) FROM grape.get_user_assigned_roles(u.user_id) g) AS assigned_role_names
FROM grape.user u
ORDER BY
u.active DESC,
u.username;
|
๏ปฟ
create database ShopDB
use ShopDB
CREATE TABLE Products
(
Id int primary key IDENTITY (1,1) NOT NULL,
[Name of Products] nvarchar(100) NOT NULL,
Constraint CK_Name_of_Products Check([Name of Products] <>' ')
)
Insert into ShopDB.dbo.Products(ShopDB.dbo.Products.[Name of Products])
values
(N'DROBIMEX 250GR turkey'),
(N'ICELAND ESKIMO PLOMBฤฐR 15% 80QR'),
(N'ANKARA 500GR MAKARON FIYONK'),
(N'3 JELANIYA 450GR KETCUP KABABLIG'),
(N'Bizim Tarla 500GR TOMAT PASTASI S/Q'),
(N'BONDUELLE 212ML KRASNAYA FASOL'),
(N'AZOVSKAYA 250GR XALVA PODSOLN.S ARAXISOM'),
(N'MPRO Sevimli Dad 1KG Kษrษ yaฤฤฑ'),
(N'Azษrรงay 100QR'),
(N'Karmen Un 1000QR')
CREATE TABLE Customers
(
Id int primary key IDENTITY (1,1) NOT NULL,
[Name of Customers] nvarchar(100) NOT NULL,
Constraint CK_Name_of_Customers Check([Name of Customers] <>' ')
)
Insert into ShopDB.dbo.Customers(ShopDB.dbo.Customers.[Name of Customers])
values
(N'Customers_1'),
(N'Customers_2'),
(N'Customers_3'),
(N'Customers_4'),
(N'Customers_5'),
(N'Customers_6'),
(N'Customers_7'),
(N'Customers_8'),
(N'Customers_9'),
(N'Customers_10')
CREATE TABLE DetailsofOrder
(
Id int primary key IDENTITY (1,1) NOT NULL,
[isCash] bit NOT NULL,
DateOrder datetime NOT NULL
)
Insert into ShopDB.dbo.DetailsofOrder(ShopDB.dbo.DetailsofOrder.isCash, ShopDB.dbo.DetailsofOrder.DateOrder)
values
(1,'2020-12-12'),
(0,'2021-12-12'),
(1,'2020-02-10'),
(0,'2021-01-11'),
(1,'2020-10-01'),
(0,'2021-11-02'),
(1,'2020-05-10'),
(1,'2021-12-18'),
(0,'2020-12-09'),
(0,'2021-08-22')
CREATE TABLE Orders
(
Id int primary key IDENTITY (1,1) NOT NULL,
[CustomersId for Orders] int NOT NULL,
[ProductsId for Orders] int NOT NULL,
[DetailsofOrder for Orders] int NOT NULL,
Constraint FK_CustomersIdforOrders Foreign key ([CustomersId for Orders]) References Customers(Id) On Delete CASCADE On Update CASCADE,
Constraint FK_ProductsIdforOrders Foreign key ([ProductsId for Orders]) References Products(Id) On Delete CASCADE On Update CASCADE,
Constraint FK_DetailsofOrders Foreign key ([DetailsofOrder for Orders]) References DetailsofOrder(Id) On Delete CASCADE On Update CASCADE,
)
Insert into ShopDB.dbo.Orders(ShopDB.dbo.Orders.[CustomersId for Orders], ShopDB.dbo.Orders.[ProductsId for Orders], ShopDB.dbo.Orders.[DetailsofOrder for Orders])
values
(1,1,1),
(1,2,3),
(2,3,2),
(2,4,4),
(3,5,5),
(3,6,7),
(4,7,6),
(4,8,8),
(5,9,1),
(5,10,3),
(6,1,4),
(6,2,3),
(7,3,2),
(7,4,1),
(8,6,1),
(8,5,4),
(9,6,10),
(10,5,5)
|
/*
์ค๋ผํด์์์ data type
A. ๋ฌธ์ํ ๋ฐ์ดํฐํ์
1. char(n) : ๊ณ ์ ๊ธธ์ด / ์ต๋ 2000byte / ๊ธฐ๋ณธ๊ฐ์ 1byte
2. varchar2(n) : ๊ฐ๋ณ๊ธธ์ด / ์ต๋ 4000byte / ๊ธฐ๋ณธ๊ฐ์ 1byte`
3. long : ๊ฐ๋ณ๊ธธ์ด / ์ต๋ 2GByte
B. ์ซ์ํ ๋ฐ์ดํฐํ์
1. number(p,s) : ๊ฐ๋ณ์ซ์ / P(1~38, ๊ธฐ๋ณธ๊ฐ=38), S(-84~127, ๊ธฐ๋ณธ๊ฐ=0) / ์ต๋22byte
2. float(p) : Numberํ์ํ์
/ P(1~128, ๊ธฐ๋ณธ๊ฐ=128) / ์ต๋22byte
C. ๋ ์งํ ๋ฐ์ดํฐํ์
1. date : bc 4712.01.01 ~ 9999.12.31. ์ฐ,์,์ผ,์,๋ถ,์ด๊น์ง ์
๋ ฅ๊ฐ๋ฅ
2. timestamp : ์ฐ,์,์ผ,์,๋ถ,์ด, ๋ฐ๋ฆฌ์ด๊น์ง ์
๋ ฅ ๊ฐ๋ฅ
D. LOB ๋ฐ์ดํฐํ์
: LOB๋ Large Object์ ์ฝ์๋ก ๋์ฉ๋ ๋ฐ์ดํฐ๋ฅผ ์ ์ฅํ ์ ์๋
๋ฐ์ดํฐ ํ์
์ด๋ค. ์ผ๋ฐ์ ์ผ๋ก ๊ทธ๋ํฝ, ์ด๋ฏธ์ง, ์ฌ์ด๋๋ฑ ๋น์ ํ ๋ฐ์ดํฐ๋ฅผ ์ ์ฅํ
๋ LOBํ์
์ ์ฌ์ฉํ๋ค.
๋ฌธ์ํ ๋์ฉ๋ ๋ฐ์ดํฐ๋ CLOB๋ NLOB๋ฅผ ์ฌ์ฉํ๊ณ ๊ทธ๋ํฝ, ์ด๋ฏธ์ง, ๋์์๋ฑ์
๋ฐ์ดํฐ๋ BLOB๋ฅผ ์ฃผ๋ก ์ฌ์ฉํ๋ค.
1. clob : ๋ฌธ์ํ ๋์ฉ๋ ๊ฐ์ฒด ๊ณ ์ ๊ธธ์ด์ ๊ฐ๋ณ๊ธธ์ด ๋ฌธ์์
ํฉ์ ์ง์
2. blob : ์ด์งํ ๋์ฉ๋ ๊ฐ์ฒด
3. bfile : ๋์ฉ๋ ์ด์งํ์ผ์ ๋ํ ์์น, ์ด๋ฆ์ ์ ์ฅ
*/
-- A. ํ
์ด๋ธ ์์ฑํ๊ธฐ
-- create table ํ
์ด๋ธ๋ช
(col1 ๋ฐ์ดํฐํ์
, ... coln ํ
์ดํฐํ์
);
-- 1. myFirstTable์ ์์ฑ
create table myFirstTable (
no number(3,1)
, name varchar2(10)
, hiredate date
);
select * from myfirsttable;
-- 2. ํ
์ด๋ธ์ data๋ฅผ ์ถ๊ฐ
-- insert into ํ
์ด๋ธ๋ช
(col1, ... coln) values(val1, ... valn);
-- insert๋ช
๋ น์ ์ปฌ๋ผ๊ฐฏ์์ ๊ฐ๊ฐฏ์๊ฐ ๋์์ด์ด์ผ ํ๋ค.
insert into MYFIRSTTABLE(name) values('์ํฅ');
insert into MYFIRSTTABLE(no, name) values(1, '์ํฅ');
insert into MYFIRSTTABLE(no, name, hiredate) values(1, '์ํฅ', sysdate);
insert into MYFIRSTTABLE(no, name, hiredate) values(99.1, '์ํฅ', sysdate);
insert into MYFIRSTTABLE(no, name, hiredate) values(1000.1, '์ํฅ', sysdate);
insert into MYFIRSTTABLE(no, name, hiredate) values(100.11, '์ํฅ', sysdate);
-- 2. mySecondTable์ ์์ฑ
create table mySecondTable (
no number(3,1) default 0
, name varchar2(10) default 'ํ๊ธธ๋'
, hiredate date default sysdate
);
select * from mySecondTable;
insert into mySecondTable(name) values('์ํฅ');
insert into mySecondTable(no, name) values(1, '์ํฅ');
-- 3. ํ๊ธ์ด๋ฆ์ผ๋ก ์์ฑํ๊ธฐ
create table ํ๊ธ์ด๋ฆ (
์ปฌ๋ผ1 number
,์ปฌ๋ผ2 varchar(10)
,์ปฌ๋ผ3 date
);
select * from ํ๊ธ์ด๋ฆ
insert into ํ๊ธ์ด๋ฆ(์ปฌ๋ผ2) values('์ํฅ');
insert into ํ๊ธ์ด๋ฆ(์ปฌ๋ผ1, ์ปฌ๋ผ2) values(1, '์ํฅ');
insert into ํ๊ธ์ด๋ฆ(์ปฌ๋ผ1, ์ปฌ๋ผ2, ์ปฌ๋ผ3) values(1, '์ํฅ', sysdate);
-- emp table์ ์ฐธ์กฐํด์ myempํ
์ด๋ธ ์์ฑํ๊ธฐ
create table myemp (
no
)
/*
ํ
์ด๋ธ ์์ฑ์ ์ ํ์ฌํญ
1. ํ
์ด๋ธ๋ช
์ ๋ฐ๋์ ๋ฌธ์๋ก ์์, ์ค๊ฐ์ ์ซ์๋ ๊ฐ๋ฅํ๋ค.
ํ๊ธ, ํน์๋ฌธ์๋ ๊ฐ๋ฅ, ํน์๋ฌธ์๋ฅผ ์ฌ์ฉํ ๊ฒฝ์ฐ๋ ํฐ๋ฐ์ดํ๋ก ๊ฐ์ธ์ผํ๋ฉฐ
ํน์๋ฌธ์ ์ฌ์ฉ์ ๊ถ์ฅํ์ง ์๋๋ค.
2. ํ
์ด๋ธ๋ช
or ์ปฌ๋ผ๋ช
์ ์ต๋ 30์(ํ๊ธ์ 15์)๊น์ง ๊ฐ๋ฅ
3. ํ
์ด๋ธ๋ช
์ค๋ณต ๋ถ๊ฐ
4. ํ
์ด๋ธ๋ช
, ์ปฌ๋ผ๋ช
์๋ ์ค๋ผํด ํค์๋๋ฅผ ์ฌ์ฉํ ์ ์๋ค.
*/
-- 5. ํ
์ด๋ธ ๊ตฌ์กฐ๋ง ๋ณต์ฌํ๊ธฐ
create table myemp1
as
select * from emp where 1=2;
select * from emp;
select * from myemp1;
-- 6. ํ
์ด๋ธ ๋ณต์ฌํ๊ธฐ
create table myemp2
as
select * from emp
select * from myemp2
-- 6-1. ํน์ ์ปฌ๋ผ๋ง ๋ณต์ฌํ๊ธฐ
create table myemp3
as
select empno, ename from emp;
select * from myemp3
-- 7. ํน์ ์กฐ๊ฑด์ผ๋ก ํ
์ด๋ธ ์์ฑํ๊ธฐ
create table mydept1
as
select * from dept where deptno in(10, 20, 40);
select * from mydept1
-- B. ํ
์ด๋ธ ์์ ํ๊ธฐ
-- alter table ํ
์ด๋ธ๋ช
[add|rename|modify|drop]
create table dept6 as select * from dept2;
select * from dept6;
-- 1. ํ
์ด๋ธ์์ (์ปฌ๋ผ์ถ๊ฐ)
alter table dept6
add(location varchar2(10));
select * from dept6;
-- 2. ํ
์ด๋ธ์์ (์ปฌ๋ผ๋ช
๋ณ๊ฒฝ)
alter table dept6
rename column location to loc;
select * from dept6;
-- 2-1. ์ปฌ๋ผ์์ (modify)
create table dept6 as select * from dept2;
select * from dept6;
alter table dept6
add(location varchar2(10));
alter table dept6
modify(dname number);
-- ์ค๋ผํด SQL ๋ช
๋ น์ด์ด๊ธฐ ๋๋ฌธ์ ์คํ ๋ถ๊ฐ
-- desc dept6
-- 3. ํ
์ด๋ธ์์ (์ปฌ๋ผ๋ช
์ญ์ )
alter table dept6
drop column loc;
select * from dept6;
-- 4. ํ
์ด๋ธ๋ช
๋ณ๊ฒฝ
alter table dept6
rename to dept7
select * from dept7;
select * from dept6;
-- 5. ํ
์ด๋ธ ์ ์ฒด ์๋ฃ์ญ์ (์๋ฃ๋ง ์ ์ฒด์ญ์ )
truncate table dept7
select * from dept7;
-- 6. ํ
์ด๋ธ์ญ์ (ํ
์ด๋ธ ๊ฐ์ฒด๋ฅผ ์์ ํ ์ญ์ )
select * from dept7;
select * from ํ๊ธ์ด๋ฆ;
drop table dept7;
drop table ํ๊ธ์ด๋ฆ;
/* ์ฐ์ต๋ฌธ์ */
-- 1. ํ
์ด๋ธ์์ฑ
create table new_emp (
no number(5)
, name varchar2(20)
, hiredate date
, bonus number(6,2)
);
select * from new_emp
-- 2. ํน์ ์ปฌ๋ผ ๋ณต์ฌ ํ ํ
์ด๋ธ ์์ฑ
create table new_emp2
as
select no, name, hiredate from new_emp;
-- 3. ํ
์ด๋ธ ๊ตฌ์กฐ๋ง ๊ฐ์ ธ์ค๊ธฐ
create table new_emp3
as
select * from new_emp2 where 1=2;
-- 4. ์ปฌ๋ผ์ถ๊ฐ
alter table new_emp2
add(birthday date);
insert into new_emp2(birthday) values(sysdate);
select * from new_emp2
-- 5. ์ปฌ๋ผ๋ช
๋ณ๊ฒฝ
alter table new_emp2
rename column birthday to birth;
-- 6. ์ปฌ๋ผ๊ธธ์ด๋ณ๊ฒฝ
alter table new_emp2
modify(no number(7));
-- 7. ์ปฌ๋ผ์ญ์
alter table new_emp2
drop column birth
-- 8. ๋ฐ์ดํฐ๋ง ์ญ์
truncate table new_emp2
-- 9. ํ
์ด๋ธ์ ์์ ํ ์ญ์
drop table new_emp2
select * from new_emp2
/*
C. ๋ฐ์ดํฐ ๋์
๋๋ฆฌ
1. ๋ฐ์ดํฐ ๋์
๋๋ฆฌ
1) ๋ฐ์ดํฐ๋ฒ ์ด์ค์ ์์์ ํจ์จ์ ์ผ๋ก ๊ด๋ฆฌํ๊ธฐ ์ํด ๋ค์ํ ์ ๋ณด๋ฅผ ์ ์ฅํ๋ ์์คํ
์ด๋ค.
2) ์ฌ์ฉ์๊ฐ ํ
์ด๋ธ์ ์์ฑํ๊ฑฐ๋ ๋ณ๊ฒฝํ๋ ๋ฑ์ ์์
์ ํ ๋ ๋ฐ์ดํฐ๋ฒ ์ด์ค ์๋ฒ(์์ง)์
์ํด ์๋ ๊ฐฑ์ ๋๋ ํ
์ด๋ธ์ด๋ค
3) ์ฌ์ฉ์๊ฐ ๋ฐ์ดํฐ ๋์
๋๋ฆฌ์ ๋ด์ฉ์ ์์ ํ๊ฑฐ๋ ์ญ์ ํ ์ ์๋ค.
4) ์ฌ์ฉ์ ๋ฐ์ดํฐ ๋์
๋๋ฆฌ๋ฅผ ์กฐํํ ๊ฒฝ์ฐ์ ์์คํ
์ด ์ง์ ๊ด๋ฆฌํ๋ ํ
์ด๋ธ์
์ํธํ ๋์ด ์๊ธฐ ๋๋ฌธ์ ๋ด์ฉ์ ์ ์๊ฐ ์๋ค.
2. ๋ฐ์ดํฐ ๋์
๋๋ฆฌ ๋ทฐ
- ์ค๋ผํด์ ๋ฐ์ดํฐ ๋์
๋๋ฆฌ์ ๋ด์ฉ์ ์ฌ์ฉ์๊ฐ ์ดํดํ ์ ์๋ ๋ด์ฉ์ผ๋ก
๋ณํํ์ฌ ์ ๊ณตํ๋ค.
1)user_xxx
a. ์์ ์ ๊ณ์ ์ด ์์ ํ ๊ฐ์ฒด๋ฑ์ ๊ดํ ์ ๋ณด๋ฅผ ์กฐํํ ์ ์๋ค.
b. user๊ฐ ๋ถ์ ๋ฐ์ดํฐ ๋์
๋๋ฆฌ ์ค์์ ์์ ์ด ์์ฑํ ํ
์ด๋ธ, ์ธ๋ฑ์ค, ๋ทฐ๋ฑ๊ณผ ๊ฐ์
์์ ์ ๊ณ์ ์ด ์์ ํ ๊ฐ์ฒด์ ์ ๋ณด๋ฅผ ์ ์ฅํ๋ user_tables๊ฐ ์๋ค.
-select * from user_tables;
2)all_xxx
a. ์์ ๊ณ์ ์์ ๋๋ ๊ถํ์ ๋ถ์ฌ ๋ฐ์ ๊ฐ์ฒด๋ฑ์ ๋ํ ์ ๋ณด๋ฅผ ์กฐํํ ์ ์๋ค.
b. ํ ๊ณ์ ์ ๊ฐ์ฒด๋ ์์ฒ์ ์ผ๋ก ์ ๊ทผ์ด ๋ถ๊ฐ๋ฅํ์ง๋ง, ๊ทธ ๊ฐ์ฒด์ ์์ ์๊ฐ
์ ๊ทผํ ์ ์๋๋ก ๊ถํ์ ๋ถ์ฌํ๋ฉด ํ ๊ณ์ ์ ๊ฐ์ฒด์๋ ์ ๊ทผ์ด ๊ฐ๋ฅํ๋ค.
-select * from all_tables
-select owner, table_name from all_tables where owner = 'scott'
3)dba_xxx
a. ๋ฐ์ดํฐ๋ฒ ์ด์ค ๊ด๋ฆฌ์๋ง ์ ์ ๊ฐ๋ฅํ ๊ฐ์ฒด๋ค์ ์ ๋ณด๋ฅผ ์กฐํ
b. DBA๋ ๋ชจ๋ ์ ๊ทผ์ด ๊ฐ๋ฅํ๋ค. ์ฆ, DB์ ์๋ ๋ชจ๋ ๊ฐ์ฒด์ ๋ํ ์ ๋ณด๋ฅผ ์กฐํํ ์ ์๋ค.
c. ๋ฐ๋ผ์ DBA๊ถํ์ ๊ฐ์ง sys, system๊ณ์ ์ผ๋ก ์ ์ํ๋ฉด dba_xxx ๋ฑ์
๋ด์ฉ์ ์กฐํํ ์ ์๋ค.
*/
select * from user_tables;
select * from all_tables;
|
ALTER TABLE Downloads (
ADD UserId int NOT NULL FOREIGN KEY REFERENCES Users(Id)
) |
delete from HtmlLabelIndex where id=20227
/
delete from HtmlLabelInfo where indexId=20227
/
INSERT INTO HtmlLabelIndex values(20227,'รรยบรฌ')
/
INSERT INTO HtmlLabelInfo VALUES(20227,'รรยบรฌ',7)
/
INSERT INTO HtmlLabelInfo VALUES(20227,'Use Templet',8)
/ |
๏ปฟbegin tran
IF schema_id('ecash') IS NULL
EXECUTE('CREATE SCHEMA [ecash]')
IF schema_id('order') IS NULL
EXECUTE('CREATE SCHEMA [order]')
IF schema_id('AspNet') IS NULL
EXECUTE('CREATE SCHEMA [AspNet]')
IF schema_id('users') IS NULL
EXECUTE('CREATE SCHEMA [users]')
IF NOT EXISTS (SELECT * FROM sys.objects
WHERE object_id = OBJECT_ID(N'[ecash].[AccountOperationHistory]') AND type in (N'U'))
begin
CREATE TABLE [ecash].[AccountOperationHistory] (
[UserId] [int] NOT NULL,
[OperationDate] [datetime] NOT NULL,
[MoneyTransfered] [decimal](18, 2) NOT NULL,
[OperationTypeId] [int] NOT NULL,
CONSTRAINT [PK_ecash.AccountOperationHistory] PRIMARY KEY ([UserId], [OperationDate])
)
CREATE INDEX [IX_UserId] ON [ecash].[AccountOperationHistory]([UserId])
CREATE INDEX [IX_OperationTypeId] ON [ecash].[AccountOperationHistory]([OperationTypeId])
end
IF NOT EXISTS (SELECT * FROM sys.objects
WHERE object_id = OBJECT_ID(N'[ecash].[OperationTypes]') AND type in (N'U'))
begin
CREATE TABLE [ecash].[OperationTypes] (
[Id] [int] NOT NULL IDENTITY,
[Name] [nvarchar](max) NOT NULL,
[Code] [nvarchar](128) NOT NULL,
[IsActive] [bit] NOT NULL,
[SortOrder] [int] NOT NULL,
[DateUpdated] [datetime] NOT NULL,
[DateCreated] [datetime] NOT NULL,
CONSTRAINT [PK_ecash.OperationTypes] PRIMARY KEY ([Id])
)
end
IF NOT EXISTS (SELECT * FROM sys.objects
WHERE object_id = OBJECT_ID(N'[AspNet].[Users]') AND type in (N'U'))
begin
CREATE TABLE [AspNet].[Users] (
[Id] [int] NOT NULL IDENTITY,
[Rating] [decimal](18, 2) NOT NULL,
[ProfilePicturePath] [nvarchar](max),
[FirstName] [nvarchar](max),
[LastName] [nvarchar](max),
[Patronymic] [nvarchar](max),
[DateUpdated] [datetime],
[LastActivityDate] [datetime],
[LastLogin] [datetime],
[RemindInDays] [int] NOT NULL,
[DateRegistration] [datetime] NOT NULL,
[Description] [nvarchar](max),
[Email] [nvarchar](256),
[EmailConfirmed] [bit] NOT NULL,
[PasswordHash] [nvarchar](max),
[SecurityStamp] [nvarchar](max),
[PhoneNumber] [nvarchar](max),
[PhoneNumberConfirmed] [bit] NOT NULL,
[TwoFactorEnabled] [bit] NOT NULL,
[LockoutEndDateUtc] [datetime],
[LockoutEnabled] [bit] NOT NULL,
[AccessFailedCount] [int] NOT NULL,
[UserName] [nvarchar](256) NOT NULL,
CONSTRAINT [PK_AspNet.Users] PRIMARY KEY ([Id])
)
CREATE UNIQUE INDEX [UserNameIndex] ON [AspNet].[Users]([UserName])
end
IF NOT EXISTS (SELECT * FROM sys.objects
WHERE object_id = OBJECT_ID(N'[AspNet].[UserClaims]') AND type in (N'U'))
begin
CREATE TABLE [AspNet].[UserClaims] (
[Id] [int] NOT NULL IDENTITY,
[UserId] [int] NOT NULL,
[ClaimType] [nvarchar](max),
[ClaimValue] [nvarchar](max),
CONSTRAINT [PK_AspNet.UserClaims] PRIMARY KEY ([Id])
)
CREATE INDEX [IX_UserId] ON [AspNet].[UserClaims]([UserId])
end
IF NOT EXISTS (SELECT * FROM sys.objects
WHERE object_id = OBJECT_ID(N'[AspNet].[UserLogins]') AND type in (N'U'))
begin
CREATE TABLE [AspNet].[UserLogins] (
[LoginProvider] [nvarchar](128) NOT NULL,
[ProviderKey] [nvarchar](128) NOT NULL,
[UserId] [int] NOT NULL,
CONSTRAINT [PK_AspNet.UserLogins] PRIMARY KEY ([LoginProvider], [ProviderKey], [UserId])
)
CREATE INDEX [IX_UserId] ON [AspNet].[UserLogins]([UserId])
end
IF NOT EXISTS (SELECT * FROM sys.objects
WHERE object_id = OBJECT_ID(N'[AspNet].[UserRoles]') AND type in (N'U'))
begin
CREATE TABLE [AspNet].[UserRoles] (
[UserId] [int] NOT NULL,
[RoleId] [int] NOT NULL,
CONSTRAINT [PK_AspNet.UserRoles] PRIMARY KEY ([UserId], [RoleId])
)
CREATE INDEX [IX_UserId] ON [AspNet].[UserRoles]([UserId])
CREATE INDEX [IX_RoleId] ON [AspNet].[UserRoles]([RoleId])
end
IF schema_id('users') IS NULL
EXECUTE('CREATE SCHEMA [users]')
IF NOT EXISTS (SELECT * FROM sys.objects
WHERE object_id = OBJECT_ID(N'[users].[Contact]') AND type in (N'U'))
begin
CREATE TABLE [users].[Contact] (
[Id] [int] NOT NULL IDENTITY,
[AddressDenormolized] [nvarchar](200),
[PhoneNumberDenormolized] [nvarchar](10),
[FirstName] [nvarchar](50) NOT NULL,
[Patronymic] [nvarchar](50) NOT NULL,
[LastName] [nvarchar](50) NOT NULL,
[Email] [nvarchar](20),
[SexId] [int] NOT NULL,
[BirthdayDate] [datetime],
[SendNews] [bit] NOT NULL,
[Name] [nvarchar](max) NOT NULL,
[Code] [nvarchar](128) NOT NULL,
[IsActive] [bit] NOT NULL,
[SortOrder] [int] NOT NULL,
[DateUpdated] [datetime] NOT NULL,
[DateCreated] [datetime] NOT NULL,
CONSTRAINT [PK_users.Contact] PRIMARY KEY ([Id])
)
CREATE INDEX [IX_SexId] ON [users].[Contact]([SexId])
end
IF NOT EXISTS (SELECT * FROM sys.objects
WHERE object_id = OBJECT_ID(N'[users].[UserContacts]') AND type in (N'U'))
begin
CREATE TABLE [users].[UserContacts] (
[UserId] [int] NOT NULL,
[ContactId] [int] NOT NULL,
[IsAccountBased] [bit] NOT NULL,
CONSTRAINT [PK_users.UserContacts] PRIMARY KEY ([UserId], [ContactId])
)
CREATE INDEX [IX_UserId] ON [users].[UserContacts]([UserId])
CREATE INDEX [IX_ContactId] ON [users].[UserContacts]([ContactId])
end
IF NOT EXISTS (SELECT * FROM sys.objects
WHERE object_id = OBJECT_ID(N'[users].[Sexes]') AND type in (N'U'))
begin
CREATE TABLE [users].[Sexes] (
[Id] [int] NOT NULL IDENTITY,
[Name] [nvarchar](50) NOT NULL,
[Code] [nvarchar](128) NOT NULL,
[IsActive] [bit] NOT NULL,
[SortOrder] [int] NOT NULL,
[DateUpdated] [datetime] NOT NULL,
[DateCreated] [datetime] NOT NULL,
CONSTRAINT [PK_users.Sexes] PRIMARY KEY ([Id])
)
end
IF schema_id('order') IS NULL
EXECUTE('CREATE SCHEMA [order]')
IF NOT EXISTS (SELECT * FROM sys.objects
WHERE object_id = OBJECT_ID(N'[order].[DeliveryMethods]') AND type in (N'U'))
begin
CREATE TABLE [order].[DeliveryMethods] (
[Id] [int] NOT NULL IDENTITY,
[Name] [nvarchar](50) NOT NULL,
[Description] [nvarchar](1000) NOT NULL,
[Code] [nvarchar](128) NOT NULL,
[IsActive] [bit] NOT NULL,
[SortOrder] [int] NOT NULL,
[DateUpdated] [datetime] NOT NULL,
[DateCreated] [datetime] NOT NULL,
CONSTRAINT [PK_order.DeliveryMethods] PRIMARY KEY ([Id])
)
end
IF NOT EXISTS (SELECT * FROM sys.objects
WHERE object_id = OBJECT_ID(N'[order].[OrderDetails]') AND type in (N'U'))
begin
CREATE TABLE [order].[OrderDetails] (
[Id] [int] NOT NULL IDENTITY,
[OrderId] [int] NOT NULL,
[JsonEntityDetails] [nvarchar](max),
[EntityCount] [int] NOT NULL,
[DiscountedCost] [decimal](18, 2) NOT NULL,
[MomentCost] [decimal](18, 2) NOT NULL,
[Total] [decimal](18, 2) NOT NULL,
CONSTRAINT [PK_order.OrderDetails] PRIMARY KEY ([Id])
)
CREATE INDEX [IX_OrderId] ON [order].[OrderDetails]([OrderId])
end
IF NOT EXISTS (SELECT * FROM sys.objects
WHERE object_id = OBJECT_ID(N'[order].[Orders]') AND type in (N'U'))
begin
CREATE TABLE [order].[Orders] (
[Id] [int] NOT NULL IDENTITY,
[OrderNumber] [nvarchar](128) NOT NULL,
[ContactId] [int] NOT NULL,
[Comment] [nvarchar](1500) NOT NULL,
[OrderDate] [datetime] NOT NULL,
[Total] [decimal](18, 2) NOT NULL,
[DeliveryMethodId] [int] NOT NULL,
[PaymentMethodId] [int] NOT NULL,
[DateDelivery] [datetime],
[OrderStateId] [int] NOT NULL,
[Code] [nvarchar](128) NOT NULL,
[IsActive] [bit] NOT NULL,
[SortOrder] [int] NOT NULL,
[DateUpdated] [datetime] NOT NULL,
[DateCreated] [datetime] NOT NULL,
CONSTRAINT [PK_order.Orders] PRIMARY KEY ([Id])
)
CREATE INDEX [IX_ContactId] ON [order].[Orders]([ContactId])
CREATE INDEX [IX_DeliveryMethodId] ON [order].[Orders]([DeliveryMethodId])
CREATE INDEX [IX_PaymentMethodId] ON [order].[Orders]([PaymentMethodId])
CREATE INDEX [IX_OrderStateId] ON [order].[Orders]([OrderStateId])
end
IF NOT EXISTS (SELECT * FROM sys.objects
WHERE object_id = OBJECT_ID(N'[order].[OrderStates]') AND type in (N'U'))
begin
CREATE TABLE [order].[OrderStates] (
[Id] [int] NOT NULL IDENTITY,
[Name] [nvarchar](30) NOT NULL,
[Code] [nvarchar](128) NOT NULL,
[IsActive] [bit] NOT NULL,
[SortOrder] [int] NOT NULL,
[DateUpdated] [datetime] NOT NULL,
[DateCreated] [datetime] NOT NULL,
CONSTRAINT [PK_order.OrderStates] PRIMARY KEY ([Id])
)
end
IF NOT EXISTS (SELECT * FROM sys.objects
WHERE object_id = OBJECT_ID(N'[order].[PaymentMethods]') AND type in (N'U'))
begin
CREATE TABLE [order].[PaymentMethods] (
[Id] [int] NOT NULL IDENTITY,
[Name] [nvarchar](50) NOT NULL,
[Code] [nvarchar](128) NOT NULL,
[IsActive] [bit] NOT NULL,
[SortOrder] [int] NOT NULL,
[DateUpdated] [datetime] NOT NULL,
[DateCreated] [datetime] NOT NULL,
CONSTRAINT [PK_order.PaymentMethods] PRIMARY KEY ([Id])
)
end
IF NOT EXISTS (SELECT * FROM sys.objects
WHERE object_id = OBJECT_ID(N'[order].[OrderTypes]') AND type in (N'U'))
begin
CREATE TABLE [order].[OrderTypes] (
[OrderId] [int] NOT NULL,
[OrderTypeId] [int] NOT NULL,
CONSTRAINT [PK_order.OrderTypes] PRIMARY KEY ([OrderId], [OrderTypeId])
)
CREATE INDEX [IX_OrderId] ON [order].[OrderTypes]([OrderId])
CREATE INDEX [IX_OrderTypeId] ON [order].[OrderTypes]([OrderTypeId])
end
IF NOT EXISTS (SELECT * FROM sys.objects
WHERE object_id = OBJECT_ID(N'[order].[Types]') AND type in (N'U'))
begin
CREATE TABLE [order].[Types] (
[Id] [int] NOT NULL IDENTITY,
[Name] [nvarchar](max) NOT NULL,
[Code] [nvarchar](128) NOT NULL,
[IsActive] [bit] NOT NULL,
[SortOrder] [int] NOT NULL,
[DateUpdated] [datetime] NOT NULL,
[DateCreated] [datetime] NOT NULL,
CONSTRAINT [PK_order.Types] PRIMARY KEY ([Id])
)
end
IF NOT EXISTS (SELECT * FROM sys.objects
WHERE object_id = OBJECT_ID(N'[AspNet].[Roles]') AND type in (N'U'))
begin
CREATE TABLE [AspNet].[Roles] (
[Id] [int] NOT NULL IDENTITY,
[InRoleId] [int],
[Scope] [nvarchar](max),
[Name] [nvarchar](256) NOT NULL,
CONSTRAINT [PK_AspNet.Roles] PRIMARY KEY ([Id])
)
CREATE INDEX [IX_InRoleId] ON [AspNet].[Roles]([InRoleId])
CREATE UNIQUE INDEX [RoleNameIndex] ON [AspNet].[Roles]([Name])
end
IF NOT EXISTS (SELECT * FROM sys.objects
WHERE object_id = OBJECT_ID(N'[ecash].[UsersAccount]') AND type in (N'U'))
begin
CREATE TABLE [ecash].[UsersAccount] (
[UserId] [int] NOT NULL,
[CurrentMoney] [decimal](18, 2) NOT NULL,
[BlockedMoney] [decimal](18, 2) NOT NULL,
CONSTRAINT [PK_ecash.UsersAccount] PRIMARY KEY ([UserId])
)
end
IF NOT EXISTS (SELECT * FROM sys.objects
WHERE object_id = OBJECT_ID(N'[ecash].[WithdrawalApplications]') AND type in (N'U'))
begin
CREATE TABLE [ecash].[WithdrawalApplications] (
[Id] [int] NOT NULL IDENTITY,
[WithdrawalBefore] [datetime] NOT NULL,
[Amount] [decimal](18, 2) NOT NULL,
[DateCreated] [datetime] NOT NULL,
[UserId] [int] NOT NULL,
[WithdrawalMethodId] [int] NOT NULL,
[Comment] [nvarchar](max) NOT NULL,
[IsApproved] [bit] NOT NULL,
CONSTRAINT [PK_ecash.WithdrawalApplications] PRIMARY KEY ([Id])
)
CREATE INDEX [IX_UserId] ON [ecash].[WithdrawalApplications]([UserId])
CREATE INDEX [IX_WithdrawalMethodId] ON [ecash].[WithdrawalApplications]([WithdrawalMethodId])
end
IF NOT EXISTS (SELECT * FROM sys.objects
WHERE object_id = OBJECT_ID(N'[ecash].[WithdrawalMethods]') AND type in (N'U'))
begin
CREATE TABLE [ecash].[WithdrawalMethods] (
[Id] [int] NOT NULL IDENTITY,
[Description] [nvarchar](max) NOT NULL,
[Name] [nvarchar](max) NOT NULL,
[Code] [nvarchar](128) NOT NULL,
[IsActive] [bit] NOT NULL,
[SortOrder] [int] NOT NULL,
[DateUpdated] [datetime] NOT NULL,
[DateCreated] [datetime] NOT NULL,
CONSTRAINT [PK_ecash.WithdrawalMethods] PRIMARY KEY ([Id])
)
end
if not exists (SELECT name
FROM sys.foreign_keys
WHERE name = 'FK_ecash.AccountOperationHistory_ecash.OperationTypes_OperationTypeId')
begin
ALTER TABLE [ecash].[AccountOperationHistory] ADD CONSTRAINT [FK_ecash.AccountOperationHistory_ecash.OperationTypes_OperationTypeId] FOREIGN KEY ([OperationTypeId]) REFERENCES [ecash].[OperationTypes] ([Id])
end
if not exists (SELECT name
FROM sys.foreign_keys
WHERE name = 'FK_users.UserContacts_users.Contact_ContactId')
begin
ALTER TABLE [users].[UserContacts] ADD CONSTRAINT [FK_users.UserContacts_users.Contact_ContactId] FOREIGN KEY ([ContactId]) REFERENCES [users].[Contact] ([Id])
end
if not exists (SELECT name
FROM sys.foreign_keys
WHERE name = 'FK_users.UserContacts_AspNet.Users_UserId')
begin
ALTER TABLE [users].[UserContacts] ADD CONSTRAINT [FK_users.UserContacts_AspNet.Users_UserId] FOREIGN KEY ([UserId]) REFERENCES [AspNet].[Users] ([Id])
end
if not exists (SELECT name
FROM sys.foreign_keys
WHERE name = 'FK_ecash.AccountOperationHistory_AspNet.Users_UserId')
begin
ALTER TABLE [ecash].[AccountOperationHistory] ADD CONSTRAINT [FK_ecash.AccountOperationHistory_AspNet.Users_UserId] FOREIGN KEY ([UserId]) REFERENCES [AspNet].[Users] ([Id])
end
if not exists (SELECT name
FROM sys.foreign_keys
WHERE name = 'FK_AspNet.UserClaims_AspNet.Users_UserId')
begin
ALTER TABLE [AspNet].[UserClaims] ADD CONSTRAINT [FK_AspNet.UserClaims_AspNet.Users_UserId] FOREIGN KEY ([UserId]) REFERENCES [AspNet].[Users] ([Id])
end
if not exists (SELECT name
FROM sys.foreign_keys
WHERE name = 'FK_AspNet.UserLogins_AspNet.Users_UserId')
begin
ALTER TABLE [AspNet].[UserLogins] ADD CONSTRAINT [FK_AspNet.UserLogins_AspNet.Users_UserId] FOREIGN KEY ([UserId]) REFERENCES [AspNet].[Users] ([Id])
end
if not exists (SELECT name
FROM sys.foreign_keys
WHERE name = 'FK_AspNet.UserRoles_AspNet.Users_UserId')
begin
ALTER TABLE [AspNet].[UserRoles] ADD CONSTRAINT [FK_AspNet.UserRoles_AspNet.Users_UserId] FOREIGN KEY ([UserId]) REFERENCES [AspNet].[Users] ([Id])
end
if not exists (SELECT name
FROM sys.foreign_keys
WHERE name = 'FK_AspNet.UserRoles_AspNet.Roles_RoleId')
begin
ALTER TABLE [AspNet].[UserRoles] ADD CONSTRAINT [FK_AspNet.UserRoles_AspNet.Roles_RoleId] FOREIGN KEY ([RoleId]) REFERENCES [AspNet].[Roles] ([Id])
end
if not exists (SELECT name
FROM sys.foreign_keys
WHERE name = 'FK_users.Contact_users.Sexes_SexId')
begin
ALTER TABLE [users].[Contact] ADD CONSTRAINT [FK_users.Contact_users.Sexes_SexId] FOREIGN KEY ([SexId]) REFERENCES [users].[Sexes] ([Id])
end
if not exists (SELECT name
FROM sys.foreign_keys
WHERE name = 'FK_order.OrderDetails_order.Orders_OrderId')
begin
ALTER TABLE [order].[OrderDetails] ADD CONSTRAINT [FK_order.OrderDetails_order.Orders_OrderId] FOREIGN KEY ([OrderId]) REFERENCES [order].[Orders] ([Id])
end
if not exists (SELECT name
FROM sys.foreign_keys
WHERE name = 'FK_order.Orders_users.Contact_ContactId')
begin
ALTER TABLE [order].[Orders] ADD CONSTRAINT [FK_order.Orders_users.Contact_ContactId] FOREIGN KEY ([ContactId]) REFERENCES [users].[Contact] ([Id])
end
if not exists (SELECT name
FROM sys.foreign_keys
WHERE name = 'FK_order.Orders_order.DeliveryMethods_DeliveryMethodId')
begin
ALTER TABLE [order].[Orders] ADD CONSTRAINT [FK_order.Orders_order.DeliveryMethods_DeliveryMethodId] FOREIGN KEY ([DeliveryMethodId]) REFERENCES [order].[DeliveryMethods] ([Id])
end
if not exists (SELECT name
FROM sys.foreign_keys
WHERE name = 'FK_order.Orders_order.OrderStates_OrderStateId')
begin
ALTER TABLE [order].[Orders] ADD CONSTRAINT [FK_order.Orders_order.OrderStates_OrderStateId] FOREIGN KEY ([OrderStateId]) REFERENCES [order].[OrderStates] ([Id])
end
if not exists (SELECT name
FROM sys.foreign_keys
WHERE name = 'FK_order.Orders_order.PaymentMethods_PaymentMethodId')
begin
ALTER TABLE [order].[Orders] ADD CONSTRAINT [FK_order.Orders_order.PaymentMethods_PaymentMethodId] FOREIGN KEY ([PaymentMethodId]) REFERENCES [order].[PaymentMethods] ([Id])
end
if not exists (SELECT name
FROM sys.foreign_keys
WHERE name = 'FK_order.OrderTypes_order.Orders_OrderId')
begin
ALTER TABLE [order].[OrderTypes] ADD CONSTRAINT [FK_order.OrderTypes_order.Orders_OrderId] FOREIGN KEY ([OrderId]) REFERENCES [order].[Orders] ([Id])
end
if not exists (SELECT name
FROM sys.foreign_keys
WHERE name = 'FK_order.OrderTypes_order.Types_OrderTypeId')
begin
ALTER TABLE [order].[OrderTypes] ADD CONSTRAINT [FK_order.OrderTypes_order.Types_OrderTypeId] FOREIGN KEY ([OrderTypeId]) REFERENCES [order].[Types] ([Id])
end
if not exists (SELECT name
FROM sys.foreign_keys
WHERE name = 'FK_AspNet.Roles_AspNet.Roles_InRoleId')
begin
ALTER TABLE [AspNet].[Roles] ADD CONSTRAINT [FK_AspNet.Roles_AspNet.Roles_InRoleId] FOREIGN KEY ([InRoleId]) REFERENCES [AspNet].[Roles] ([Id])
end
if not exists (SELECT name
FROM sys.foreign_keys
WHERE name = 'FK_ecash.UsersAccount_AspNet.Users_UserId')
begin
ALTER TABLE [ecash].[UsersAccount] ADD CONSTRAINT [FK_ecash.UsersAccount_AspNet.Users_UserId] FOREIGN KEY ([UserId]) REFERENCES [AspNet].[Users] ([Id])
end
if not exists (SELECT name
FROM sys.foreign_keys
WHERE name = 'FK_ecash.WithdrawalApplications_AspNet.Users_UserId')
begin
ALTER TABLE [ecash].[WithdrawalApplications] ADD CONSTRAINT [FK_ecash.WithdrawalApplications_AspNet.Users_UserId] FOREIGN KEY ([UserId]) REFERENCES [AspNet].[Users] ([Id])
end
if not exists (SELECT name
FROM sys.foreign_keys
WHERE name = 'FK_ecash.WithdrawalApplications_ecash.WithdrawalMethods_WithdrawalMethodId')
begin
ALTER TABLE [ecash].[WithdrawalApplications] ADD CONSTRAINT [FK_ecash.WithdrawalApplications_ecash.WithdrawalMethods_WithdrawalMethodId] FOREIGN KEY ([WithdrawalMethodId]) REFERENCES [ecash].[WithdrawalMethods] ([Id])
end
commit tran
|
-- phpMyAdmin SQL Dump
-- version 4.6.6deb5ubuntu0.5
-- https://www.phpmyadmin.net/
--
-- ะฅะพัั: localhost:3306
-- ะัะตะผั ัะพะทะดะฐะฝะธั: ะะตะบ 08 2020 ะณ., 02:38
-- ะะตััะธั ัะตัะฒะตัะฐ: 5.7.32-0ubuntu0.18.04.1
-- ะะตััะธั PHP: 7.2.24-0ubuntu0.18.04.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!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 */;
--
-- ะะฐะทะฐ ะดะฐะฝะฝัั
: `testextjs`
--
-- --------------------------------------------------------
--
-- ะกัััะบัััะฐ ัะฐะฑะปะธัั `cities`
--
CREATE TABLE `cities` (
`id` int(11) NOT NULL,
`name` varchar(250) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- ะะฐะผะฟ ะดะฐะฝะฝัั
ัะฐะฑะปะธัั `cities`
--
INSERT INTO `cities` (`id`, `name`) VALUES
(1, 'ะะพัะบะฒะฐ'),
(2, 'ะกะฐะฝะบั-ะะตัะตัะฑััะณ'),
(3, 'ะะพะฒะพัะธะฑะธััะบ'),
(4, 'ะะบะฐัะตัะธะฝะฑััะณ'),
(5, 'ะะฐะทะฐะฝั'),
(6, 'ะะธะถะฝะธะน ะะพะฒะณะพัะพะด'),
(7, 'ะงะตะปัะฑะธะฝัะบ'),
(8, 'ะกะฐะผะฐัะฐ'),
(9, 'ะะผัะบ'),
(10, 'ะ ะพััะพะฒ-ะฝะฐ-ะะพะฝั'),
(11, 'ะฃัะฐ'),
(12, 'ะัะฐัะฝะพัััะบ'),
(13, 'ะะพัะพะฝะตะถ'),
(14, 'ะะตัะผั'),
(15, 'ะะพะปะณะพะณัะฐะด'),
(16, 'ะัะฐัะฝะพะดะฐั'),
(17, 'ะกะฐัะฐัะพะฒ'),
(18, 'ะขัะผะตะฝั'),
(19, 'ะขะพะปััััะธ'),
(20, 'ะะถะตะฒัะบ');
-- --------------------------------------------------------
--
-- ะกัััะบัััะฐ ัะฐะฑะปะธัั `education`
--
CREATE TABLE `education` (
`id` int(11) NOT NULL,
`name` varchar(250) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- ะะฐะผะฟ ะดะฐะฝะฝัั
ัะฐะฑะปะธัั `education`
--
INSERT INTO `education` (`id`, `name`) VALUES
(1, 'ะดะพัะบะพะปัะฝะพะต'),
(2, 'ะฝะฐัะฐะปัะฝะพะต ะพะฑัะตะต'),
(3, 'ะพัะฝะพะฒะฝะพะต ะพะฑัะตะต'),
(4, 'ััะตะดะฝะตะต ะพะฑัะตะต'),
(5, 'ััะตะดะฝะตะต ะฟัะพัะตััะธะพะฝะฐะปัะฝะพะต'),
(6, 'ะฒัััะตะต ะพะฑัะฐะทะพะฒะฐะฝะธะต - ะฑะฐะบะฐะปะฐะฒัะธะฐั'),
(7, 'ะฒัััะตะต ะพะฑัะฐะทะพะฒะฐะฝะธะต - ัะฟะตัะธะฐะปะธัะตั, ะผะฐะณะธัััะฐัััะฐ'),
(8, 'ะฒัััะตะต ะพะฑัะฐะทะพะฒะฐะฝะธะต - ะบะฐะดัั ะฒัััะตะน ะบะฒะฐะปะธัะธะบะฐัะธะธ');
-- --------------------------------------------------------
--
-- ะกัััะบัััะฐ ัะฐะฑะปะธัั `users`
--
CREATE TABLE `users` (
`id` int(11) NOT NULL,
`education_id` int(11) NOT NULL,
`name` varchar(250) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- ะะฐะผะฟ ะดะฐะฝะฝัั
ัะฐะฑะปะธัั `users`
--
INSERT INTO `users` (`id`, `education_id`, `name`) VALUES
(1, 1, 'ะะถะตัั ะะตะทะพั'),
(2, 4, 'ะะธะปะป ะะตะนัั'),
(3, 1, 'ะะตัะฝะฐั ะัะฝะพ'),
(4, 2, 'ะฃะพััะตะฝ ะะฐััะตั'),
(5, 1, 'ะะฐััะธ ะญะปะปะธัะพะฝ'),
(6, 2, 'ะะผะฐะฝัะธะพ ะััะตะณะฐ'),
(7, 1, 'ะะฐัะบ ะฆัะบะตัะฑะตัะณ'),
(8, 2, 'ะะถะธะผ ะฃะพะปัะพะฝ');
-- --------------------------------------------------------
--
-- ะกัััะบัััะฐ ัะฐะฑะปะธัั `user_city`
--
CREATE TABLE `user_city` (
`user_id` int(11) NOT NULL,
`city_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- ะะฐะผะฟ ะดะฐะฝะฝัั
ัะฐะฑะปะธัั `user_city`
--
INSERT INTO `user_city` (`user_id`, `city_id`) VALUES
(1, 3),
(1, 6),
(2, 1),
(3, 5),
(3, 15),
(3, 12),
(4, 20),
(5, 8),
(5, 17),
(6, 1),
(7, 13),
(8, 16);
--
-- ะะฝะดะตะบัั ัะพั
ัะฐะฝัะฝะฝัั
ัะฐะฑะปะธั
--
--
-- ะะฝะดะตะบัั ัะฐะฑะปะธัั `cities`
--
ALTER TABLE `cities`
ADD PRIMARY KEY (`id`);
--
-- ะะฝะดะตะบัั ัะฐะฑะปะธัั `education`
--
ALTER TABLE `education`
ADD PRIMARY KEY (`id`) USING BTREE;
--
-- ะะฝะดะตะบัั ัะฐะฑะปะธัั `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`),
ADD KEY `education_id` (`education_id`);
--
-- ะะฝะดะตะบัั ัะฐะฑะปะธัั `user_city`
--
ALTER TABLE `user_city`
ADD KEY `user_id` (`user_id`) USING BTREE,
ADD KEY `city_id` (`city_id`) USING BTREE;
--
-- AUTO_INCREMENT ะดะปั ัะพั
ัะฐะฝัะฝะฝัั
ัะฐะฑะปะธั
--
--
-- AUTO_INCREMENT ะดะปั ัะฐะฑะปะธัั `cities`
--
ALTER TABLE `cities`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21;
--
-- AUTO_INCREMENT ะดะปั ัะฐะฑะปะธัั `education`
--
ALTER TABLE `education`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
--
-- AUTO_INCREMENT ะดะปั ัะฐะฑะปะธัั `users`
--
ALTER TABLE `users`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
--
-- ะะณัะฐะฝะธัะตะฝะธั ะฒะฝะตัะฝะตะณะพ ะบะปััะฐ ัะพั
ัะฐะฝะตะฝะฝัั
ัะฐะฑะปะธั
--
--
-- ะะณัะฐะฝะธัะตะฝะธั ะฒะฝะตัะฝะตะณะพ ะบะปััะฐ ัะฐะฑะปะธัั `users`
--
ALTER TABLE `users`
ADD CONSTRAINT `users_ibfk_1` FOREIGN KEY (`education_id`) REFERENCES `education` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION;
--
-- ะะณัะฐะฝะธัะตะฝะธั ะฒะฝะตัะฝะตะณะพ ะบะปััะฐ ัะฐะฑะปะธัั `user_city`
--
ALTER TABLE `user_city`
ADD CONSTRAINT `user_city_ibfk_1` FOREIGN KEY (`city_id`) REFERENCES `cities` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `user_city_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
/*!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 */;
|
use tinnitus_talks;
create table fundraisers (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(64),
description longtext,
address VARCHAR(64),
city VARCHAR(64),
state VARCHAR(64),
zip VARCHAR(12),
contact_person VARCHAR(64),
contact_email VARCHAR(64),
contact_phone VARCHAR(64),
date_start DATETIME,
date_end DATETIME
);
|
WINDOW w AS (
PARTITION BY user_id
ORDER BY
start_date,
paid_through_date,
end_date ROWS BETWEEN UNBOUNDED PRECEDING
AND UNBOUNDED FOLLOWING
); |
/*
Navicat MySQL Data Transfer
Source Server : test
Source Server Version : 50610
Source Host : localhost:3306
Source Database : crm
Target Server Type : MYSQL
Target Server Version : 50610
File Encoding : 65001
Date: 2016-04-12 20:43:13
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for `sys_menu`
-- ----------------------------
DROP TABLE IF EXISTS `sys_menu`;
CREATE TABLE `sys_menu` (
`menubs` varchar(100) NOT NULL,
`menuname` varchar(255) NOT NULL,
`menuid` varchar(60) NOT NULL,
`parentid` varchar(60) NOT NULL,
`url` varchar(200) NOT NULL,
`level` int(1) NOT NULL,
`rank` int(1) NOT NULL,
`path` varchar(100) DEFAULT NULL,
`createtime` varchar(14) DEFAULT NULL,
`isleaf` int(1) NOT NULL,
`bz` varchar(500) DEFAULT NULL,
`parentbs` varchar(100) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of sys_menu
-- ----------------------------
INSERT INTO `sys_menu` VALUES ('MENUROOT', '็ณป็ป่ๅ', '7ca93b129c1345da8cb5c4a94c1c2d8e', '-1', '', '1', '1', 'ls', '20160406142342', '0', 'no forget', '-1');
INSERT INTO `sys_menu` VALUES ('KHGL', 'ๅฎขๆท็ฎก็', '402881e7540a36cb01540a3e1cbb0003', '7ca93b129c1345da8cb5c4a94c1c2d8e', 'testurl', '1', '-1', 'ls', '20160412202554', '0', 'ๅฎขๆท็ฎก็', 'MENUROOT');
INSERT INTO `sys_menu` VALUES ('JXGL', '็ปฉๆ็ฎก็', '402881e7540a36cb01540a3e7f610004', '7ca93b129c1345da8cb5c4a94c1c2d8e', 'testurl', '1', '-1', 'ls', '20160412202724', '0', '็ปฉๆ็ฎก็', 'MENUROOT');
INSERT INTO `sys_menu` VALUES ('YHGL', '็จๆท็ฎก็', '402881e7540a36cb01540a51980e0007', '7ca93b129c1345da8cb5c4a94c1c2d8e', 'TESTURL', '1', '-1', 'ls', '20160412202812', '0', '็ณป็ป็จๆท็ฎก็๏ผๅ
้จๅๅทฅไฝฟ็จ๏ผไธๅฏนๅค', 'MENUROOT');
INSERT INTO `sys_menu` VALUES ('BGKH', 'ๅฎขๆทๅๆด', '402881e7540a6cd801540a6d73790000', '402881e7540a36cb01540a3e1cbb0003', 'URL', '1', '-1', 'ls', '20160412203644', '1', 'ๅฎขๆทไฟกๆฏๅๆด', 'KHGL');
INSERT INTO `sys_menu` VALUES ('JSGL', '่ง่ฒ็ฎก็', '402881e7540a6cd801540a7212100001', '7ca93b129c1345da8cb5c4a94c1c2d8e', 'url', '1', '-1', 'ls', '20160412202943', '0', '่ง่ฒ็ฎก็๏ผๅขๅ ็ณป็ป่ง่ฒ', 'MENUROOT');
INSERT INTO `sys_menu` VALUES ('BMGL', '้จ้จ็ฎก็', '402881e7540a6cd801540a72a0360002', '7ca93b129c1345da8cb5c4a94c1c2d8e', 'url', '1', '-1', 'ls', '20160412202952', '0', '้จ้จ็ฎก็๏ผๆๅกๅคงๅ
ฌๅธ', 'MENUROOT');
INSERT INTO `sys_menu` VALUES ('XZKH', 'ๆฐๅขๅฎขๆท', '402881e7540a6cd801540a73d8800003', '402881e7540a36cb01540a3e1cbb0003', 'URL', '1', '2', 'ls', '20160412203044', '1', 'ๆฐๅขๅฎขๆท๏ผๆฅๆบๅ
ๆฌๅค็ฝๆณจๅๅๅ
็ฝๆทปๅ ', 'KHGL');
INSERT INTO `sys_menu` VALUES ('MKPI', 'ๆๅบฆ็ฎๆ ', '402881e7540a6cd801540a75dc380004', '402881e7540a36cb01540a3e7f610004', 'URL', '1', '1', 'ls', '20160412203256', '0', 'ๆๅบฆ็ฎๆ ๅกซๅ', 'JXGL');
INSERT INTO `sys_menu` VALUES ('WKPI', 'ๅจๅบฆ็ฎๆ ', '402881e7540a6cd801540a769f570005', '402881e7540a36cb01540a3e7f610004', 'URL', '1', '2', 'ls', '20160412203346', '1', 'ๅจ็ปฉๆ่ๆ ธ', 'JXGL');
INSERT INTO `sys_menu` VALUES ('SKPI', 'ๅญฃๅบฆ็ฎๆ ', '402881e7540a6cd801540a7758560006', '402881e7540a36cb01540a3e7f610004', 'URL', '1', '-1', 'ls', '20160412203523', '1', 'ๅญฃๅบฆ็ฎๆ ่ฎพๅฎ', 'JXGL');
INSERT INTO `sys_menu` VALUES ('YKPI', 'ๅนดๅบฆ็ฎๆ ', '402881e7540a6cd801540a7872cd0007', '402881e7540a36cb01540a3e7f610004', 'URL', '1', '4', 'ls', '20160412203546', '-1', 'ๅนดๅบฆ็ฎๆ ', 'JXGL');
INSERT INTO `sys_menu` VALUES ('XZYH', 'ๆฐๅข็จๆท', '402881e7540a6cd801540a7906310008', '402881e7540a36cb01540a51980e0007', '', '1', '-1', 'ls', '20160412203658', '1', '', 'YHGL');
INSERT INTO `sys_menu` VALUES ('BGYH', 'ๅๆด็จๆท', '402881e7540a6cd801540a79d98e0009', '402881e7540a36cb01540a51980e0007', '', '1', '2', 'ls', '20160412203718', '1', '', 'YHGL');
INSERT INTO `sys_menu` VALUES ('XZJS', 'ๆฐๅข่ง่ฒ', '402881e7540a6cd801540a7a606f000a', '402881e7540a6cd801540a7212100001', '', '1', '1', 'ls', '20160412203752', '1', '', 'JSGL');
INSERT INTO `sys_menu` VALUES ('XZBM', 'ๆฐๅข้จ้จ', '402881e7540a6cd801540a7a9592000b', '402881e7540a6cd801540a72a0360002', '', '1', '-1', 'ls', '20160412204205', '-1', '', 'BMGL');
INSERT INTO `sys_menu` VALUES ('QXFP', 'ๆ้ๅ้
', '402881e7540a6cd801540a7bdb4b000c', '7ca93b129c1345da8cb5c4a94c1c2d8e', 'url', '1', '6', 'ls', '20160412203929', '0', '', 'MENUROOT');
INSERT INTO `sys_menu` VALUES ('JSFP', '่ง่ฒๅ้
', '402881e7540a6cd801540a7c40fe000d', '402881e7540a6cd801540a7bdb4b000c', 'URL', '1', '-1', 'ls', '20160412204010', '1', '', 'QXFP');
|
-- phpMyAdmin SQL Dump
-- version 4.2.12deb2+deb8u2
-- http://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tiempo de generaciรณn: 26-04-2018 a las 18:36:44
-- Versiรณn del servidor: 5.7.20
-- Versiรณn de PHP: 5.6.30-0+deb8u1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!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 utf8 */;
--
-- Base de datos: `neuraltest`
--
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `users`
--
CREATE TABLE IF NOT EXISTS `users` (
`id` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=365 DEFAULT CHARSET=latin1;
--
-- Volcado de datos para la tabla `users`
--
INSERT INTO `users` (`id`, `name`, `password`) VALUES
(361, 'Juan Perez', '321'),
(362, 'Maria Morales', '321'),
(363, 'Ana Ramirez', '321'),
(364, 'Daniel Klie', '123');
--
-- รndices para tablas volcadas
--
--
-- Indices de la tabla `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT de las tablas volcadas
--
--
-- AUTO_INCREMENT de la tabla `users`
--
ALTER TABLE `users`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=365;
/*!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 */;
|
delete from HtmlLabelIndex where id=28624
/
delete from HtmlLabelInfo where indexid=28624
/
INSERT INTO HtmlLabelIndex values(28624,'ๆฅ็่ๅๅฐๅ')
/
INSERT INTO HtmlLabelInfo VALUES(28624,'ๆฅ็่ๅๅฐๅ',7)
/
INSERT INTO HtmlLabelInfo VALUES(28624,'view menu address',8)
/
INSERT INTO HtmlLabelInfo VALUES(28624,'ๆฅ็่ๅฎๅฐๅ',9)
/
delete from HtmlLabelIndex where id=28493
/
delete from HtmlLabelInfo where indexid=28493
/
INSERT INTO HtmlLabelIndex values(28493,'ๅๅปบ่ๅ')
/
INSERT INTO HtmlLabelInfo VALUES(28493,'ๅๅปบ่ๅ',7)
/
INSERT INTO HtmlLabelInfo VALUES(28493,'create menu',8)
/
INSERT INTO HtmlLabelInfo VALUES(28493,'ๅตๅปบ่ๅฎ',9)
/
delete from HtmlLabelIndex where id=28485
/
delete from HtmlLabelInfo where indexid=28485
/
INSERT INTO HtmlLabelIndex values(28485,'ๆจกๅๅ็งฐ')
/
INSERT INTO HtmlLabelInfo VALUES(28485,'ๆจกๅๅ็งฐ',7)
/
INSERT INTO HtmlLabelInfo VALUES(28485,'modename',8)
/
INSERT INTO HtmlLabelInfo VALUES(28485,'ๆจกๅกๅ็จฑ',9)
/
delete from HtmlLabelIndex where id=26137
/
delete from HtmlLabelInfo where indexid=26137
/
INSERT INTO HtmlLabelIndex values(26137,'ๅ
ฑไบซๆ้')
/
INSERT INTO HtmlLabelInfo VALUES(26137,'ๅ
ฑไบซๆ้',7)
/
INSERT INTO HtmlLabelInfo VALUES(26137,'Share Permissions',8)
/
INSERT INTO HtmlLabelInfo VALUES(26137,'ๅ
ฑไบซๆฌ้',9)
/
delete from HtmlLabelIndex where id=28497
/
delete from HtmlLabelInfo where indexid=28497
/
INSERT INTO HtmlLabelIndex values(28497,'่ชๅฎไนๆต่งๆ้ฎ่ฎพ็ฝฎ')
/
INSERT INTO HtmlLabelInfo VALUES(28497,'่ชๅฎไนๆต่งๆ้ฎ่ฎพ็ฝฎ',7)
/
INSERT INTO HtmlLabelInfo VALUES(28497,'Browse button to set the custom',8)
/
INSERT INTO HtmlLabelInfo VALUES(28497,'่ชๅฎ็พฉๆต่ฆฝๆ้่จญ็ฝฎ',9)
/
delete from HtmlLabelIndex where id=28498
/
delete from HtmlLabelInfo where indexid=28498
/
INSERT INTO HtmlLabelIndex values(28498,'่ชๅฎไนๆต่งๆ้ฎๅ็งฐ')
/
INSERT INTO HtmlLabelInfo VALUES(28498,'่ชๅฎไนๆต่งๆ้ฎๅ็งฐ',7)
/
INSERT INTO HtmlLabelInfo VALUES(28498,'The name of the custom browser buttons',8)
/
INSERT INTO HtmlLabelInfo VALUES(28498,'่ชๅฎ็พฉๆต่ฆฝๆ้ๅ็จฑ',9)
/
delete from HtmlLabelIndex where id=28501
/
delete from HtmlLabelInfo where indexid=28501
/
INSERT INTO HtmlLabelIndex values(28501,'ๅฟ
้กป่ฎพ็ฝฎไธไธชๆ ้ขๅญๆฎต๏ผ')
/
INSERT INTO HtmlLabelInfo VALUES(28501,'ๅฟ
้กป่ฎพ็ฝฎไธไธชๆ ้ขๅญๆฎต๏ผ',7)
/
INSERT INTO HtmlLabelInfo VALUES(28501,'Must set up a header field!',8)
/
INSERT INTO HtmlLabelInfo VALUES(28501,'ๅฟ
้ ่จญ็ฝฎไธๅๆ ้กๅญๆฎต๏ผ',9)
/
delete from HtmlLabelIndex where id=26601
/
delete from HtmlLabelInfo where indexid=26601
/
INSERT INTO HtmlLabelIndex values(26601,'ๆน้ๅฏผๅ
ฅ')
/
INSERT INTO HtmlLabelInfo VALUES(26601,'ๆน้ๅฏผๅ
ฅ',7)
/
INSERT INTO HtmlLabelInfo VALUES(26601,'Batch import',8)
/
INSERT INTO HtmlLabelInfo VALUES(26601,'ๆน้ๅฐๅ
ฅ',9)
/
delete from HtmlLabelIndex where id=24960
/
delete from HtmlLabelInfo where indexid=24960
/
INSERT INTO HtmlLabelIndex values(24960,'ๆ็คบไฟกๆฏ')
/
INSERT INTO HtmlLabelInfo VALUES(24960,'ๆ็คบไฟกๆฏ',7)
/
INSERT INTO HtmlLabelInfo VALUES(24960,'prompt information',8)
/
INSERT INTO HtmlLabelInfo VALUES(24960,'ๆ็คบไฟกๆฏ',9)
/
delete from HtmlLabelIndex where id=28595
/
delete from HtmlLabelInfo where indexid=28595
/
INSERT INTO HtmlLabelIndex values(28595,'ๆต็จๅๅปบไบบ')
/
INSERT INTO HtmlLabelInfo VALUES(28595,'ๆต็จๅๅปบไบบ',7)
/
INSERT INTO HtmlLabelInfo VALUES(28595,'workflow creater',8)
/
INSERT INTO HtmlLabelInfo VALUES(28595,'ๆต็จๅตๅปบไบบ',9)
/
delete from HtmlLabelIndex where id=28596
/
delete from HtmlLabelInfo where indexid=28596
/
INSERT INTO HtmlLabelIndex values(28596,'ๆจกๅๅฝๅๆไฝไบบ')
/
INSERT INTO HtmlLabelInfo VALUES(28596,'ๆจกๅๅฝๅๆไฝไบบ',7)
/
INSERT INTO HtmlLabelInfo VALUES(28596,'mode operator',8)
/
INSERT INTO HtmlLabelInfo VALUES(28596,'ๆจกๅก็ถๅๆไฝไบบ',9)
/
delete from HtmlLabelIndex where id=28597
/
delete from HtmlLabelInfo where indexid=28597
/
INSERT INTO HtmlLabelIndex values(28597,'ๆจกๅๅๅปบไบบ')
/
INSERT INTO HtmlLabelInfo VALUES(28597,'ๆจกๅๅๅปบไบบ',7)
/
INSERT INTO HtmlLabelInfo VALUES(28597,'mode creater',8)
/
INSERT INTO HtmlLabelInfo VALUES(28597,'ๆจกๅกๅตๅปบไบบ',9)
/
delete from HtmlLabelIndex where id=28598
/
delete from HtmlLabelInfo where indexid=28598
/
INSERT INTO HtmlLabelIndex values(28598,'ๆจกๅไบบๅ่ตๆบ็ธๅ
ณๅญๆฎต')
/
INSERT INTO HtmlLabelInfo VALUES(28598,'ๆจกๅไบบๅ่ตๆบ็ธๅ
ณๅญๆฎต',7)
/
INSERT INTO HtmlLabelInfo VALUES(28598,'mode resource field',8)
/
INSERT INTO HtmlLabelInfo VALUES(28598,'ๆจกๅกไบบๅ่ณๆบ็ธ้ๅญๆฎต',9)
/
delete from HtmlLabelIndex where id=28600
/
delete from HtmlLabelInfo where indexid=28600
/
INSERT INTO HtmlLabelIndex values(28600,'่ขซ่งฆๅๆต็จๆต็จ็ฑปๅ')
/
INSERT INTO HtmlLabelInfo VALUES(28600,'่ขซ่งฆๅๆต็จๆต็จ็ฑปๅ',7)
/
INSERT INTO HtmlLabelInfo VALUES(28600,'trigger workflow type',8)
/
INSERT INTO HtmlLabelInfo VALUES(28600,'่ขซ่งธ็ผๆต็จๆต็จ้กๅ',9)
/
delete from HtmlLabelIndex where id=28601
/
delete from HtmlLabelInfo where indexid=28601
/
INSERT INTO HtmlLabelIndex values(28601,'ๆจกๅ่งฆๅๆต็จ่ฎพ็ฝฎ')
/
INSERT INTO HtmlLabelInfo VALUES(28601,'ๆจกๅ่งฆๅๆต็จ่ฎพ็ฝฎ',7)
/
INSERT INTO HtmlLabelInfo VALUES(28601,'mode trigger workflow set',8)
/
INSERT INTO HtmlLabelInfo VALUES(28601,'ๆจกๅก่งธ็ผๆต็จ่จญ็ฝฎ',9)
/
delete from HtmlLabelIndex where id=28602
/
delete from HtmlLabelInfo where indexid=28602
/
INSERT INTO HtmlLabelIndex values(28602,'่ขซ่งฆๅๆต็จๅๅปบไบบ')
/
INSERT INTO HtmlLabelInfo VALUES(28602,'่ขซ่งฆๅๆต็จๅๅปบไบบ',7)
/
INSERT INTO HtmlLabelInfo VALUES(28602,'trigger workflow creater',8)
/
INSERT INTO HtmlLabelInfo VALUES(28602,'่ขซ่งธ็ผๆต็จๅตๅปบไบบ',9)
/
delete from HtmlLabelIndex where id=28603
/
delete from HtmlLabelInfo where indexid=28603
/
INSERT INTO HtmlLabelIndex values(28603,'่ขซ่งฆๅๆต็จๆฐๆฎๅฏผๅ
ฅ')
/
INSERT INTO HtmlLabelInfo VALUES(28603,'่ขซ่งฆๅๆต็จๆฐๆฎๅฏผๅ
ฅ',7)
/
INSERT INTO HtmlLabelInfo VALUES(28603,'trigger workflow import data',8)
/
INSERT INTO HtmlLabelInfo VALUES(28603,'่ขซ่งธ็ผๆต็จๆธๆๅฐๅ
ฅ',9)
/
delete from HtmlLabelIndex where id=28604
/
delete from HtmlLabelInfo where indexid=28604
/
INSERT INTO HtmlLabelIndex values(28604,'่ขซ่งฆๅๆต็จๅญๆฎต')
/
INSERT INTO HtmlLabelInfo VALUES(28604,'่ขซ่งฆๅๆต็จๅญๆฎต',7)
/
INSERT INTO HtmlLabelInfo VALUES(28604,'trigger workflow field',8)
/
INSERT INTO HtmlLabelInfo VALUES(28604,'่ขซ่งธ็ผๆต็จๅญๆฎต',9)
/
delete from HtmlLabelIndex where id=28605
/
delete from HtmlLabelInfo where indexid=28605
/
INSERT INTO HtmlLabelIndex values(28605,'ๆจกๅๅญๆฎต')
/
INSERT INTO HtmlLabelInfo VALUES(28605,'ๆจกๅๅญๆฎต',7)
/
INSERT INTO HtmlLabelInfo VALUES(28605,'mode field',8)
/
INSERT INTO HtmlLabelInfo VALUES(28605,'ๆจกๅกๅญๆฎต',9)
/
delete from HtmlLabelIndex where id=28606
/
delete from HtmlLabelInfo where indexid=28606
/
INSERT INTO HtmlLabelIndex values(28606,'ๆจกๅๆ็ป่กจ')
/
INSERT INTO HtmlLabelInfo VALUES(28606,'ๆจกๅๆ็ป่กจ',7)
/
INSERT INTO HtmlLabelInfo VALUES(28606,'mode detail table',8)
/
INSERT INTO HtmlLabelInfo VALUES(28606,'ๆจกๅกๆ็ดฐ่กจ',9)
/
delete from HtmlLabelIndex where id=28607
/
delete from HtmlLabelInfo where indexid=28607
/
INSERT INTO HtmlLabelIndex values(28607,'ๆต็จๅฝๅๆไฝไบบ')
/
INSERT INTO HtmlLabelInfo VALUES(28607,'ๆต็จๅฝๅๆไฝไบบ',7)
/
INSERT INTO HtmlLabelInfo VALUES(28607,'The current operation process',8)
/
INSERT INTO HtmlLabelInfo VALUES(28607,'ๆต็จ็ถๅๆไฝไบบ',9)
/
delete from HtmlLabelIndex where id=28608
/
delete from HtmlLabelInfo where indexid=28608
/
INSERT INTO HtmlLabelIndex values(28608,'ๆต็จไบบๅ่ตๆบ็ธๅ
ณๅญๆฎต')
/
INSERT INTO HtmlLabelInfo VALUES(28608,'ๆต็จไบบๅ่ตๆบ็ธๅ
ณๅญๆฎต',7)
/
INSERT INTO HtmlLabelInfo VALUES(28608,'Human resource related field',8)
/
INSERT INTO HtmlLabelInfo VALUES(28608,'ๆต็จไบบๅ่ณๆบ็ธ้ๅญๆฎต',9)
/
delete from HtmlLabelIndex where id=28609
/
delete from HtmlLabelInfo where indexid=28609
/
INSERT INTO HtmlLabelIndex values(28609,'ๆต็จ่ฝฌๆจกๅๆฐๆฎ่ฎพ็ฝฎ')
/
INSERT INTO HtmlLabelInfo VALUES(28609,'ๆต็จ่ฝฌๆจกๅๆฐๆฎ่ฎพ็ฝฎ',7)
/
INSERT INTO HtmlLabelInfo VALUES(28609,'Flow converting module data set',8)
/
INSERT INTO HtmlLabelInfo VALUES(28609,'ๆต็จ่ฝๆจกๅกๆธๆ่จญ็ฝฎ',9)
/
delete from HtmlLabelIndex where id=28625
/
delete from HtmlLabelInfo where indexid=28625
/
INSERT INTO HtmlLabelIndex values(28625,'ๅๅปบๆต่งๆ้ฎ')
/
INSERT INTO HtmlLabelInfo VALUES(28625,'ๅๅปบๆต่งๆ้ฎ',7)
/
INSERT INTO HtmlLabelInfo VALUES(28625,'create browser',8)
/
INSERT INTO HtmlLabelInfo VALUES(28625,'ๅตๅปบๆต่ฆฝๆ้',9)
/
delete from HtmlLabelIndex where id=28626
/
delete from HtmlLabelInfo where indexid=28626
/
INSERT INTO HtmlLabelIndex values(28626,'ๅ้')
/
INSERT INTO HtmlLabelInfo VALUES(28626,'ๅ้',7)
/
INSERT INTO HtmlLabelInfo VALUES(28626,'single',8)
/
INSERT INTO HtmlLabelInfo VALUES(28626,'ๅฎ้ธ',9)
/
delete from HtmlLabelIndex where id=28627
/
delete from HtmlLabelInfo where indexid=28627
/
INSERT INTO HtmlLabelIndex values(28627,'ๅค้')
/
INSERT INTO HtmlLabelInfo VALUES(28627,'ๅค้',7)
/
INSERT INTO HtmlLabelInfo VALUES(28627,'Multi-choice',8)
/
INSERT INTO HtmlLabelInfo VALUES(28627,'ๅค้ธ',9)
/
delete from HtmlLabelIndex where id=28629
/
delete from HtmlLabelInfo where indexid=28629
/
INSERT INTO HtmlLabelIndex values(28629,'ๆต็จๆ้ฎ็ๆ ่ฏๅทฒๅญๅจ๏ผ่ฏทไฟฎๆน')
/
INSERT INTO HtmlLabelInfo VALUES(28629,'ๆต็จๆ้ฎ็ๆ ่ฏๅทฒๅญๅจ๏ผ่ฏทไฟฎๆน',7)
/
INSERT INTO HtmlLabelInfo VALUES(28629,'Process button logo already exists, modify the',8)
/
INSERT INTO HtmlLabelInfo VALUES(28629,'ๆต็จๆ้็ๆ ่ญๅทฒๅญๅจ๏ผ่ซไฟฎๆน',9)
/ |
CREATE TABLE `categoria` (
`id_categoria` INT NOT NULL AUTO_INCREMENT,
`tipo_curso` varchar(70) NOT NULL,
PRIMARY KEY (`id_categoria`)
);
CREATE TABLE `produto` (
`id_produto` INT NOT NULL AUTO_INCREMENT,
`nome_curso` varchar(70) NOT NULL,
`descricao` TEXT NOT NULL,
`custo_monitoria` INT NOT NULL,
`ganho_aula` INT NOT NULL,
`ganho_prova` INT NOT NULL,
`fk_id_categoria` INT NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`id_produto`)
);
CREATE TABLE `usuario` (
`id_usuario` INT NOT NULL AUTO_INCREMENT,
`nome` varchar(70) NOT NULL,
`email` varchar(70) NOT NULL,
`senha` varchar(70) NOT NULL,
`pontuacao` INT NOT NULL,
`curso_estudado` TEXT NOT NULL,
`curso_monitorado` TEXT NOT NULL,
`fk_id_tipo_usuario` TEXT NOT NULL,
`curso_criado` TEXT NOT NULL,
PRIMARY KEY (`id_usuario`)
);
ALTER TABLE `produto` ADD CONSTRAINT `produto_fk0` FOREIGN KEY (`fk_id_categoria`) REFERENCES `categoria`(`id_categoria`);
ALTER TABLE `usuario` ADD CONSTRAINT `usuario_fk0` FOREIGN KEY (`curso_estudado`) REFERENCES `produto`(`id_produto`);
ALTER TABLE `usuario` ADD CONSTRAINT `usuario_fk1` FOREIGN KEY (`curso_monitorado`) REFERENCES `produto`(`id_produto`);
ALTER TABLE `usuario` ADD CONSTRAINT `usuario_fk2` FOREIGN KEY (`fk_id_tipo_usuario`) REFERENCES `tipo_usuario`(`id_tipo_usuario`);
ALTER TABLE `usuario` ADD CONSTRAINT `usuario_fk3` FOREIGN KEY (`curso_criado`) REFERENCES `produto`(`id_produto`);
|
/*Crie um banco de dados para um serviรงo de uma loja de produtos de construรงรฃo, o nome
do banco deverรก ter o seguinte nome db_construindo_a_nossa_vida, onde o sistema
trabalharรก com as informaรงรตes dos produtos desta empresa.*/
CREATE DATABASE db_construindo_a_nossa_vida;
USE db_construindo_a_nossa_vida;
/*Crie uma tabela de categorias utilizando a habilidade de abstraรงรฃo e determine 3 atributos
relevantes do tb_categoria para se trabalhar com o serviรงo deste ecommerce.*/
CREATE TABLE tb_categoria (
id bigint(5) auto_increment,
categoria VARCHAR(255) NOT NULL,
material VARCHAR(255) NOT NULL,
primary key (id)
);
/*Crie uma tabela de tb_produto e utilizando a habilidade de abstraรงรฃo e determine 5
atributos relevantes dos tb_produto para se trabalhar com o serviรงo de uma loja de produtos
(nรฃo esqueรงa de criar a foreign key de tb_categoria nesta tabela).*/
CREATE TABLE tb_produto (
id bigint(5) auto_increment,
nome VARCHAR(255) NOT NULL,
preco double(10,2) NOT NULL,
qtdEstoque int NOT NULL,
categoria_id bigint,
primary key (id),
foreign key (categoria_id) references tb_categoria (id)
);
/*Popule esta tabela Categoria com atรฉ 5 dados.*/
INSERT INTO tb_categoria (categoria, material) VALUES ("Tintas", "Lรกtex PVA");
INSERT INTO tb_categoria (categoria, material) VALUES ("Caideras", "Madeira de Relorestamento");
INSERT INTO tb_categoria (categoria, material) VALUES ("Mesas", "Madeira de Relorestamento");
INSERT INTO tb_categoria (categoria, material) VALUES ("Pisos", "Porcelanato");
INSERT INTO tb_categoria (categoria, material) VALUES ("Sofas", "Linho");
/*Popule esta tabela Produto com atรฉ 8 dados.*/
INSERT INTO tb_produto (nome, preco, qtdEstoque, categoria_id) VALUES ("Tinta Suvinil - Vermelhas", 35.00, 60, 1);
INSERT INTO tb_produto (nome, preco, qtdEstoque, categoria_id) VALUES ("Tinta Coral - Roxa", 32.00, 60, 1);
INSERT INTO tb_produto (nome, preco, qtdEstoque, categoria_id) VALUES ("Kit 4 Cadeiras Retrateis", 119.90, 20, 2);
INSERT INTO tb_produto (nome, preco, qtdEstoque, categoria_id) VALUES ("Mesa Escritorio", 249.90, 20, 3);
INSERT INTO tb_produto (nome, preco, qtdEstoque, categoria_id) VALUES ("Piso Laminado Madeira", 19.00, 2000, 4);
INSERT INTO tb_produto (nome, preco, qtdEstoque, categoria_id) VALUES ("Sofรก Reto New Port", 2200.00, 10, 5);
INSERT INTO tb_produto (nome, preco, qtdEstoque, categoria_id) VALUES ("Tinta Suvinal - Lilas", 35.00, 60, 1);
INSERT INTO tb_produto (nome, preco, qtdEstoque, categoria_id) VALUES ("Piso Laminado Pedra Polida", 25.00, 1000, 4);
/*Faรงa um select que retorne os Produtos com o valor maior do que 50 reais.*/
SELECT * FROM tb_produto WHERE preco > 50;
/*Faรงa um select trazendo os Produtos com valor entre 3 e 60 reais.*/
SELECT * FROM tb_produto WHERE preco BETWEEN 3 AND 60;
/*Faรงa um select utilizando LIKE buscando os Produtos com a letra C.*/
SELECT * FROM tb_produto WHERE nome LIKE "%c%";
/*Faรงa um um select com Inner join entre tabela categoria e produto.*/
SELECT * FROM tb_categoria INNER JOIN tb_produto ON tb_categoria.id = tb_produto.categoria_id;
/*Faรงa um select onde traga todos os Produtos de uma categoria especรญfica (exemplo todos
os produtos que sรฃo da categoria hidrรกulica).*/
SELECT * FROM tb_categoria INNER JOIN tb_produto ON tb_categoria.id = tb_produto.categoria_id WHERE tb_categoria.categoria = "Tintas"; |
/*
Navicat Premium Data Transfer
Source Server : laragon-mongodb-posts
Source Server Type : MongoDB
Source Server Version : 40401
Source Host : localhost:27017
Source Schema : posts
Target Server Type : MongoDB
Target Server Version : 40401
File Encoding : 65001
Date: 16/11/2020 11:03:19
*/
// ----------------------------
// Collection structure for comments
// ----------------------------
db.getCollection("comments").drop();
db.createCollection("comments");
// ----------------------------
// Documents of comments
// ----------------------------
db.getCollection("comments").insert([ {
_id: ObjectId("5f9c7da39c2771d443e1f955"),
videoId: "5f9c763b95981ed151a37e20",
userToken: null,
comment: "awwww they are adorable!",
time: ISODate("2020-10-30T20:54:59.56Z")
} ]);
db.getCollection("comments").insert([ {
_id: ObjectId("5f9f1e04ed47da4545ce2239"),
videoId: "5f9c763b95981ed151a37e20",
userToken: null,
comment: "lol",
time: ISODate("2020-11-01T20:43:48.945Z")
} ]);
db.getCollection("comments").insert([ {
_id: ObjectId("5f9f233d03f76d578bf140dd"),
videoId: "5f9c763b95981ed151a37e20",
userToken: null,
comment: "cute cat!I love Petube!",
time: ISODate("2020-11-01T21:06:05.161Z")
} ]);
db.getCollection("comments").insert([ {
_id: ObjectId("5f9f88f1c9429866a7c549e2"),
videoId: "5f9dff869c622c6c878c2d59",
userToken: null,
comment: "lol",
time: ISODate("2020-11-02T04:20:01.745Z")
} ]);
db.getCollection("comments").insert([ {
_id: ObjectId("5fa0a8a8bd56a6146e78c3bf"),
videoId: "5f9e1eef61cfa35f918a2257",
userToken: null,
comment: "sa",
time: ISODate("2020-11-03T00:47:36.742Z")
} ]);
db.getCollection("comments").insert([ {
_id: ObjectId("5fb071b9c22986bc944d28a0"),
videoId: "5f9c763b95981ed151a37e20",
userToken: null,
comment: "I like them!",
time: ISODate("2020-11-15T00:09:29.986Z")
} ]);
// ----------------------------
// Collection structure for posts
// ----------------------------
db.getCollection("posts").drop();
db.createCollection("posts");
// ----------------------------
// Documents of posts
// ----------------------------
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731c7967a9432d55e8cde"),
text: "you know0",
author: "Xintong0"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731c7967a9432d55e8cdf"),
text: "you know1",
author: "Xintong1"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731c7967a9432d55e8ce0"),
text: "you know2",
author: "Xintong2"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731c7967a9432d55e8ce1"),
text: "you know3",
author: "Xintong3"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731c7967a9432d55e8ce2"),
text: "you know4",
author: "Xintong4"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731c8967a9432d55e8ce3"),
text: "you know5",
author: "Xintong5"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731c8967a9432d55e8ce4"),
text: "you know6",
author: "Xintong6"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731c8967a9432d55e8ce5"),
text: "you know7",
author: "Xintong7"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731c8967a9432d55e8ce6"),
text: "you know8",
author: "Xintong8"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731c8967a9432d55e8ce7"),
text: "you know9",
author: "Xintong9"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731c8967a9432d55e8ce8"),
text: "you know10",
author: "Xintong10"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731c8967a9432d55e8ce9"),
text: "you know11",
author: "Xintong11"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731c8967a9432d55e8cea"),
text: "you know12",
author: "Xintong12"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731c8967a9432d55e8ceb"),
text: "you know13",
author: "Xintong13"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731c8967a9432d55e8cec"),
text: "you know14",
author: "Xintong14"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731c8967a9432d55e8ced"),
text: "you know15",
author: "Xintong15"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731c8967a9432d55e8cee"),
text: "you know16",
author: "Xintong16"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731c8967a9432d55e8cef"),
text: "you know17",
author: "Xintong17"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731c8967a9432d55e8cf0"),
text: "you know18",
author: "Xintong18"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731c8967a9432d55e8cf1"),
text: "you know19",
author: "Xintong19"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731c8967a9432d55e8cf2"),
text: "you know20",
author: "Xintong20"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731c8967a9432d55e8cf3"),
text: "you know21",
author: "Xintong21"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731c8967a9432d55e8cf4"),
text: "you know22",
author: "Xintong22"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731c8967a9432d55e8cf5"),
text: "you know23",
author: "Xintong23"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731c8967a9432d55e8cf6"),
text: "you know24",
author: "Xintong24"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731c8967a9432d55e8cf7"),
text: "you know25",
author: "Xintong25"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731c9967a9432d55e8cf8"),
text: "you know26",
author: "Xintong26"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731c9967a9432d55e8cf9"),
text: "you know27",
author: "Xintong27"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731c9967a9432d55e8cfa"),
text: "you know28",
author: "Xintong28"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731c9967a9432d55e8cfb"),
text: "you know29",
author: "Xintong29"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731c9967a9432d55e8cfc"),
text: "you know30",
author: "Xintong30"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731c9967a9432d55e8cfd"),
text: "you know31",
author: "Xintong31"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731c9967a9432d55e8cfe"),
text: "you know32",
author: "Xintong32"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731c9967a9432d55e8cff"),
text: "you know33",
author: "Xintong33"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731c9967a9432d55e8d00"),
text: "you know34",
author: "Xintong34"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731c9967a9432d55e8d01"),
text: "you know35",
author: "Xintong35"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731c9967a9432d55e8d02"),
text: "you know36",
author: "Xintong36"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731c9967a9432d55e8d03"),
text: "you know37",
author: "Xintong37"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731c9967a9432d55e8d04"),
text: "you know38",
author: "Xintong38"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731c9967a9432d55e8d05"),
text: "you know39",
author: "Xintong39"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731c9967a9432d55e8d06"),
text: "you know40",
author: "Xintong40"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731c9967a9432d55e8d07"),
text: "you know41",
author: "Xintong41"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731c9967a9432d55e8d08"),
text: "you know42",
author: "Xintong42"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731c9967a9432d55e8d09"),
text: "you know43",
author: "Xintong43"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731c9967a9432d55e8d0a"),
text: "you know44",
author: "Xintong44"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731c9967a9432d55e8d0b"),
text: "you know45",
author: "Xintong45"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731c9967a9432d55e8d0c"),
text: "you know46",
author: "Xintong46"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731c9967a9432d55e8d0d"),
text: "you know47",
author: "Xintong47"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731ca967a9432d55e8d0e"),
text: "you know48",
author: "Xintong48"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731ca967a9432d55e8d0f"),
text: "you know49",
author: "Xintong49"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731ca967a9432d55e8d10"),
text: "you know50",
author: "Xintong50"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731ca967a9432d55e8d11"),
text: "you know51",
author: "Xintong51"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731ca967a9432d55e8d12"),
text: "you know52",
author: "Xintong52"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731ca967a9432d55e8d13"),
text: "you know53",
author: "Xintong53"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731ca967a9432d55e8d14"),
text: "you know54",
author: "Xintong54"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731ca967a9432d55e8d15"),
text: "you know55",
author: "Xintong55"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731ca967a9432d55e8d16"),
text: "you know56",
author: "Xintong56"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731ca967a9432d55e8d17"),
text: "you know57",
author: "Xintong57"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731ca967a9432d55e8d18"),
text: "you know58",
author: "Xintong58"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731ca967a9432d55e8d19"),
text: "you know59",
author: "Xintong59"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731ca967a9432d55e8d1a"),
text: "you know60",
author: "Xintong60"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731ca967a9432d55e8d1b"),
text: "you know61",
author: "Xintong61"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731ca967a9432d55e8d1c"),
text: "you know62",
author: "Xintong62"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731ca967a9432d55e8d1d"),
text: "you know63",
author: "Xintong63"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731ca967a9432d55e8d1e"),
text: "you know64",
author: "Xintong64"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731ca967a9432d55e8d1f"),
text: "you know65",
author: "Xintong65"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731ca967a9432d55e8d20"),
text: "you know66",
author: "Xintong66"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731ca967a9432d55e8d21"),
text: "you know67",
author: "Xintong67"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731ca967a9432d55e8d22"),
text: "you know68",
author: "Xintong68"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731ca967a9432d55e8d23"),
text: "you know69",
author: "Xintong69"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731cb967a9432d55e8d24"),
text: "you know70",
author: "Xintong70"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731cb967a9432d55e8d25"),
text: "you know71",
author: "Xintong71"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731cb967a9432d55e8d26"),
text: "you know72",
author: "Xintong72"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731cb967a9432d55e8d27"),
text: "you know73",
author: "Xintong73"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731cb967a9432d55e8d28"),
text: "you know74",
author: "Xintong74"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731cb967a9432d55e8d29"),
text: "you know75",
author: "Xintong75"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731cb967a9432d55e8d2a"),
text: "you know76",
author: "Xintong76"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731cb967a9432d55e8d2b"),
text: "you know77",
author: "Xintong77"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731cb967a9432d55e8d2c"),
text: "you know78",
author: "Xintong78"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731cb967a9432d55e8d2d"),
text: "you know79",
author: "Xintong79"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731cb967a9432d55e8d2e"),
text: "you know80",
author: "Xintong80"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731cb967a9432d55e8d2f"),
text: "you know81",
author: "Xintong81"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731cb967a9432d55e8d30"),
text: "you know82",
author: "Xintong82"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731cb967a9432d55e8d31"),
text: "you know83",
author: "Xintong83"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731cb967a9432d55e8d32"),
text: "you know84",
author: "Xintong84"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731cb967a9432d55e8d33"),
text: "you know85",
author: "Xintong85"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731cb967a9432d55e8d34"),
text: "you know86",
author: "Xintong86"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731cb967a9432d55e8d35"),
text: "you know87",
author: "Xintong87"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731cb967a9432d55e8d36"),
text: "you know88",
author: "Xintong88"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731cb967a9432d55e8d37"),
text: "you know89",
author: "Xintong89"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731cb967a9432d55e8d38"),
text: "you know90",
author: "Xintong90"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731cb967a9432d55e8d39"),
text: "you know91",
author: "Xintong91"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731cb967a9432d55e8d3a"),
text: "you know92",
author: "Xintong92"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731cc967a9432d55e8d3b"),
text: "you know93",
author: "Xintong93"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731cc967a9432d55e8d3c"),
text: "you know94",
author: "Xintong94"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731cc967a9432d55e8d3d"),
text: "you know95",
author: "Xintong95"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731cc967a9432d55e8d3e"),
text: "you know96",
author: "Xintong96"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731cc967a9432d55e8d3f"),
text: "you know97",
author: "Xintong97"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731cc967a9432d55e8d40"),
text: "you know98",
author: "Xintong98"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731cc967a9432d55e8d41"),
text: "you know99",
author: "Xintong99"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9731e3967a9432d55e8d42"),
author: "dasd",
text: "das"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f973217967a9432d55e8d43"),
author: "tiezhou duan",
text: "tiezhou duan test"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9737a9967a9432d55e8d44"),
author: "Michelle testing",
text: "testing"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f973c69967a9432d55e8d45"),
author: "Bichon Tori",
text: "https://www.instagram.com/p/CGNThbvpTx-/?utm_source=ig_web_button_share_sheet"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f973d48967a9432d55e8d46"),
author: "bichon whoohoo",
text: "https://www.instagram.com/p/CBSceYnnLfK/?igshid=lip99ewum9yb"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f974810967a9432d55e8d47"),
author: "lol",
text: "lol testing"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487b5f25ab37153de4ac"),
text: "you know0",
author: "Xintong0"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487b5f25ab37153de4ad"),
text: "you know1",
author: "Xintong1"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487b5f25ab37153de4ae"),
text: "you know2",
author: "Xintong2"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487b5f25ab37153de4af"),
text: "you know3",
author: "Xintong3"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487b5f25ab37153de4b0"),
text: "you know4",
author: "Xintong4"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487b5f25ab37153de4b1"),
text: "you know5",
author: "Xintong5"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487b5f25ab37153de4b2"),
text: "you know6",
author: "Xintong6"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487c5f25ab37153de4b3"),
text: "you know7",
author: "Xintong7"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487c5f25ab37153de4b4"),
text: "you know8",
author: "Xintong8"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487c5f25ab37153de4b5"),
text: "you know9",
author: "Xintong9"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487c5f25ab37153de4b6"),
text: "you know10",
author: "Xintong10"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487c5f25ab37153de4b7"),
text: "you know11",
author: "Xintong11"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487c5f25ab37153de4b8"),
text: "you know12",
author: "Xintong12"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487c5f25ab37153de4b9"),
text: "you know13",
author: "Xintong13"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487c5f25ab37153de4ba"),
text: "you know14",
author: "Xintong14"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487c5f25ab37153de4bb"),
text: "you know15",
author: "Xintong15"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487c5f25ab37153de4bc"),
text: "you know16",
author: "Xintong16"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487c5f25ab37153de4bd"),
text: "you know17",
author: "Xintong17"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487c5f25ab37153de4be"),
text: "you know18",
author: "Xintong18"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487c5f25ab37153de4bf"),
text: "you know19",
author: "Xintong19"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487c5f25ab37153de4c0"),
text: "you know20",
author: "Xintong20"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487c5f25ab37153de4c1"),
text: "you know21",
author: "Xintong21"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487c5f25ab37153de4c2"),
text: "you know22",
author: "Xintong22"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487c5f25ab37153de4c3"),
text: "you know23",
author: "Xintong23"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487c5f25ab37153de4c4"),
text: "you know24",
author: "Xintong24"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487c5f25ab37153de4c5"),
text: "you know25",
author: "Xintong25"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487c5f25ab37153de4c6"),
text: "you know26",
author: "Xintong26"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487c5f25ab37153de4c7"),
text: "you know27",
author: "Xintong27"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487c5f25ab37153de4c8"),
text: "you know28",
author: "Xintong28"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487c5f25ab37153de4c9"),
text: "you know29",
author: "Xintong29"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487c5f25ab37153de4ca"),
text: "you know30",
author: "Xintong30"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487d5f25ab37153de4cb"),
text: "you know31",
author: "Xintong31"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487d5f25ab37153de4cc"),
text: "you know32",
author: "Xintong32"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487d5f25ab37153de4cd"),
text: "you know33",
author: "Xintong33"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487d5f25ab37153de4ce"),
text: "you know34",
author: "Xintong34"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487d5f25ab37153de4cf"),
text: "you know35",
author: "Xintong35"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487d5f25ab37153de4d0"),
text: "you know36",
author: "Xintong36"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487d5f25ab37153de4d1"),
text: "you know37",
author: "Xintong37"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487d5f25ab37153de4d2"),
text: "you know38",
author: "Xintong38"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487d5f25ab37153de4d3"),
text: "you know39",
author: "Xintong39"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487d5f25ab37153de4d4"),
text: "you know40",
author: "Xintong40"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487d5f25ab37153de4d5"),
text: "you know41",
author: "Xintong41"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487d5f25ab37153de4d6"),
text: "you know42",
author: "Xintong42"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487d5f25ab37153de4d7"),
text: "you know43",
author: "Xintong43"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487d5f25ab37153de4d8"),
text: "you know44",
author: "Xintong44"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487d5f25ab37153de4d9"),
text: "you know45",
author: "Xintong45"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487d5f25ab37153de4da"),
text: "you know46",
author: "Xintong46"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487d5f25ab37153de4db"),
text: "you know47",
author: "Xintong47"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487d5f25ab37153de4dc"),
text: "you know48",
author: "Xintong48"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487d5f25ab37153de4dd"),
text: "you know49",
author: "Xintong49"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487d5f25ab37153de4de"),
text: "you know50",
author: "Xintong50"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487d5f25ab37153de4df"),
text: "you know51",
author: "Xintong51"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487d5f25ab37153de4e0"),
text: "you know52",
author: "Xintong52"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487d5f25ab37153de4e1"),
text: "you know53",
author: "Xintong53"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487d5f25ab37153de4e2"),
text: "you know54",
author: "Xintong54"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487e5f25ab37153de4e3"),
text: "you know55",
author: "Xintong55"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487e5f25ab37153de4e4"),
text: "you know56",
author: "Xintong56"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487e5f25ab37153de4e5"),
text: "you know57",
author: "Xintong57"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487e5f25ab37153de4e6"),
text: "you know58",
author: "Xintong58"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487e5f25ab37153de4e7"),
text: "you know59",
author: "Xintong59"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487e5f25ab37153de4e8"),
text: "you know60",
author: "Xintong60"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487e5f25ab37153de4e9"),
text: "you know61",
author: "Xintong61"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487e5f25ab37153de4ea"),
text: "you know62",
author: "Xintong62"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487e5f25ab37153de4eb"),
text: "you know63",
author: "Xintong63"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487e5f25ab37153de4ec"),
text: "you know64",
author: "Xintong64"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487e5f25ab37153de4ed"),
text: "you know65",
author: "Xintong65"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487e5f25ab37153de4ee"),
text: "you know66",
author: "Xintong66"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487e5f25ab37153de4ef"),
text: "you know67",
author: "Xintong67"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487e5f25ab37153de4f0"),
text: "you know68",
author: "Xintong68"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487e5f25ab37153de4f1"),
text: "you know69",
author: "Xintong69"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487e5f25ab37153de4f2"),
text: "you know70",
author: "Xintong70"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487e5f25ab37153de4f3"),
text: "you know71",
author: "Xintong71"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487e5f25ab37153de4f4"),
text: "you know72",
author: "Xintong72"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487e5f25ab37153de4f5"),
text: "you know73",
author: "Xintong73"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487e5f25ab37153de4f6"),
text: "you know74",
author: "Xintong74"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487e5f25ab37153de4f7"),
text: "you know75",
author: "Xintong75"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487e5f25ab37153de4f8"),
text: "you know76",
author: "Xintong76"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487e5f25ab37153de4f9"),
text: "you know77",
author: "Xintong77"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487e5f25ab37153de4fa"),
text: "you know78",
author: "Xintong78"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487f5f25ab37153de4fb"),
text: "you know79",
author: "Xintong79"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487f5f25ab37153de4fc"),
text: "you know80",
author: "Xintong80"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487f5f25ab37153de4fd"),
text: "you know81",
author: "Xintong81"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487f5f25ab37153de4fe"),
text: "you know82",
author: "Xintong82"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487f5f25ab37153de4ff"),
text: "you know83",
author: "Xintong83"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487f5f25ab37153de500"),
text: "you know84",
author: "Xintong84"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487f5f25ab37153de501"),
text: "you know85",
author: "Xintong85"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487f5f25ab37153de502"),
text: "you know86",
author: "Xintong86"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487f5f25ab37153de503"),
text: "you know87",
author: "Xintong87"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487f5f25ab37153de504"),
text: "you know88",
author: "Xintong88"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487f5f25ab37153de505"),
text: "you know89",
author: "Xintong89"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487f5f25ab37153de506"),
text: "you know90",
author: "Xintong90"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487f5f25ab37153de507"),
text: "you know91",
author: "Xintong91"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487f5f25ab37153de508"),
text: "you know92",
author: "Xintong92"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487f5f25ab37153de509"),
text: "you know93",
author: "Xintong93"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487f5f25ab37153de50a"),
text: "you know94",
author: "Xintong94"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487f5f25ab37153de50b"),
text: "you know95",
author: "Xintong95"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487f5f25ab37153de50c"),
text: "you know96",
author: "Xintong96"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487f5f25ab37153de50d"),
text: "you know97",
author: "Xintong97"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487f5f25ab37153de50e"),
text: "you know98",
author: "Xintong98"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97487f5f25ab37153de50f"),
text: "you know99",
author: "Xintong99"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749030d45273736b11692"),
text: "you know0",
author: "Xintong0"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749030d45273736b11693"),
text: "you know1",
author: "Xintong1"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749030d45273736b11694"),
text: "you know2",
author: "Xintong2"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749030d45273736b11695"),
text: "you know3",
author: "Xintong3"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749030d45273736b11696"),
text: "you know4",
author: "Xintong4"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749040d45273736b11697"),
text: "you know5",
author: "Xintong5"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749040d45273736b11698"),
text: "you know6",
author: "Xintong6"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749040d45273736b11699"),
text: "you know7",
author: "Xintong7"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749040d45273736b1169a"),
text: "you know8",
author: "Xintong8"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749040d45273736b1169b"),
text: "you know9",
author: "Xintong9"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749040d45273736b1169c"),
text: "you know10",
author: "Xintong10"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749040d45273736b1169d"),
text: "you know11",
author: "Xintong11"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749040d45273736b1169e"),
text: "you know12",
author: "Xintong12"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749050d45273736b1169f"),
text: "you know13",
author: "Xintong13"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749050d45273736b116a0"),
text: "you know14",
author: "Xintong14"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749050d45273736b116a1"),
text: "you know15",
author: "Xintong15"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749050d45273736b116a2"),
text: "you know16",
author: "Xintong16"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749050d45273736b116a3"),
text: "you know17",
author: "Xintong17"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749050d45273736b116a4"),
text: "you know18",
author: "Xintong18"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749060d45273736b116a5"),
text: "you know19",
author: "Xintong19"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749060d45273736b116a6"),
text: "you know20",
author: "Xintong20"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749060d45273736b116a7"),
text: "you know21",
author: "Xintong21"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749060d45273736b116a8"),
text: "you know22",
author: "Xintong22"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749060d45273736b116a9"),
text: "you know23",
author: "Xintong23"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749060d45273736b116aa"),
text: "you know24",
author: "Xintong24"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749060d45273736b116ab"),
text: "you know25",
author: "Xintong25"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749060d45273736b116ac"),
text: "you know26",
author: "Xintong26"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749060d45273736b116ad"),
text: "you know27",
author: "Xintong27"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749060d45273736b116ae"),
text: "you know28",
author: "Xintong28"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749060d45273736b116af"),
text: "you know29",
author: "Xintong29"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749070d45273736b116b0"),
text: "you know30",
author: "Xintong30"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749070d45273736b116b1"),
text: "you know31",
author: "Xintong31"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749070d45273736b116b2"),
text: "you know32",
author: "Xintong32"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749070d45273736b116b3"),
text: "you know33",
author: "Xintong33"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749070d45273736b116b4"),
text: "you know34",
author: "Xintong34"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749070d45273736b116b5"),
text: "you know35",
author: "Xintong35"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749070d45273736b116b6"),
text: "you know36",
author: "Xintong36"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749070d45273736b116b7"),
text: "you know37",
author: "Xintong37"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749070d45273736b116b8"),
text: "you know38",
author: "Xintong38"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749070d45273736b116b9"),
text: "you know39",
author: "Xintong39"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749070d45273736b116ba"),
text: "you know40",
author: "Xintong40"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749070d45273736b116bb"),
text: "you know41",
author: "Xintong41"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749070d45273736b116bc"),
text: "you know42",
author: "Xintong42"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749070d45273736b116bd"),
text: "you know43",
author: "Xintong43"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749070d45273736b116be"),
text: "you know44",
author: "Xintong44"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749070d45273736b116bf"),
text: "you know45",
author: "Xintong45"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749070d45273736b116c0"),
text: "you know46",
author: "Xintong46"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749070d45273736b116c1"),
text: "you know47",
author: "Xintong47"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749070d45273736b116c2"),
text: "you know48",
author: "Xintong48"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749070d45273736b116c3"),
text: "you know49",
author: "Xintong49"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749070d45273736b116c4"),
text: "you know50",
author: "Xintong50"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749070d45273736b116c5"),
text: "you know51",
author: "Xintong51"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749070d45273736b116c6"),
text: "you know52",
author: "Xintong52"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749080d45273736b116c7"),
text: "you know53",
author: "Xintong53"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749080d45273736b116c8"),
text: "you know54",
author: "Xintong54"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749080d45273736b116c9"),
text: "you know55",
author: "Xintong55"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749080d45273736b116ca"),
text: "you know56",
author: "Xintong56"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749080d45273736b116cb"),
text: "you know57",
author: "Xintong57"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749080d45273736b116cc"),
text: "you know58",
author: "Xintong58"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749080d45273736b116cd"),
text: "you know59",
author: "Xintong59"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749080d45273736b116ce"),
text: "you know60",
author: "Xintong60"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749080d45273736b116cf"),
text: "you know61",
author: "Xintong61"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749080d45273736b116d0"),
text: "you know62",
author: "Xintong62"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749080d45273736b116d1"),
text: "you know63",
author: "Xintong63"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749080d45273736b116d2"),
text: "you know64",
author: "Xintong64"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749080d45273736b116d3"),
text: "you know65",
author: "Xintong65"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749080d45273736b116d4"),
text: "you know66",
author: "Xintong66"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749080d45273736b116d5"),
text: "you know67",
author: "Xintong67"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749080d45273736b116d6"),
text: "you know68",
author: "Xintong68"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749080d45273736b116d7"),
text: "you know69",
author: "Xintong69"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749080d45273736b116d8"),
text: "you know70",
author: "Xintong70"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749080d45273736b116d9"),
text: "you know71",
author: "Xintong71"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749080d45273736b116da"),
text: "you know72",
author: "Xintong72"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749080d45273736b116db"),
text: "you know73",
author: "Xintong73"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749080d45273736b116dc"),
text: "you know74",
author: "Xintong74"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749080d45273736b116dd"),
text: "you know75",
author: "Xintong75"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749090d45273736b116de"),
text: "you know76",
author: "Xintong76"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749090d45273736b116df"),
text: "you know77",
author: "Xintong77"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749090d45273736b116e0"),
text: "you know78",
author: "Xintong78"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749090d45273736b116e1"),
text: "you know79",
author: "Xintong79"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749090d45273736b116e2"),
text: "you know80",
author: "Xintong80"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749090d45273736b116e3"),
text: "you know81",
author: "Xintong81"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749090d45273736b116e4"),
text: "you know82",
author: "Xintong82"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749090d45273736b116e5"),
text: "you know83",
author: "Xintong83"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749090d45273736b116e6"),
text: "you know84",
author: "Xintong84"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749090d45273736b116e7"),
text: "you know85",
author: "Xintong85"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749090d45273736b116e8"),
text: "you know86",
author: "Xintong86"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749090d45273736b116e9"),
text: "you know87",
author: "Xintong87"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749090d45273736b116ea"),
text: "you know88",
author: "Xintong88"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749090d45273736b116eb"),
text: "you know89",
author: "Xintong89"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749090d45273736b116ec"),
text: "you know90",
author: "Xintong90"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749090d45273736b116ed"),
text: "you know91",
author: "Xintong91"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749090d45273736b116ee"),
text: "you know92",
author: "Xintong92"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749090d45273736b116ef"),
text: "you know93",
author: "Xintong93"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749090d45273736b116f0"),
text: "you know94",
author: "Xintong94"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9749090d45273736b116f1"),
text: "you know95",
author: "Xintong95"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490a419f79373ed27ec5"),
text: "you know0",
author: "Xintong0"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490a419f79373ed27ec6"),
text: "you know1",
author: "Xintong1"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490a419f79373ed27ec7"),
text: "you know2",
author: "Xintong2"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490a419f79373ed27ec8"),
text: "you know3",
author: "Xintong3"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490a419f79373ed27ec9"),
text: "you know4",
author: "Xintong4"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490a419f79373ed27eca"),
text: "you know5",
author: "Xintong5"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490a419f79373ed27ecb"),
text: "you know6",
author: "Xintong6"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490a419f79373ed27ecc"),
text: "you know7",
author: "Xintong7"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490a419f79373ed27ecd"),
text: "you know8",
author: "Xintong8"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490a419f79373ed27ece"),
text: "you know9",
author: "Xintong9"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490b419f79373ed27ecf"),
text: "you know10",
author: "Xintong10"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490b419f79373ed27ed0"),
text: "you know11",
author: "Xintong11"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490b419f79373ed27ed1"),
text: "you know12",
author: "Xintong12"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490b419f79373ed27ed2"),
text: "you know13",
author: "Xintong13"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490b419f79373ed27ed3"),
text: "you know14",
author: "Xintong14"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490b419f79373ed27ed4"),
text: "you know15",
author: "Xintong15"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490b419f79373ed27ed5"),
text: "you know16",
author: "Xintong16"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490b419f79373ed27ed6"),
text: "you know17",
author: "Xintong17"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490b419f79373ed27ed7"),
text: "you know18",
author: "Xintong18"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490b419f79373ed27ed8"),
text: "you know19",
author: "Xintong19"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490b419f79373ed27ed9"),
text: "you know20",
author: "Xintong20"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490b419f79373ed27eda"),
text: "you know21",
author: "Xintong21"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490b419f79373ed27edb"),
text: "you know22",
author: "Xintong22"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490b419f79373ed27edc"),
text: "you know23",
author: "Xintong23"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490b419f79373ed27edd"),
text: "you know24",
author: "Xintong24"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490b419f79373ed27ede"),
text: "you know25",
author: "Xintong25"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490b419f79373ed27edf"),
text: "you know26",
author: "Xintong26"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490b419f79373ed27ee0"),
text: "you know27",
author: "Xintong27"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490b419f79373ed27ee1"),
text: "you know28",
author: "Xintong28"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490b419f79373ed27ee2"),
text: "you know29",
author: "Xintong29"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490b419f79373ed27ee3"),
text: "you know30",
author: "Xintong30"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490b419f79373ed27ee4"),
text: "you know31",
author: "Xintong31"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490b419f79373ed27ee5"),
text: "you know32",
author: "Xintong32"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490c419f79373ed27ee6"),
text: "you know33",
author: "Xintong33"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490c419f79373ed27ee7"),
text: "you know34",
author: "Xintong34"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490c419f79373ed27ee8"),
text: "you know35",
author: "Xintong35"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490c419f79373ed27ee9"),
text: "you know36",
author: "Xintong36"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490c419f79373ed27eea"),
text: "you know37",
author: "Xintong37"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490c419f79373ed27eeb"),
text: "you know38",
author: "Xintong38"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490c419f79373ed27eec"),
text: "you know39",
author: "Xintong39"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490c419f79373ed27eed"),
text: "you know40",
author: "Xintong40"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490c419f79373ed27eee"),
text: "you know41",
author: "Xintong41"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490c419f79373ed27eef"),
text: "you know42",
author: "Xintong42"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490c419f79373ed27ef0"),
text: "you know43",
author: "Xintong43"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490c419f79373ed27ef1"),
text: "you know44",
author: "Xintong44"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490c419f79373ed27ef2"),
text: "you know45",
author: "Xintong45"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490c419f79373ed27ef3"),
text: "you know46",
author: "Xintong46"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490c419f79373ed27ef4"),
text: "you know47",
author: "Xintong47"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490c419f79373ed27ef5"),
text: "you know48",
author: "Xintong48"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490c419f79373ed27ef6"),
text: "you know49",
author: "Xintong49"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490c419f79373ed27ef7"),
text: "you know50",
author: "Xintong50"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490c419f79373ed27ef8"),
text: "you know51",
author: "Xintong51"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490c419f79373ed27ef9"),
text: "you know52",
author: "Xintong52"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490c419f79373ed27efa"),
text: "you know53",
author: "Xintong53"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490c419f79373ed27efb"),
text: "you know54",
author: "Xintong54"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490d419f79373ed27efc"),
text: "you know55",
author: "Xintong55"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490d419f79373ed27efd"),
text: "you know56",
author: "Xintong56"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490d419f79373ed27efe"),
text: "you know57",
author: "Xintong57"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490d419f79373ed27eff"),
text: "you know58",
author: "Xintong58"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490d419f79373ed27f00"),
text: "you know59",
author: "Xintong59"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490d419f79373ed27f01"),
text: "you know60",
author: "Xintong60"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490d419f79373ed27f02"),
text: "you know61",
author: "Xintong61"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490d419f79373ed27f03"),
text: "you know62",
author: "Xintong62"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490d419f79373ed27f04"),
text: "you know63",
author: "Xintong63"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490d419f79373ed27f05"),
text: "you know64",
author: "Xintong64"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490d419f79373ed27f06"),
text: "you know65",
author: "Xintong65"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490d419f79373ed27f07"),
text: "you know66",
author: "Xintong66"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490d419f79373ed27f08"),
text: "you know67",
author: "Xintong67"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490d419f79373ed27f09"),
text: "you know68",
author: "Xintong68"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490d419f79373ed27f0a"),
text: "you know69",
author: "Xintong69"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490d419f79373ed27f0b"),
text: "you know70",
author: "Xintong70"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490d419f79373ed27f0c"),
text: "you know71",
author: "Xintong71"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490d419f79373ed27f0d"),
text: "you know72",
author: "Xintong72"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490d419f79373ed27f0e"),
text: "you know73",
author: "Xintong73"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490d419f79373ed27f0f"),
text: "you know74",
author: "Xintong74"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490d419f79373ed27f10"),
text: "you know75",
author: "Xintong75"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490d419f79373ed27f11"),
text: "you know76",
author: "Xintong76"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490d419f79373ed27f12"),
text: "you know77",
author: "Xintong77"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490d419f79373ed27f13"),
text: "you know78",
author: "Xintong78"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490e419f79373ed27f14"),
text: "you know79",
author: "Xintong79"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490e419f79373ed27f15"),
text: "you know80",
author: "Xintong80"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490e419f79373ed27f16"),
text: "you know81",
author: "Xintong81"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490e419f79373ed27f17"),
text: "you know82",
author: "Xintong82"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490e419f79373ed27f18"),
text: "you know83",
author: "Xintong83"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490e419f79373ed27f19"),
text: "you know84",
author: "Xintong84"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490e419f79373ed27f1a"),
text: "you know85",
author: "Xintong85"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490e419f79373ed27f1b"),
text: "you know86",
author: "Xintong86"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490e419f79373ed27f1c"),
text: "you know87",
author: "Xintong87"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490e419f79373ed27f1d"),
text: "you know88",
author: "Xintong88"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490e419f79373ed27f1e"),
text: "you know89",
author: "Xintong89"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490e419f79373ed27f1f"),
text: "you know90",
author: "Xintong90"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490e419f79373ed27f20"),
text: "you know91",
author: "Xintong91"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490e419f79373ed27f21"),
text: "you know92",
author: "Xintong92"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490e419f79373ed27f22"),
text: "you know93",
author: "Xintong93"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490e419f79373ed27f23"),
text: "you know94",
author: "Xintong94"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490e419f79373ed27f24"),
text: "you know95",
author: "Xintong95"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490e419f79373ed27f25"),
text: "you know96",
author: "Xintong96"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490e419f79373ed27f26"),
text: "you know97",
author: "Xintong97"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490e419f79373ed27f27"),
text: "you know98",
author: "Xintong98"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97490e419f79373ed27f28"),
text: "you know99",
author: "Xintong99"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612b615be6041252be67"),
text: "you know0",
author: "Xintong0"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612b615be6041252be68"),
text: "you know1",
author: "Xintong1"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612b615be6041252be69"),
text: "you know2",
author: "Xintong2"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612c615be6041252be6a"),
text: "you know3",
author: "Xintong3"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612c615be6041252be6b"),
text: "you know4",
author: "Xintong4"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612c615be6041252be6c"),
text: "you know5",
author: "Xintong5"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612c615be6041252be6d"),
text: "you know6",
author: "Xintong6"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612c615be6041252be6e"),
text: "you know7",
author: "Xintong7"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612c615be6041252be6f"),
text: "you know8",
author: "Xintong8"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612c615be6041252be70"),
text: "you know9",
author: "Xintong9"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612c615be6041252be71"),
text: "you know10",
author: "Xintong10"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612c615be6041252be72"),
text: "you know11",
author: "Xintong11"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612c615be6041252be73"),
text: "you know12",
author: "Xintong12"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612c615be6041252be74"),
text: "you know13",
author: "Xintong13"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612c615be6041252be75"),
text: "you know14",
author: "Xintong14"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612c615be6041252be76"),
text: "you know15",
author: "Xintong15"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612c615be6041252be77"),
text: "you know16",
author: "Xintong16"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612c615be6041252be78"),
text: "you know17",
author: "Xintong17"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612c615be6041252be79"),
text: "you know18",
author: "Xintong18"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612c615be6041252be7a"),
text: "you know19",
author: "Xintong19"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612c615be6041252be7b"),
text: "you know20",
author: "Xintong20"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612c615be6041252be7c"),
text: "you know21",
author: "Xintong21"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612c615be6041252be7d"),
text: "you know22",
author: "Xintong22"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612c615be6041252be7e"),
text: "you know23",
author: "Xintong23"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612c615be6041252be7f"),
text: "you know24",
author: "Xintong24"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612d615be6041252be80"),
text: "you know25",
author: "Xintong25"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612d615be6041252be81"),
text: "you know26",
author: "Xintong26"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612d615be6041252be82"),
text: "you know27",
author: "Xintong27"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612d615be6041252be83"),
text: "you know28",
author: "Xintong28"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612d615be6041252be84"),
text: "you know29",
author: "Xintong29"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612d615be6041252be85"),
text: "you know30",
author: "Xintong30"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612d615be6041252be86"),
text: "you know31",
author: "Xintong31"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612d615be6041252be87"),
text: "you know32",
author: "Xintong32"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612d615be6041252be88"),
text: "you know33",
author: "Xintong33"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612d615be6041252be89"),
text: "you know34",
author: "Xintong34"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612d615be6041252be8a"),
text: "you know35",
author: "Xintong35"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612d615be6041252be8b"),
text: "you know36",
author: "Xintong36"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612d615be6041252be8c"),
text: "you know37",
author: "Xintong37"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612d615be6041252be8d"),
text: "you know38",
author: "Xintong38"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612d615be6041252be8e"),
text: "you know39",
author: "Xintong39"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612d615be6041252be8f"),
text: "you know40",
author: "Xintong40"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612d615be6041252be90"),
text: "you know41",
author: "Xintong41"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612d615be6041252be91"),
text: "you know42",
author: "Xintong42"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612d615be6041252be92"),
text: "you know43",
author: "Xintong43"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612d615be6041252be93"),
text: "you know44",
author: "Xintong44"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612e615be6041252be94"),
text: "you know45",
author: "Xintong45"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612e615be6041252be95"),
text: "you know46",
author: "Xintong46"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612e615be6041252be96"),
text: "you know47",
author: "Xintong47"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612e615be6041252be97"),
text: "you know48",
author: "Xintong48"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612e615be6041252be98"),
text: "you know49",
author: "Xintong49"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612e615be6041252be99"),
text: "you know50",
author: "Xintong50"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612e615be6041252be9a"),
text: "you know51",
author: "Xintong51"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612e615be6041252be9b"),
text: "you know52",
author: "Xintong52"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612e615be6041252be9c"),
text: "you know53",
author: "Xintong53"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612e615be6041252be9d"),
text: "you know54",
author: "Xintong54"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612e615be6041252be9e"),
text: "you know55",
author: "Xintong55"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612e615be6041252be9f"),
text: "you know56",
author: "Xintong56"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612e615be6041252bea0"),
text: "you know57",
author: "Xintong57"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612e615be6041252bea1"),
text: "you know58",
author: "Xintong58"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612e615be6041252bea2"),
text: "you know59",
author: "Xintong59"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612e615be6041252bea3"),
text: "you know60",
author: "Xintong60"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612e615be6041252bea4"),
text: "you know61",
author: "Xintong61"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612e615be6041252bea5"),
text: "you know62",
author: "Xintong62"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612e615be6041252bea6"),
text: "you know63",
author: "Xintong63"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612e615be6041252bea7"),
text: "you know64",
author: "Xintong64"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612e615be6041252bea8"),
text: "you know65",
author: "Xintong65"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612e615be6041252bea9"),
text: "you know66",
author: "Xintong66"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612f615be6041252beaa"),
text: "you know67",
author: "Xintong67"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612f615be6041252beab"),
text: "you know68",
author: "Xintong68"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612f615be6041252beac"),
text: "you know69",
author: "Xintong69"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612f615be6041252bead"),
text: "you know70",
author: "Xintong70"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612f615be6041252beae"),
text: "you know71",
author: "Xintong71"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612f615be6041252beaf"),
text: "you know72",
author: "Xintong72"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612f615be6041252beb0"),
text: "you know73",
author: "Xintong73"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612f615be6041252beb1"),
text: "you know74",
author: "Xintong74"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612f615be6041252beb2"),
text: "you know75",
author: "Xintong75"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612f615be6041252beb3"),
text: "you know76",
author: "Xintong76"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612f615be6041252beb4"),
text: "you know77",
author: "Xintong77"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612f615be6041252beb5"),
text: "you know78",
author: "Xintong78"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612f615be6041252beb6"),
text: "you know79",
author: "Xintong79"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612f615be6041252beb7"),
text: "you know80",
author: "Xintong80"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612f615be6041252beb8"),
text: "you know81",
author: "Xintong81"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612f615be6041252beb9"),
text: "you know82",
author: "Xintong82"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612f615be6041252beba"),
text: "you know83",
author: "Xintong83"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612f615be6041252bebb"),
text: "you know84",
author: "Xintong84"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612f615be6041252bebc"),
text: "you know85",
author: "Xintong85"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612f615be6041252bebd"),
text: "you know86",
author: "Xintong86"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612f615be6041252bebe"),
text: "you know87",
author: "Xintong87"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97612f615be6041252bebf"),
text: "you know88",
author: "Xintong88"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976130615be6041252bec0"),
text: "you know89",
author: "Xintong89"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976130615be6041252bec1"),
text: "you know90",
author: "Xintong90"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976130615be6041252bec2"),
text: "you know91",
author: "Xintong91"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976130615be6041252bec3"),
text: "you know92",
author: "Xintong92"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976130615be6041252bec4"),
text: "you know93",
author: "Xintong93"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976130615be6041252bec5"),
text: "you know94",
author: "Xintong94"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976130615be6041252bec6"),
text: "you know95",
author: "Xintong95"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976130615be6041252bec7"),
text: "you know96",
author: "Xintong96"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976130615be6041252bec8"),
text: "you know97",
author: "Xintong97"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976130615be6041252bec9"),
text: "you know98",
author: "Xintong98"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976130615be6041252beca"),
text: "you know99",
author: "Xintong99"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97615a615be6041252becb"),
author: "test",
text: "url"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97625fb86e990430771936"),
text: "you know0",
author: "Xintong0"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976260b86e990430771937"),
text: "you know1",
author: "Xintong1"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976260b86e990430771938"),
text: "you know2",
author: "Xintong2"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976260b86e990430771939"),
text: "you know3",
author: "Xintong3"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976260b86e99043077193a"),
text: "you know4",
author: "Xintong4"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976260b86e99043077193b"),
text: "you know5",
author: "Xintong5"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976260b86e99043077193c"),
text: "you know6",
author: "Xintong6"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976260b86e99043077193d"),
text: "you know7",
author: "Xintong7"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976261b86e99043077193e"),
text: "you know8",
author: "Xintong8"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976261b86e99043077193f"),
text: "you know9",
author: "Xintong9"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976261b86e990430771940"),
text: "you know10",
author: "Xintong10"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976261b86e990430771941"),
text: "you know11",
author: "Xintong11"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976261b86e990430771942"),
text: "you know12",
author: "Xintong12"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976261b86e990430771943"),
text: "you know13",
author: "Xintong13"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976261b86e990430771944"),
text: "you know14",
author: "Xintong14"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976261b86e990430771945"),
text: "you know15",
author: "Xintong15"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976261b86e990430771946"),
text: "you know16",
author: "Xintong16"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976262b86e990430771947"),
text: "you know17",
author: "Xintong17"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976262b86e990430771948"),
text: "you know18",
author: "Xintong18"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976262b86e990430771949"),
text: "you know19",
author: "Xintong19"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976262b86e99043077194a"),
text: "you know20",
author: "Xintong20"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976262b86e99043077194b"),
text: "you know21",
author: "Xintong21"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976262b86e99043077194c"),
text: "you know22",
author: "Xintong22"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976262b86e99043077194d"),
text: "you know23",
author: "Xintong23"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976262b86e99043077194e"),
text: "you know24",
author: "Xintong24"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976262b86e99043077194f"),
text: "you know25",
author: "Xintong25"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976262b86e990430771950"),
text: "you know26",
author: "Xintong26"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976262b86e990430771951"),
text: "you know27",
author: "Xintong27"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976262b86e990430771952"),
text: "you know28",
author: "Xintong28"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976262b86e990430771953"),
text: "you know29",
author: "Xintong29"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976262b86e990430771954"),
text: "you know30",
author: "Xintong30"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976262b86e990430771955"),
text: "you know31",
author: "Xintong31"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976262b86e990430771956"),
text: "you know32",
author: "Xintong32"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976262b86e990430771957"),
text: "you know33",
author: "Xintong33"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976262b86e990430771958"),
text: "you know34",
author: "Xintong34"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976262b86e990430771959"),
text: "you know35",
author: "Xintong35"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976262b86e99043077195a"),
text: "you know36",
author: "Xintong36"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976262b86e99043077195b"),
text: "you know37",
author: "Xintong37"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976262b86e99043077195c"),
text: "you know38",
author: "Xintong38"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976263b86e99043077195d"),
text: "you know39",
author: "Xintong39"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976263b86e99043077195e"),
text: "you know40",
author: "Xintong40"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976263b86e99043077195f"),
text: "you know41",
author: "Xintong41"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976263b86e990430771960"),
text: "you know42",
author: "Xintong42"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976263b86e990430771961"),
text: "you know43",
author: "Xintong43"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976263b86e990430771962"),
text: "you know44",
author: "Xintong44"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976263b86e990430771963"),
text: "you know45",
author: "Xintong45"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976263b86e990430771964"),
text: "you know46",
author: "Xintong46"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976263b86e990430771965"),
text: "you know47",
author: "Xintong47"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976263b86e990430771966"),
text: "you know48",
author: "Xintong48"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976263b86e990430771967"),
text: "you know49",
author: "Xintong49"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976263b86e990430771968"),
text: "you know50",
author: "Xintong50"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976263b86e990430771969"),
text: "you know51",
author: "Xintong51"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976263b86e99043077196a"),
text: "you know52",
author: "Xintong52"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976263b86e99043077196b"),
text: "you know53",
author: "Xintong53"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976263b86e99043077196c"),
text: "you know54",
author: "Xintong54"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976263b86e99043077196d"),
text: "you know55",
author: "Xintong55"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976263b86e99043077196e"),
text: "you know56",
author: "Xintong56"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976263b86e99043077196f"),
text: "you know57",
author: "Xintong57"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976263b86e990430771970"),
text: "you know58",
author: "Xintong58"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976263b86e990430771971"),
text: "you know59",
author: "Xintong59"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976263b86e990430771972"),
text: "you know60",
author: "Xintong60"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976263b86e990430771973"),
text: "you know61",
author: "Xintong61"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976264b86e990430771974"),
text: "you know62",
author: "Xintong62"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976264b86e990430771975"),
text: "you know63",
author: "Xintong63"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976264b86e990430771976"),
text: "you know64",
author: "Xintong64"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976264b86e990430771977"),
text: "you know65",
author: "Xintong65"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976264b86e990430771978"),
text: "you know66",
author: "Xintong66"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976264b86e990430771979"),
text: "you know67",
author: "Xintong67"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976264b86e99043077197a"),
text: "you know68",
author: "Xintong68"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976264b86e99043077197b"),
text: "you know69",
author: "Xintong69"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976264b86e99043077197c"),
text: "you know70",
author: "Xintong70"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976264b86e99043077197d"),
text: "you know71",
author: "Xintong71"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976264b86e99043077197e"),
text: "you know72",
author: "Xintong72"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976264b86e99043077197f"),
text: "you know73",
author: "Xintong73"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976264b86e990430771980"),
text: "you know74",
author: "Xintong74"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976264b86e990430771981"),
text: "you know75",
author: "Xintong75"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976264b86e990430771982"),
text: "you know76",
author: "Xintong76"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976264b86e990430771983"),
text: "you know77",
author: "Xintong77"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976264b86e990430771984"),
text: "you know78",
author: "Xintong78"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976264b86e990430771985"),
text: "you know79",
author: "Xintong79"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976264b86e990430771986"),
text: "you know80",
author: "Xintong80"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976264b86e990430771987"),
text: "you know81",
author: "Xintong81"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976264b86e990430771988"),
text: "you know82",
author: "Xintong82"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976264b86e990430771989"),
text: "you know83",
author: "Xintong83"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976265b86e99043077198a"),
text: "you know84",
author: "Xintong84"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976265b86e99043077198b"),
text: "you know85",
author: "Xintong85"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976265b86e99043077198c"),
text: "you know86",
author: "Xintong86"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976265b86e99043077198d"),
text: "you know87",
author: "Xintong87"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976265b86e99043077198e"),
text: "you know88",
author: "Xintong88"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976265b86e99043077198f"),
text: "you know89",
author: "Xintong89"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976265b86e990430771990"),
text: "you know90",
author: "Xintong90"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976265b86e990430771991"),
text: "you know91",
author: "Xintong91"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976265b86e990430771992"),
text: "you know92",
author: "Xintong92"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976265b86e990430771993"),
text: "you know93",
author: "Xintong93"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976265b86e990430771994"),
text: "you know94",
author: "Xintong94"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976265b86e990430771995"),
text: "you know95",
author: "Xintong95"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976265b86e990430771996"),
text: "you know96",
author: "Xintong96"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976265b86e990430771997"),
text: "you know97",
author: "Xintong97"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976265b86e990430771998"),
text: "you know98",
author: "Xintong98"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976265b86e990430771999"),
text: "you know99",
author: "Xintong99"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976291c796db045f6c3601"),
text: "you know0",
author: "Xintong0"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976291c796db045f6c3602"),
text: "you know1",
author: "Xintong1"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976291c796db045f6c3603"),
text: "you know2",
author: "Xintong2"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976291c796db045f6c3604"),
text: "you know3",
author: "Xintong3"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976291c796db045f6c3605"),
text: "you know4",
author: "Xintong4"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976292c796db045f6c3606"),
text: "you know5",
author: "Xintong5"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976292c796db045f6c3607"),
text: "you know6",
author: "Xintong6"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976292c796db045f6c3608"),
text: "you know7",
author: "Xintong7"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976292c796db045f6c3609"),
text: "you know8",
author: "Xintong8"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976292c796db045f6c360a"),
text: "you know9",
author: "Xintong9"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976292c796db045f6c360b"),
text: "you know10",
author: "Xintong10"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976292c796db045f6c360c"),
text: "you know11",
author: "Xintong11"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976292c796db045f6c360d"),
text: "you know12",
author: "Xintong12"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976292c796db045f6c360e"),
text: "you know13",
author: "Xintong13"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976292c796db045f6c360f"),
text: "you know14",
author: "Xintong14"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976292c796db045f6c3610"),
text: "you know15",
author: "Xintong15"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976292c796db045f6c3611"),
text: "you know16",
author: "Xintong16"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976292c796db045f6c3612"),
text: "you know17",
author: "Xintong17"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976292c796db045f6c3613"),
text: "you know18",
author: "Xintong18"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976292c796db045f6c3614"),
text: "you know19",
author: "Xintong19"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976292c796db045f6c3615"),
text: "you know20",
author: "Xintong20"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976292c796db045f6c3616"),
text: "you know21",
author: "Xintong21"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976292c796db045f6c3617"),
text: "you know22",
author: "Xintong22"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976292c796db045f6c3618"),
text: "you know23",
author: "Xintong23"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976292c796db045f6c3619"),
text: "you know24",
author: "Xintong24"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976292c796db045f6c361a"),
text: "you know25",
author: "Xintong25"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976292c796db045f6c361b"),
text: "you know26",
author: "Xintong26"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976292c796db045f6c361c"),
text: "you know27",
author: "Xintong27"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976292c796db045f6c361d"),
text: "you know28",
author: "Xintong28"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976293c796db045f6c361e"),
text: "you know29",
author: "Xintong29"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976293c796db045f6c361f"),
text: "you know30",
author: "Xintong30"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976293c796db045f6c3620"),
text: "you know31",
author: "Xintong31"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976293c796db045f6c3621"),
text: "you know32",
author: "Xintong32"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976293c796db045f6c3622"),
text: "you know33",
author: "Xintong33"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976293c796db045f6c3623"),
text: "you know34",
author: "Xintong34"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976293c796db045f6c3624"),
text: "you know35",
author: "Xintong35"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976293c796db045f6c3625"),
text: "you know36",
author: "Xintong36"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976293c796db045f6c3626"),
text: "you know37",
author: "Xintong37"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976293c796db045f6c3627"),
text: "you know38",
author: "Xintong38"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976293c796db045f6c3628"),
text: "you know39",
author: "Xintong39"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976293c796db045f6c3629"),
text: "you know40",
author: "Xintong40"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976293c796db045f6c362a"),
text: "you know41",
author: "Xintong41"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976293c796db045f6c362b"),
text: "you know42",
author: "Xintong42"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976293c796db045f6c362c"),
text: "you know43",
author: "Xintong43"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976293c796db045f6c362d"),
text: "you know44",
author: "Xintong44"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976293c796db045f6c362e"),
text: "you know45",
author: "Xintong45"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976293c796db045f6c362f"),
text: "you know46",
author: "Xintong46"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976293c796db045f6c3630"),
text: "you know47",
author: "Xintong47"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976293c796db045f6c3631"),
text: "you know48",
author: "Xintong48"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976293c796db045f6c3632"),
text: "you know49",
author: "Xintong49"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976293c796db045f6c3633"),
text: "you know50",
author: "Xintong50"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976294c796db045f6c3634"),
text: "you know51",
author: "Xintong51"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976294c796db045f6c3635"),
text: "you know52",
author: "Xintong52"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976294c796db045f6c3636"),
text: "you know53",
author: "Xintong53"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976294c796db045f6c3637"),
text: "you know54",
author: "Xintong54"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976294c796db045f6c3638"),
text: "you know55",
author: "Xintong55"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976294c796db045f6c3639"),
text: "you know56",
author: "Xintong56"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976294c796db045f6c363a"),
text: "you know57",
author: "Xintong57"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976294c796db045f6c363b"),
text: "you know58",
author: "Xintong58"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976294c796db045f6c363c"),
text: "you know59",
author: "Xintong59"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976294c796db045f6c363d"),
text: "you know60",
author: "Xintong60"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976294c796db045f6c363e"),
text: "you know61",
author: "Xintong61"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976294c796db045f6c363f"),
text: "you know62",
author: "Xintong62"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976294c796db045f6c3640"),
text: "you know63",
author: "Xintong63"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976294c796db045f6c3641"),
text: "you know64",
author: "Xintong64"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976294c796db045f6c3642"),
text: "you know65",
author: "Xintong65"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976294c796db045f6c3643"),
text: "you know66",
author: "Xintong66"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976294c796db045f6c3644"),
text: "you know67",
author: "Xintong67"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976294c796db045f6c3645"),
text: "you know68",
author: "Xintong68"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976294c796db045f6c3646"),
text: "you know69",
author: "Xintong69"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976295c796db045f6c3647"),
text: "you know70",
author: "Xintong70"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976295c796db045f6c3648"),
text: "you know71",
author: "Xintong71"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976295c796db045f6c3649"),
text: "you know72",
author: "Xintong72"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976295c796db045f6c364a"),
text: "you know73",
author: "Xintong73"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976295c796db045f6c364b"),
text: "you know74",
author: "Xintong74"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976295c796db045f6c364c"),
text: "you know75",
author: "Xintong75"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976295c796db045f6c364d"),
text: "you know76",
author: "Xintong76"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976295c796db045f6c364e"),
text: "you know77",
author: "Xintong77"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976295c796db045f6c364f"),
text: "you know78",
author: "Xintong78"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976295c796db045f6c3650"),
text: "you know79",
author: "Xintong79"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976295c796db045f6c3651"),
text: "you know80",
author: "Xintong80"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976295c796db045f6c3652"),
text: "you know81",
author: "Xintong81"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976295c796db045f6c3653"),
text: "you know82",
author: "Xintong82"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976295c796db045f6c3654"),
text: "you know83",
author: "Xintong83"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976295c796db045f6c3655"),
text: "you know84",
author: "Xintong84"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976295c796db045f6c3656"),
text: "you know85",
author: "Xintong85"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976295c796db045f6c3657"),
text: "you know86",
author: "Xintong86"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976295c796db045f6c3658"),
text: "you know87",
author: "Xintong87"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976295c796db045f6c3659"),
text: "you know88",
author: "Xintong88"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976295c796db045f6c365a"),
text: "you know89",
author: "Xintong89"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976296c796db045f6c365b"),
text: "you know90",
author: "Xintong90"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976296c796db045f6c365c"),
text: "you know91",
author: "Xintong91"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976296c796db045f6c365d"),
text: "you know92",
author: "Xintong92"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976296c796db045f6c365e"),
text: "you know93",
author: "Xintong93"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976296c796db045f6c365f"),
text: "you know94",
author: "Xintong94"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976296c796db045f6c3660"),
text: "you know95",
author: "Xintong95"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976296c796db045f6c3661"),
text: "you know96",
author: "Xintong96"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976296c796db045f6c3662"),
text: "you know97",
author: "Xintong97"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976296c796db045f6c3663"),
text: "you know98",
author: "Xintong98"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976296c796db045f6c3664"),
text: "you know99",
author: "Xintong99"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d4ea0c8a0575e27d3c"),
text: "you know0",
author: "Xintong0"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d4ea0c8a0575e27d3d"),
text: "you know1",
author: "Xintong1"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d4ea0c8a0575e27d3e"),
text: "you know2",
author: "Xintong2"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d4ea0c8a0575e27d3f"),
text: "you know3",
author: "Xintong3"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d4ea0c8a0575e27d40"),
text: "you know4",
author: "Xintong4"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d4ea0c8a0575e27d41"),
text: "you know5",
author: "Xintong5"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d4ea0c8a0575e27d42"),
text: "you know6",
author: "Xintong6"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d4ea0c8a0575e27d43"),
text: "you know7",
author: "Xintong7"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d4ea0c8a0575e27d44"),
text: "you know8",
author: "Xintong8"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d5ea0c8a0575e27d45"),
text: "you know9",
author: "Xintong9"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d5ea0c8a0575e27d46"),
text: "you know10",
author: "Xintong10"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d5ea0c8a0575e27d47"),
text: "you know11",
author: "Xintong11"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d5ea0c8a0575e27d48"),
text: "you know12",
author: "Xintong12"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d5ea0c8a0575e27d49"),
text: "you know13",
author: "Xintong13"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d5ea0c8a0575e27d4a"),
text: "you know14",
author: "Xintong14"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d5ea0c8a0575e27d4b"),
text: "you know15",
author: "Xintong15"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d5ea0c8a0575e27d4c"),
text: "you know16",
author: "Xintong16"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d5ea0c8a0575e27d4d"),
text: "you know17",
author: "Xintong17"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d5ea0c8a0575e27d4e"),
text: "you know18",
author: "Xintong18"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d5ea0c8a0575e27d4f"),
text: "you know19",
author: "Xintong19"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d5ea0c8a0575e27d50"),
text: "you know20",
author: "Xintong20"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d5ea0c8a0575e27d51"),
text: "you know21",
author: "Xintong21"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d5ea0c8a0575e27d52"),
text: "you know22",
author: "Xintong22"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d5ea0c8a0575e27d53"),
text: "you know23",
author: "Xintong23"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d5ea0c8a0575e27d54"),
text: "you know24",
author: "Xintong24"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d5ea0c8a0575e27d55"),
text: "you know25",
author: "Xintong25"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d5ea0c8a0575e27d56"),
text: "you know26",
author: "Xintong26"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d5ea0c8a0575e27d57"),
text: "you know27",
author: "Xintong27"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d5ea0c8a0575e27d58"),
text: "you know28",
author: "Xintong28"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d5ea0c8a0575e27d59"),
text: "you know29",
author: "Xintong29"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d5ea0c8a0575e27d5a"),
text: "you know30",
author: "Xintong30"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d6ea0c8a0575e27d5b"),
text: "you know31",
author: "Xintong31"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d6ea0c8a0575e27d5c"),
text: "you know32",
author: "Xintong32"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d6ea0c8a0575e27d5d"),
text: "you know33",
author: "Xintong33"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d6ea0c8a0575e27d5e"),
text: "you know34",
author: "Xintong34"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d6ea0c8a0575e27d5f"),
text: "you know35",
author: "Xintong35"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d6ea0c8a0575e27d60"),
text: "you know36",
author: "Xintong36"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d6ea0c8a0575e27d61"),
text: "you know37",
author: "Xintong37"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d6ea0c8a0575e27d62"),
text: "you know38",
author: "Xintong38"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d6ea0c8a0575e27d63"),
text: "you know39",
author: "Xintong39"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d6ea0c8a0575e27d64"),
text: "you know40",
author: "Xintong40"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d6ea0c8a0575e27d65"),
text: "you know41",
author: "Xintong41"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d6ea0c8a0575e27d66"),
text: "you know42",
author: "Xintong42"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d6ea0c8a0575e27d67"),
text: "you know43",
author: "Xintong43"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d6ea0c8a0575e27d68"),
text: "you know44",
author: "Xintong44"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d6ea0c8a0575e27d69"),
text: "you know45",
author: "Xintong45"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d6ea0c8a0575e27d6a"),
text: "you know46",
author: "Xintong46"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d6ea0c8a0575e27d6b"),
text: "you know47",
author: "Xintong47"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d6ea0c8a0575e27d6c"),
text: "you know48",
author: "Xintong48"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d6ea0c8a0575e27d6d"),
text: "you know49",
author: "Xintong49"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d6ea0c8a0575e27d6e"),
text: "you know50",
author: "Xintong50"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d6ea0c8a0575e27d6f"),
text: "you know51",
author: "Xintong51"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d6ea0c8a0575e27d70"),
text: "you know52",
author: "Xintong52"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d6ea0c8a0575e27d71"),
text: "you know53",
author: "Xintong53"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d7ea0c8a0575e27d72"),
text: "you know54",
author: "Xintong54"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d7ea0c8a0575e27d73"),
text: "you know55",
author: "Xintong55"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d7ea0c8a0575e27d74"),
text: "you know56",
author: "Xintong56"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d7ea0c8a0575e27d75"),
text: "you know57",
author: "Xintong57"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d7ea0c8a0575e27d76"),
text: "you know58",
author: "Xintong58"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d7ea0c8a0575e27d77"),
text: "you know59",
author: "Xintong59"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d7ea0c8a0575e27d78"),
text: "you know60",
author: "Xintong60"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d7ea0c8a0575e27d79"),
text: "you know61",
author: "Xintong61"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d7ea0c8a0575e27d7a"),
text: "you know62",
author: "Xintong62"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d7ea0c8a0575e27d7b"),
text: "you know63",
author: "Xintong63"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d7ea0c8a0575e27d7c"),
text: "you know64",
author: "Xintong64"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d7ea0c8a0575e27d7d"),
text: "you know65",
author: "Xintong65"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d7ea0c8a0575e27d7e"),
text: "you know66",
author: "Xintong66"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d7ea0c8a0575e27d7f"),
text: "you know67",
author: "Xintong67"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d7ea0c8a0575e27d80"),
text: "you know68",
author: "Xintong68"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d7ea0c8a0575e27d81"),
text: "you know69",
author: "Xintong69"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d7ea0c8a0575e27d82"),
text: "you know70",
author: "Xintong70"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d7ea0c8a0575e27d83"),
text: "you know71",
author: "Xintong71"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d7ea0c8a0575e27d84"),
text: "you know72",
author: "Xintong72"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d7ea0c8a0575e27d85"),
text: "you know73",
author: "Xintong73"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d7ea0c8a0575e27d86"),
text: "you know74",
author: "Xintong74"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d7ea0c8a0575e27d87"),
text: "you know75",
author: "Xintong75"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d7ea0c8a0575e27d88"),
text: "you know76",
author: "Xintong76"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d7ea0c8a0575e27d89"),
text: "you know77",
author: "Xintong77"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d8ea0c8a0575e27d8a"),
text: "you know78",
author: "Xintong78"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d8ea0c8a0575e27d8b"),
text: "you know79",
author: "Xintong79"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d8ea0c8a0575e27d8c"),
text: "you know80",
author: "Xintong80"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d8ea0c8a0575e27d8d"),
text: "you know81",
author: "Xintong81"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d8ea0c8a0575e27d8e"),
text: "you know82",
author: "Xintong82"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d8ea0c8a0575e27d8f"),
text: "you know83",
author: "Xintong83"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d8ea0c8a0575e27d90"),
text: "you know84",
author: "Xintong84"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d8ea0c8a0575e27d91"),
text: "you know85",
author: "Xintong85"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d8ea0c8a0575e27d92"),
text: "you know86",
author: "Xintong86"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d8ea0c8a0575e27d93"),
text: "you know87",
author: "Xintong87"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d8ea0c8a0575e27d94"),
text: "you know88",
author: "Xintong88"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d8ea0c8a0575e27d95"),
text: "you know89",
author: "Xintong89"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d8ea0c8a0575e27d96"),
text: "you know90",
author: "Xintong90"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d8ea0c8a0575e27d97"),
text: "you know91",
author: "Xintong91"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d8ea0c8a0575e27d98"),
text: "you know92",
author: "Xintong92"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d8ea0c8a0575e27d99"),
text: "you know93",
author: "Xintong93"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d8ea0c8a0575e27d9a"),
text: "you know94",
author: "Xintong94"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d8ea0c8a0575e27d9b"),
text: "you know95",
author: "Xintong95"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d8ea0c8a0575e27d9c"),
text: "you know96",
author: "Xintong96"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d8ea0c8a0575e27d9d"),
text: "you know97",
author: "Xintong97"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d8ea0c8a0575e27d9e"),
text: "you know98",
author: "Xintong98"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9764d8ea0c8a0575e27d9f"),
text: "you know99",
author: "Xintong99"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f976679ea0c8a0575e27da0"),
author: "lol",
text: "lol test"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97763fd2134807b65449bb"),
text: "you know0",
author: "Xintong0"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97763fd2134807b65449bc"),
text: "you know1",
author: "Xintong1"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97763fd2134807b65449bd"),
text: "you know2",
author: "Xintong2"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97763fd2134807b65449be"),
text: "you know3",
author: "Xintong3"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97763fd2134807b65449bf"),
text: "you know4",
author: "Xintong4"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97763fd2134807b65449c0"),
text: "you know5",
author: "Xintong5"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97763fd2134807b65449c1"),
text: "you know6",
author: "Xintong6"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97763fd2134807b65449c2"),
text: "you know7",
author: "Xintong7"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97763fd2134807b65449c3"),
text: "you know8",
author: "Xintong8"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97763fd2134807b65449c4"),
text: "you know9",
author: "Xintong9"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97763fd2134807b65449c5"),
text: "you know10",
author: "Xintong10"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97763fd2134807b65449c6"),
text: "you know11",
author: "Xintong11"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97763fd2134807b65449c7"),
text: "you know12",
author: "Xintong12"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97763fd2134807b65449c8"),
text: "you know13",
author: "Xintong13"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97763fd2134807b65449c9"),
text: "you know14",
author: "Xintong14"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97763fd2134807b65449ca"),
text: "you know15",
author: "Xintong15"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97763fd2134807b65449cb"),
text: "you know16",
author: "Xintong16"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97763fd2134807b65449cc"),
text: "you know17",
author: "Xintong17"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97763fd2134807b65449cd"),
text: "you know18",
author: "Xintong18"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977640d2134807b65449ce"),
text: "you know19",
author: "Xintong19"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977640d2134807b65449cf"),
text: "you know20",
author: "Xintong20"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977640d2134807b65449d0"),
text: "you know21",
author: "Xintong21"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977640d2134807b65449d1"),
text: "you know22",
author: "Xintong22"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977640d2134807b65449d2"),
text: "you know23",
author: "Xintong23"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977640d2134807b65449d3"),
text: "you know24",
author: "Xintong24"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977640d2134807b65449d4"),
text: "you know25",
author: "Xintong25"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977640d2134807b65449d5"),
text: "you know26",
author: "Xintong26"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977640d2134807b65449d6"),
text: "you know27",
author: "Xintong27"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977640d2134807b65449d7"),
text: "you know28",
author: "Xintong28"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977640d2134807b65449d8"),
text: "you know29",
author: "Xintong29"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977640d2134807b65449d9"),
text: "you know30",
author: "Xintong30"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977640d2134807b65449da"),
text: "you know31",
author: "Xintong31"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977640d2134807b65449db"),
text: "you know32",
author: "Xintong32"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977640d2134807b65449dc"),
text: "you know33",
author: "Xintong33"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977640d2134807b65449dd"),
text: "you know34",
author: "Xintong34"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977640d2134807b65449de"),
text: "you know35",
author: "Xintong35"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977640d2134807b65449df"),
text: "you know36",
author: "Xintong36"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977640d2134807b65449e0"),
text: "you know37",
author: "Xintong37"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977640d2134807b65449e1"),
text: "you know38",
author: "Xintong38"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977640d2134807b65449e2"),
text: "you know39",
author: "Xintong39"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977640d2134807b65449e3"),
text: "you know40",
author: "Xintong40"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977640d2134807b65449e4"),
text: "you know41",
author: "Xintong41"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977641d2134807b65449e5"),
text: "you know42",
author: "Xintong42"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977641d2134807b65449e6"),
text: "you know43",
author: "Xintong43"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977641d2134807b65449e7"),
text: "you know44",
author: "Xintong44"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977641d2134807b65449e8"),
text: "you know45",
author: "Xintong45"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977641d2134807b65449e9"),
text: "you know46",
author: "Xintong46"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977641d2134807b65449ea"),
text: "you know47",
author: "Xintong47"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977641d2134807b65449eb"),
text: "you know48",
author: "Xintong48"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977641d2134807b65449ec"),
text: "you know49",
author: "Xintong49"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977641d2134807b65449ed"),
text: "you know50",
author: "Xintong50"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977641d2134807b65449ee"),
text: "you know51",
author: "Xintong51"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977641d2134807b65449ef"),
text: "you know52",
author: "Xintong52"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977641d2134807b65449f0"),
text: "you know53",
author: "Xintong53"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977641d2134807b65449f1"),
text: "you know54",
author: "Xintong54"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977641d2134807b65449f2"),
text: "you know55",
author: "Xintong55"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977641d2134807b65449f3"),
text: "you know56",
author: "Xintong56"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977641d2134807b65449f4"),
text: "you know57",
author: "Xintong57"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977641d2134807b65449f5"),
text: "you know58",
author: "Xintong58"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977641d2134807b65449f6"),
text: "you know59",
author: "Xintong59"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977641d2134807b65449f7"),
text: "you know60",
author: "Xintong60"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977641d2134807b65449f8"),
text: "you know61",
author: "Xintong61"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977641d2134807b65449f9"),
text: "you know62",
author: "Xintong62"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977641d2134807b65449fa"),
text: "you know63",
author: "Xintong63"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977641d2134807b65449fb"),
text: "you know64",
author: "Xintong64"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977642d2134807b65449fc"),
text: "you know65",
author: "Xintong65"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977642d2134807b65449fd"),
text: "you know66",
author: "Xintong66"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977642d2134807b65449fe"),
text: "you know67",
author: "Xintong67"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977642d2134807b65449ff"),
text: "you know68",
author: "Xintong68"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977642d2134807b6544a00"),
text: "you know69",
author: "Xintong69"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977642d2134807b6544a01"),
text: "you know70",
author: "Xintong70"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977642d2134807b6544a02"),
text: "you know71",
author: "Xintong71"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977642d2134807b6544a03"),
text: "you know72",
author: "Xintong72"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977642d2134807b6544a04"),
text: "you know73",
author: "Xintong73"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977642d2134807b6544a05"),
text: "you know74",
author: "Xintong74"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977642d2134807b6544a06"),
text: "you know75",
author: "Xintong75"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977642d2134807b6544a07"),
text: "you know76",
author: "Xintong76"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977642d2134807b6544a08"),
text: "you know77",
author: "Xintong77"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977642d2134807b6544a09"),
text: "you know78",
author: "Xintong78"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977642d2134807b6544a0a"),
text: "you know79",
author: "Xintong79"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977642d2134807b6544a0b"),
text: "you know80",
author: "Xintong80"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977642d2134807b6544a0c"),
text: "you know81",
author: "Xintong81"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977642d2134807b6544a0d"),
text: "you know82",
author: "Xintong82"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977642d2134807b6544a0e"),
text: "you know83",
author: "Xintong83"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977642d2134807b6544a0f"),
text: "you know84",
author: "Xintong84"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977642d2134807b6544a10"),
text: "you know85",
author: "Xintong85"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977642d2134807b6544a11"),
text: "you know86",
author: "Xintong86"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977643d2134807b6544a12"),
text: "you know87",
author: "Xintong87"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977643d2134807b6544a13"),
text: "you know88",
author: "Xintong88"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977643d2134807b6544a14"),
text: "you know89",
author: "Xintong89"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977643d2134807b6544a15"),
text: "you know90",
author: "Xintong90"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977643d2134807b6544a16"),
text: "you know91",
author: "Xintong91"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977643d2134807b6544a17"),
text: "you know92",
author: "Xintong92"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977643d2134807b6544a18"),
text: "you know93",
author: "Xintong93"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977643d2134807b6544a19"),
text: "you know94",
author: "Xintong94"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977643d2134807b6544a1a"),
text: "you know95",
author: "Xintong95"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977643d2134807b6544a1b"),
text: "you know96",
author: "Xintong96"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977643d2134807b6544a1c"),
text: "you know97",
author: "Xintong97"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977643d2134807b6544a1d"),
text: "you know98",
author: "Xintong98"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977643d2134807b6544a1e"),
text: "you know99",
author: "Xintong99"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765321b80907c1a46957"),
text: "you know0",
author: "Xintong0"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765321b80907c1a46958"),
text: "you know1",
author: "Xintong1"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765321b80907c1a46959"),
text: "you know2",
author: "Xintong2"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765321b80907c1a4695a"),
text: "you know3",
author: "Xintong3"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765321b80907c1a4695b"),
text: "you know4",
author: "Xintong4"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765321b80907c1a4695c"),
text: "you know5",
author: "Xintong5"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765321b80907c1a4695d"),
text: "you know6",
author: "Xintong6"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765321b80907c1a4695e"),
text: "you know7",
author: "Xintong7"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765321b80907c1a4695f"),
text: "you know8",
author: "Xintong8"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765321b80907c1a46960"),
text: "you know9",
author: "Xintong9"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765321b80907c1a46961"),
text: "you know10",
author: "Xintong10"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765421b80907c1a46962"),
text: "you know11",
author: "Xintong11"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765421b80907c1a46963"),
text: "you know12",
author: "Xintong12"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765421b80907c1a46964"),
text: "you know13",
author: "Xintong13"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765421b80907c1a46965"),
text: "you know14",
author: "Xintong14"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765421b80907c1a46966"),
text: "you know15",
author: "Xintong15"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765421b80907c1a46967"),
text: "you know16",
author: "Xintong16"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765421b80907c1a46968"),
text: "you know17",
author: "Xintong17"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765421b80907c1a46969"),
text: "you know18",
author: "Xintong18"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765421b80907c1a4696a"),
text: "you know19",
author: "Xintong19"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765421b80907c1a4696b"),
text: "you know20",
author: "Xintong20"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765421b80907c1a4696c"),
text: "you know21",
author: "Xintong21"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765421b80907c1a4696d"),
text: "you know22",
author: "Xintong22"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765421b80907c1a4696e"),
text: "you know23",
author: "Xintong23"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765421b80907c1a4696f"),
text: "you know24",
author: "Xintong24"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765421b80907c1a46970"),
text: "you know25",
author: "Xintong25"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765421b80907c1a46971"),
text: "you know26",
author: "Xintong26"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765421b80907c1a46972"),
text: "you know27",
author: "Xintong27"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765421b80907c1a46973"),
text: "you know28",
author: "Xintong28"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765421b80907c1a46974"),
text: "you know29",
author: "Xintong29"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765421b80907c1a46975"),
text: "you know30",
author: "Xintong30"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765421b80907c1a46976"),
text: "you know31",
author: "Xintong31"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765421b80907c1a46977"),
text: "you know32",
author: "Xintong32"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765421b80907c1a46978"),
text: "you know33",
author: "Xintong33"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765421b80907c1a46979"),
text: "you know34",
author: "Xintong34"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765521b80907c1a4697a"),
text: "you know35",
author: "Xintong35"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765521b80907c1a4697b"),
text: "you know36",
author: "Xintong36"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765521b80907c1a4697c"),
text: "you know37",
author: "Xintong37"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765521b80907c1a4697d"),
text: "you know38",
author: "Xintong38"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765521b80907c1a4697e"),
text: "you know39",
author: "Xintong39"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765521b80907c1a4697f"),
text: "you know40",
author: "Xintong40"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765521b80907c1a46980"),
text: "you know41",
author: "Xintong41"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765521b80907c1a46981"),
text: "you know42",
author: "Xintong42"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765521b80907c1a46982"),
text: "you know43",
author: "Xintong43"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765521b80907c1a46983"),
text: "you know44",
author: "Xintong44"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765521b80907c1a46984"),
text: "you know45",
author: "Xintong45"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765521b80907c1a46985"),
text: "you know46",
author: "Xintong46"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765521b80907c1a46986"),
text: "you know47",
author: "Xintong47"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765521b80907c1a46987"),
text: "you know48",
author: "Xintong48"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765521b80907c1a46988"),
text: "you know49",
author: "Xintong49"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765521b80907c1a46989"),
text: "you know50",
author: "Xintong50"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765521b80907c1a4698a"),
text: "you know51",
author: "Xintong51"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765521b80907c1a4698b"),
text: "you know52",
author: "Xintong52"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765521b80907c1a4698c"),
text: "you know53",
author: "Xintong53"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765521b80907c1a4698d"),
text: "you know54",
author: "Xintong54"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765521b80907c1a4698e"),
text: "you know55",
author: "Xintong55"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765521b80907c1a4698f"),
text: "you know56",
author: "Xintong56"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765521b80907c1a46990"),
text: "you know57",
author: "Xintong57"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765621b80907c1a46991"),
text: "you know58",
author: "Xintong58"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765621b80907c1a46992"),
text: "you know59",
author: "Xintong59"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765621b80907c1a46993"),
text: "you know60",
author: "Xintong60"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765621b80907c1a46994"),
text: "you know61",
author: "Xintong61"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765621b80907c1a46995"),
text: "you know62",
author: "Xintong62"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765621b80907c1a46996"),
text: "you know63",
author: "Xintong63"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765621b80907c1a46997"),
text: "you know64",
author: "Xintong64"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765621b80907c1a46998"),
text: "you know65",
author: "Xintong65"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765621b80907c1a46999"),
text: "you know66",
author: "Xintong66"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765621b80907c1a4699a"),
text: "you know67",
author: "Xintong67"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765621b80907c1a4699b"),
text: "you know68",
author: "Xintong68"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765621b80907c1a4699c"),
text: "you know69",
author: "Xintong69"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765621b80907c1a4699d"),
text: "you know70",
author: "Xintong70"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765621b80907c1a4699e"),
text: "you know71",
author: "Xintong71"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765621b80907c1a4699f"),
text: "you know72",
author: "Xintong72"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765621b80907c1a469a0"),
text: "you know73",
author: "Xintong73"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765621b80907c1a469a1"),
text: "you know74",
author: "Xintong74"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765621b80907c1a469a2"),
text: "you know75",
author: "Xintong75"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765621b80907c1a469a3"),
text: "you know76",
author: "Xintong76"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765621b80907c1a469a4"),
text: "you know77",
author: "Xintong77"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765621b80907c1a469a5"),
text: "you know78",
author: "Xintong78"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765621b80907c1a469a6"),
text: "you know79",
author: "Xintong79"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765721b80907c1a469a7"),
text: "you know80",
author: "Xintong80"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765721b80907c1a469a8"),
text: "you know81",
author: "Xintong81"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765721b80907c1a469a9"),
text: "you know82",
author: "Xintong82"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765721b80907c1a469aa"),
text: "you know83",
author: "Xintong83"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765721b80907c1a469ab"),
text: "you know84",
author: "Xintong84"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765721b80907c1a469ac"),
text: "you know85",
author: "Xintong85"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765721b80907c1a469ad"),
text: "you know86",
author: "Xintong86"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765721b80907c1a469ae"),
text: "you know87",
author: "Xintong87"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765721b80907c1a469af"),
text: "you know88",
author: "Xintong88"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765721b80907c1a469b0"),
text: "you know89",
author: "Xintong89"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765721b80907c1a469b1"),
text: "you know90",
author: "Xintong90"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765721b80907c1a469b2"),
text: "you know91",
author: "Xintong91"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765721b80907c1a469b3"),
text: "you know92",
author: "Xintong92"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765721b80907c1a469b4"),
text: "you know93",
author: "Xintong93"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765721b80907c1a469b5"),
text: "you know94",
author: "Xintong94"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765721b80907c1a469b6"),
text: "you know95",
author: "Xintong95"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765721b80907c1a469b7"),
text: "you know96",
author: "Xintong96"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765721b80907c1a469b8"),
text: "you know97",
author: "Xintong97"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765721b80907c1a469b9"),
text: "you know98",
author: "Xintong98"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97765721b80907c1a469ba"),
text: "you know99",
author: "Xintong99"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783274ecca08aa5b9222"),
text: "you know0",
author: "Xintong0"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783274ecca08aa5b9223"),
text: "you know1",
author: "Xintong1"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783274ecca08aa5b9224"),
text: "you know2",
author: "Xintong2"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783274ecca08aa5b9225"),
text: "you know3",
author: "Xintong3"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783274ecca08aa5b9226"),
text: "you know4",
author: "Xintong4"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783274ecca08aa5b9227"),
text: "you know5",
author: "Xintong5"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783274ecca08aa5b9228"),
text: "you know6",
author: "Xintong6"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783274ecca08aa5b9229"),
text: "you know7",
author: "Xintong7"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783274ecca08aa5b922a"),
text: "you know8",
author: "Xintong8"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783274ecca08aa5b922b"),
text: "you know9",
author: "Xintong9"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783274ecca08aa5b922c"),
text: "you know10",
author: "Xintong10"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783274ecca08aa5b922d"),
text: "you know11",
author: "Xintong11"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783274ecca08aa5b922e"),
text: "you know12",
author: "Xintong12"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783274ecca08aa5b922f"),
text: "you know13",
author: "Xintong13"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783274ecca08aa5b9230"),
text: "you know14",
author: "Xintong14"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783274ecca08aa5b9231"),
text: "you know15",
author: "Xintong15"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783374ecca08aa5b9232"),
text: "you know16",
author: "Xintong16"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783374ecca08aa5b9233"),
text: "you know17",
author: "Xintong17"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783374ecca08aa5b9234"),
text: "you know18",
author: "Xintong18"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783374ecca08aa5b9235"),
text: "you know19",
author: "Xintong19"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783374ecca08aa5b9236"),
text: "you know20",
author: "Xintong20"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783374ecca08aa5b9237"),
text: "you know21",
author: "Xintong21"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783374ecca08aa5b9238"),
text: "you know22",
author: "Xintong22"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783374ecca08aa5b9239"),
text: "you know23",
author: "Xintong23"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783374ecca08aa5b923a"),
text: "you know24",
author: "Xintong24"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783374ecca08aa5b923b"),
text: "you know25",
author: "Xintong25"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783374ecca08aa5b923c"),
text: "you know26",
author: "Xintong26"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783374ecca08aa5b923d"),
text: "you know27",
author: "Xintong27"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783374ecca08aa5b923e"),
text: "you know28",
author: "Xintong28"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783374ecca08aa5b923f"),
text: "you know29",
author: "Xintong29"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783374ecca08aa5b9240"),
text: "you know30",
author: "Xintong30"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783374ecca08aa5b9241"),
text: "you know31",
author: "Xintong31"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783374ecca08aa5b9242"),
text: "you know32",
author: "Xintong32"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783374ecca08aa5b9243"),
text: "you know33",
author: "Xintong33"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783374ecca08aa5b9244"),
text: "you know34",
author: "Xintong34"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783374ecca08aa5b9245"),
text: "you know35",
author: "Xintong35"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783374ecca08aa5b9246"),
text: "you know36",
author: "Xintong36"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783374ecca08aa5b9247"),
text: "you know37",
author: "Xintong37"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783374ecca08aa5b9248"),
text: "you know38",
author: "Xintong38"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783374ecca08aa5b9249"),
text: "you know39",
author: "Xintong39"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783474ecca08aa5b924a"),
text: "you know40",
author: "Xintong40"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783474ecca08aa5b924b"),
text: "you know41",
author: "Xintong41"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783474ecca08aa5b924c"),
text: "you know42",
author: "Xintong42"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783474ecca08aa5b924d"),
text: "you know43",
author: "Xintong43"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783474ecca08aa5b924e"),
text: "you know44",
author: "Xintong44"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783474ecca08aa5b924f"),
text: "you know45",
author: "Xintong45"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783474ecca08aa5b9250"),
text: "you know46",
author: "Xintong46"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783474ecca08aa5b9251"),
text: "you know47",
author: "Xintong47"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783474ecca08aa5b9252"),
text: "you know48",
author: "Xintong48"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783474ecca08aa5b9253"),
text: "you know49",
author: "Xintong49"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783474ecca08aa5b9254"),
text: "you know50",
author: "Xintong50"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783474ecca08aa5b9255"),
text: "you know51",
author: "Xintong51"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783474ecca08aa5b9256"),
text: "you know52",
author: "Xintong52"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783474ecca08aa5b9257"),
text: "you know53",
author: "Xintong53"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783474ecca08aa5b9258"),
text: "you know54",
author: "Xintong54"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783474ecca08aa5b9259"),
text: "you know55",
author: "Xintong55"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783474ecca08aa5b925a"),
text: "you know56",
author: "Xintong56"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783474ecca08aa5b925b"),
text: "you know57",
author: "Xintong57"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783474ecca08aa5b925c"),
text: "you know58",
author: "Xintong58"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783474ecca08aa5b925d"),
text: "you know59",
author: "Xintong59"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783474ecca08aa5b925e"),
text: "you know60",
author: "Xintong60"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783474ecca08aa5b925f"),
text: "you know61",
author: "Xintong61"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783474ecca08aa5b9260"),
text: "you know62",
author: "Xintong62"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783574ecca08aa5b9261"),
text: "you know63",
author: "Xintong63"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783574ecca08aa5b9262"),
text: "you know64",
author: "Xintong64"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783574ecca08aa5b9263"),
text: "you know65",
author: "Xintong65"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783574ecca08aa5b9264"),
text: "you know66",
author: "Xintong66"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783574ecca08aa5b9265"),
text: "you know67",
author: "Xintong67"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783574ecca08aa5b9266"),
text: "you know68",
author: "Xintong68"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783574ecca08aa5b9267"),
text: "you know69",
author: "Xintong69"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783574ecca08aa5b9268"),
text: "you know70",
author: "Xintong70"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783574ecca08aa5b9269"),
text: "you know71",
author: "Xintong71"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783574ecca08aa5b926a"),
text: "you know72",
author: "Xintong72"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783574ecca08aa5b926b"),
text: "you know73",
author: "Xintong73"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783574ecca08aa5b926c"),
text: "you know74",
author: "Xintong74"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783574ecca08aa5b926d"),
text: "you know75",
author: "Xintong75"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783574ecca08aa5b926e"),
text: "you know76",
author: "Xintong76"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783574ecca08aa5b926f"),
text: "you know77",
author: "Xintong77"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783574ecca08aa5b9270"),
text: "you know78",
author: "Xintong78"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783574ecca08aa5b9271"),
text: "you know79",
author: "Xintong79"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783574ecca08aa5b9272"),
text: "you know80",
author: "Xintong80"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783574ecca08aa5b9273"),
text: "you know81",
author: "Xintong81"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783574ecca08aa5b9274"),
text: "you know82",
author: "Xintong82"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783574ecca08aa5b9275"),
text: "you know83",
author: "Xintong83"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783574ecca08aa5b9276"),
text: "you know84",
author: "Xintong84"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783574ecca08aa5b9277"),
text: "you know85",
author: "Xintong85"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783674ecca08aa5b9278"),
text: "you know86",
author: "Xintong86"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783674ecca08aa5b9279"),
text: "you know87",
author: "Xintong87"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783674ecca08aa5b927a"),
text: "you know88",
author: "Xintong88"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783674ecca08aa5b927b"),
text: "you know89",
author: "Xintong89"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783674ecca08aa5b927c"),
text: "you know90",
author: "Xintong90"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783674ecca08aa5b927d"),
text: "you know91",
author: "Xintong91"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783674ecca08aa5b927e"),
text: "you know92",
author: "Xintong92"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783674ecca08aa5b927f"),
text: "you know93",
author: "Xintong93"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783674ecca08aa5b9280"),
text: "you know94",
author: "Xintong94"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783674ecca08aa5b9281"),
text: "you know95",
author: "Xintong95"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783674ecca08aa5b9282"),
text: "you know96",
author: "Xintong96"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783674ecca08aa5b9283"),
text: "you know97",
author: "Xintong97"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783674ecca08aa5b9284"),
text: "you know98",
author: "Xintong98"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f97783674ecca08aa5b9285"),
text: "you know99",
author: "Xintong99"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9779be74ecca08aa5b9286"),
author: "test",
text: "<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/ilRbO3pfW7I\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977a8574ecca08aa5b9287"),
author: "test2",
text: "<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/OUTNDbRGX1s\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977bbc74ecca08aa5b9288"),
author: "panda lover",
text: "<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/I-ovzUNno7g\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb42818890a28fe2211"),
text: "you know0",
author: "Xintong0"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb42818890a28fe2212"),
text: "you know1",
author: "Xintong1"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb42818890a28fe2213"),
text: "you know2",
author: "Xintong2"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb42818890a28fe2214"),
text: "you know3",
author: "Xintong3"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb52818890a28fe2215"),
text: "you know4",
author: "Xintong4"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb52818890a28fe2216"),
text: "you know5",
author: "Xintong5"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb52818890a28fe2217"),
text: "you know6",
author: "Xintong6"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb52818890a28fe2218"),
text: "you know7",
author: "Xintong7"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb52818890a28fe2219"),
text: "you know8",
author: "Xintong8"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb52818890a28fe221a"),
text: "you know9",
author: "Xintong9"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb52818890a28fe221b"),
text: "you know10",
author: "Xintong10"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb52818890a28fe221c"),
text: "you know11",
author: "Xintong11"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb52818890a28fe221d"),
text: "you know12",
author: "Xintong12"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb52818890a28fe221e"),
text: "you know13",
author: "Xintong13"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb52818890a28fe221f"),
text: "you know14",
author: "Xintong14"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb52818890a28fe2220"),
text: "you know15",
author: "Xintong15"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb52818890a28fe2221"),
text: "you know16",
author: "Xintong16"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb52818890a28fe2222"),
text: "you know17",
author: "Xintong17"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb52818890a28fe2223"),
text: "you know18",
author: "Xintong18"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb52818890a28fe2224"),
text: "you know19",
author: "Xintong19"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb52818890a28fe2225"),
text: "you know20",
author: "Xintong20"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb52818890a28fe2226"),
text: "you know21",
author: "Xintong21"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb52818890a28fe2227"),
text: "you know22",
author: "Xintong22"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb52818890a28fe2228"),
text: "you know23",
author: "Xintong23"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb52818890a28fe2229"),
text: "you know24",
author: "Xintong24"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb52818890a28fe222a"),
text: "you know25",
author: "Xintong25"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb62818890a28fe222b"),
text: "you know26",
author: "Xintong26"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb62818890a28fe222c"),
text: "you know27",
author: "Xintong27"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb62818890a28fe222d"),
text: "you know28",
author: "Xintong28"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb62818890a28fe222e"),
text: "you know29",
author: "Xintong29"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb62818890a28fe222f"),
text: "you know30",
author: "Xintong30"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb62818890a28fe2230"),
text: "you know31",
author: "Xintong31"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb62818890a28fe2231"),
text: "you know32",
author: "Xintong32"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb62818890a28fe2232"),
text: "you know33",
author: "Xintong33"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb62818890a28fe2233"),
text: "you know34",
author: "Xintong34"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb62818890a28fe2234"),
text: "you know35",
author: "Xintong35"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb62818890a28fe2235"),
text: "you know36",
author: "Xintong36"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb62818890a28fe2236"),
text: "you know37",
author: "Xintong37"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb62818890a28fe2237"),
text: "you know38",
author: "Xintong38"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb62818890a28fe2238"),
text: "you know39",
author: "Xintong39"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb62818890a28fe2239"),
text: "you know40",
author: "Xintong40"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb62818890a28fe223a"),
text: "you know41",
author: "Xintong41"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb62818890a28fe223b"),
text: "you know42",
author: "Xintong42"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb62818890a28fe223c"),
text: "you know43",
author: "Xintong43"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb62818890a28fe223d"),
text: "you know44",
author: "Xintong44"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb62818890a28fe223e"),
text: "you know45",
author: "Xintong45"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb62818890a28fe223f"),
text: "you know46",
author: "Xintong46"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb62818890a28fe2240"),
text: "you know47",
author: "Xintong47"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb72818890a28fe2241"),
text: "you know48",
author: "Xintong48"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb72818890a28fe2242"),
text: "you know49",
author: "Xintong49"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb72818890a28fe2243"),
text: "you know50",
author: "Xintong50"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb72818890a28fe2244"),
text: "you know51",
author: "Xintong51"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb72818890a28fe2245"),
text: "you know52",
author: "Xintong52"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb72818890a28fe2246"),
text: "you know53",
author: "Xintong53"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb72818890a28fe2247"),
text: "you know54",
author: "Xintong54"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb72818890a28fe2248"),
text: "you know55",
author: "Xintong55"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb72818890a28fe2249"),
text: "you know56",
author: "Xintong56"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb72818890a28fe224a"),
text: "you know57",
author: "Xintong57"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb72818890a28fe224b"),
text: "you know58",
author: "Xintong58"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb72818890a28fe224c"),
text: "you know59",
author: "Xintong59"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb72818890a28fe224d"),
text: "you know60",
author: "Xintong60"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb72818890a28fe224e"),
text: "you know61",
author: "Xintong61"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb72818890a28fe224f"),
text: "you know62",
author: "Xintong62"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb82818890a28fe2250"),
text: "you know63",
author: "Xintong63"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb82818890a28fe2251"),
text: "you know64",
author: "Xintong64"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb82818890a28fe2252"),
text: "you know65",
author: "Xintong65"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb82818890a28fe2253"),
text: "you know66",
author: "Xintong66"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb82818890a28fe2254"),
text: "you know67",
author: "Xintong67"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb82818890a28fe2255"),
text: "you know68",
author: "Xintong68"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb82818890a28fe2256"),
text: "you know69",
author: "Xintong69"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb92818890a28fe2257"),
text: "you know70",
author: "Xintong70"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb92818890a28fe2258"),
text: "you know71",
author: "Xintong71"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb92818890a28fe2259"),
text: "you know72",
author: "Xintong72"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb92818890a28fe225a"),
text: "you know73",
author: "Xintong73"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb92818890a28fe225b"),
text: "you know74",
author: "Xintong74"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb92818890a28fe225c"),
text: "you know75",
author: "Xintong75"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb92818890a28fe225d"),
text: "you know76",
author: "Xintong76"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fb92818890a28fe225e"),
text: "you know77",
author: "Xintong77"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fba2818890a28fe225f"),
text: "you know78",
author: "Xintong78"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fba2818890a28fe2260"),
text: "you know79",
author: "Xintong79"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fba2818890a28fe2261"),
text: "you know80",
author: "Xintong80"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fba2818890a28fe2262"),
text: "you know81",
author: "Xintong81"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fba2818890a28fe2263"),
text: "you know82",
author: "Xintong82"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fba2818890a28fe2264"),
text: "you know83",
author: "Xintong83"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fba2818890a28fe2265"),
text: "you know84",
author: "Xintong84"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fba2818890a28fe2266"),
text: "you know85",
author: "Xintong85"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fba2818890a28fe2267"),
text: "you know86",
author: "Xintong86"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fba2818890a28fe2268"),
text: "you know87",
author: "Xintong87"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fba2818890a28fe2269"),
text: "you know88",
author: "Xintong88"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fba2818890a28fe226a"),
text: "you know89",
author: "Xintong89"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fba2818890a28fe226b"),
text: "you know90",
author: "Xintong90"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fba2818890a28fe226c"),
text: "you know91",
author: "Xintong91"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fba2818890a28fe226d"),
text: "you know92",
author: "Xintong92"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fbb2818890a28fe226e"),
text: "you know93",
author: "Xintong93"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fbb2818890a28fe226f"),
text: "you know94",
author: "Xintong94"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fbb2818890a28fe2270"),
text: "you know95",
author: "Xintong95"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fbb2818890a28fe2271"),
text: "you know96",
author: "Xintong96"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fbb2818890a28fe2272"),
text: "you know97",
author: "Xintong97"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fbb2818890a28fe2273"),
text: "you know98",
author: "Xintong98"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fbb2818890a28fe2274"),
text: "you know99",
author: "Xintong99"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fc9a7ab600a30e44a61"),
text: "you know0",
author: "Xintong0"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fc9a7ab600a30e44a62"),
text: "you know1",
author: "Xintong1"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fcaa7ab600a30e44a63"),
text: "you know2",
author: "Xintong2"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fcaa7ab600a30e44a64"),
text: "you know3",
author: "Xintong3"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fcaa7ab600a30e44a65"),
text: "you know4",
author: "Xintong4"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977feb5e08350a394ddc60"),
text: "you know0",
author: "Xintong0"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977feb5e08350a394ddc61"),
text: "you know1",
author: "Xintong1"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977feb5e08350a394ddc62"),
text: "you know2",
author: "Xintong2"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977feb5e08350a394ddc63"),
text: "you know3",
author: "Xintong3"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977feb5e08350a394ddc64"),
text: "you know4",
author: "Xintong4"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977feb5e08350a394ddc65"),
text: "you know5",
author: "Xintong5"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977feb5e08350a394ddc66"),
text: "you know6",
author: "Xintong6"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977feb5e08350a394ddc67"),
text: "you know7",
author: "Xintong7"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977feb5e08350a394ddc68"),
text: "you know8",
author: "Xintong8"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977feb5e08350a394ddc69"),
text: "you know9",
author: "Xintong9"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977feb5e08350a394ddc6a"),
text: "you know10",
author: "Xintong10"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977feb5e08350a394ddc6b"),
text: "you know11",
author: "Xintong11"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977feb5e08350a394ddc6c"),
text: "you know12",
author: "Xintong12"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977feb5e08350a394ddc6d"),
text: "you know13",
author: "Xintong13"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977feb5e08350a394ddc6e"),
text: "you know14",
author: "Xintong14"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977feb5e08350a394ddc6f"),
text: "you know15",
author: "Xintong15"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977feb5e08350a394ddc70"),
text: "you know16",
author: "Xintong16"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977feb5e08350a394ddc71"),
text: "you know17",
author: "Xintong17"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977feb5e08350a394ddc72"),
text: "you know18",
author: "Xintong18"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977feb5e08350a394ddc73"),
text: "you know19",
author: "Xintong19"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977feb5e08350a394ddc74"),
text: "you know20",
author: "Xintong20"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977feb5e08350a394ddc75"),
text: "you know21",
author: "Xintong21"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977feb5e08350a394ddc76"),
text: "you know22",
author: "Xintong22"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fec5e08350a394ddc77"),
text: "you know23",
author: "Xintong23"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fec5e08350a394ddc78"),
text: "you know24",
author: "Xintong24"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fec5e08350a394ddc79"),
text: "you know25",
author: "Xintong25"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fec5e08350a394ddc7a"),
text: "you know26",
author: "Xintong26"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fec5e08350a394ddc7b"),
text: "you know27",
author: "Xintong27"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fec5e08350a394ddc7c"),
text: "you know28",
author: "Xintong28"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fec5e08350a394ddc7d"),
text: "you know29",
author: "Xintong29"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fec5e08350a394ddc7e"),
text: "you know30",
author: "Xintong30"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fec5e08350a394ddc7f"),
text: "you know31",
author: "Xintong31"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fec5e08350a394ddc80"),
text: "you know32",
author: "Xintong32"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fec5e08350a394ddc81"),
text: "you know33",
author: "Xintong33"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fec5e08350a394ddc82"),
text: "you know34",
author: "Xintong34"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fec5e08350a394ddc83"),
text: "you know35",
author: "Xintong35"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fec5e08350a394ddc84"),
text: "you know36",
author: "Xintong36"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fec5e08350a394ddc85"),
text: "you know37",
author: "Xintong37"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fec5e08350a394ddc86"),
text: "you know38",
author: "Xintong38"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fec5e08350a394ddc87"),
text: "you know39",
author: "Xintong39"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fec5e08350a394ddc88"),
text: "you know40",
author: "Xintong40"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fec5e08350a394ddc89"),
text: "you know41",
author: "Xintong41"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fec5e08350a394ddc8a"),
text: "you know42",
author: "Xintong42"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fec5e08350a394ddc8b"),
text: "you know43",
author: "Xintong43"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fed5e08350a394ddc8c"),
text: "you know44",
author: "Xintong44"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fed5e08350a394ddc8d"),
text: "you know45",
author: "Xintong45"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fed5e08350a394ddc8e"),
text: "you know46",
author: "Xintong46"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fed5e08350a394ddc8f"),
text: "you know47",
author: "Xintong47"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fed5e08350a394ddc90"),
text: "you know48",
author: "Xintong48"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fed5e08350a394ddc91"),
text: "you know49",
author: "Xintong49"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fed5e08350a394ddc92"),
text: "you know50",
author: "Xintong50"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fed5e08350a394ddc93"),
text: "you know51",
author: "Xintong51"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fed5e08350a394ddc94"),
text: "you know52",
author: "Xintong52"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fed5e08350a394ddc95"),
text: "you know53",
author: "Xintong53"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fed5e08350a394ddc96"),
text: "you know54",
author: "Xintong54"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fed5e08350a394ddc97"),
text: "you know55",
author: "Xintong55"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fed5e08350a394ddc98"),
text: "you know56",
author: "Xintong56"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fed5e08350a394ddc99"),
text: "you know57",
author: "Xintong57"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fed5e08350a394ddc9a"),
text: "you know58",
author: "Xintong58"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fed5e08350a394ddc9b"),
text: "you know59",
author: "Xintong59"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fed5e08350a394ddc9c"),
text: "you know60",
author: "Xintong60"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fed5e08350a394ddc9d"),
text: "you know61",
author: "Xintong61"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fed5e08350a394ddc9e"),
text: "you know62",
author: "Xintong62"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fed5e08350a394ddc9f"),
text: "you know63",
author: "Xintong63"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fed5e08350a394ddca0"),
text: "you know64",
author: "Xintong64"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fed5e08350a394ddca1"),
text: "you know65",
author: "Xintong65"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fed5e08350a394ddca2"),
text: "you know66",
author: "Xintong66"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fee5e08350a394ddca3"),
text: "you know67",
author: "Xintong67"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fee5e08350a394ddca4"),
text: "you know68",
author: "Xintong68"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fee5e08350a394ddca5"),
text: "you know69",
author: "Xintong69"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fee5e08350a394ddca6"),
text: "you know70",
author: "Xintong70"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fee5e08350a394ddca7"),
text: "you know71",
author: "Xintong71"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fee5e08350a394ddca8"),
text: "you know72",
author: "Xintong72"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fee5e08350a394ddca9"),
text: "you know73",
author: "Xintong73"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fee5e08350a394ddcaa"),
text: "you know74",
author: "Xintong74"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fee5e08350a394ddcab"),
text: "you know75",
author: "Xintong75"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fee5e08350a394ddcac"),
text: "you know76",
author: "Xintong76"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fee5e08350a394ddcad"),
text: "you know77",
author: "Xintong77"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fee5e08350a394ddcae"),
text: "you know78",
author: "Xintong78"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fee5e08350a394ddcaf"),
text: "you know79",
author: "Xintong79"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fee5e08350a394ddcb0"),
text: "you know80",
author: "Xintong80"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fee5e08350a394ddcb1"),
text: "you know81",
author: "Xintong81"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fee5e08350a394ddcb2"),
text: "you know82",
author: "Xintong82"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fee5e08350a394ddcb3"),
text: "you know83",
author: "Xintong83"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fee5e08350a394ddcb4"),
text: "you know84",
author: "Xintong84"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fee5e08350a394ddcb5"),
text: "you know85",
author: "Xintong85"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fee5e08350a394ddcb6"),
text: "you know86",
author: "Xintong86"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fee5e08350a394ddcb7"),
text: "you know87",
author: "Xintong87"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fee5e08350a394ddcb8"),
text: "you know88",
author: "Xintong88"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fef5e08350a394ddcb9"),
text: "you know89",
author: "Xintong89"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fef5e08350a394ddcba"),
text: "you know90",
author: "Xintong90"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fef5e08350a394ddcbb"),
text: "you know91",
author: "Xintong91"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fef5e08350a394ddcbc"),
text: "you know92",
author: "Xintong92"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fef5e08350a394ddcbd"),
text: "you know93",
author: "Xintong93"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fef5e08350a394ddcbe"),
text: "you know94",
author: "Xintong94"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fef5e08350a394ddcbf"),
text: "you know95",
author: "Xintong95"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fef5e08350a394ddcc0"),
text: "you know96",
author: "Xintong96"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fef5e08350a394ddcc1"),
text: "you know97",
author: "Xintong97"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fef5e08350a394ddcc2"),
text: "you know98",
author: "Xintong98"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f977fef5e08350a394ddcc3"),
text: "you know99",
author: "Xintong99"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9783145e08350a394ddcc4"),
author: "test1",
text: "<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/OUTNDbRGX1s\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>\r\n"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f9783575e08350a394ddcc5"),
author: "test2",
text: "<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/OUTNDbRGX1s\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>\r\n"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dbf7e95ff0c211debec"),
text: "you know0",
author: "Xintong0"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dbf7e95ff0c211debed"),
text: "you know1",
author: "Xintong1"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dbf7e95ff0c211debee"),
text: "you know2",
author: "Xintong2"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dbf7e95ff0c211debef"),
text: "you know3",
author: "Xintong3"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dbf7e95ff0c211debf0"),
text: "you know4",
author: "Xintong4"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dbf7e95ff0c211debf1"),
text: "you know5",
author: "Xintong5"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dbf7e95ff0c211debf2"),
text: "you know6",
author: "Xintong6"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc07e95ff0c211debf3"),
text: "you know7",
author: "Xintong7"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc07e95ff0c211debf4"),
text: "you know8",
author: "Xintong8"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc07e95ff0c211debf5"),
text: "you know9",
author: "Xintong9"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc07e95ff0c211debf6"),
text: "you know10",
author: "Xintong10"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc07e95ff0c211debf7"),
text: "you know11",
author: "Xintong11"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc07e95ff0c211debf8"),
text: "you know12",
author: "Xintong12"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc07e95ff0c211debf9"),
text: "you know13",
author: "Xintong13"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc07e95ff0c211debfa"),
text: "you know14",
author: "Xintong14"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc07e95ff0c211debfb"),
text: "you know15",
author: "Xintong15"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc07e95ff0c211debfc"),
text: "you know16",
author: "Xintong16"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc07e95ff0c211debfd"),
text: "you know17",
author: "Xintong17"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc07e95ff0c211debfe"),
text: "you know18",
author: "Xintong18"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc07e95ff0c211debff"),
text: "you know19",
author: "Xintong19"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc07e95ff0c211dec00"),
text: "you know20",
author: "Xintong20"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc07e95ff0c211dec01"),
text: "you know21",
author: "Xintong21"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc07e95ff0c211dec02"),
text: "you know22",
author: "Xintong22"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc07e95ff0c211dec03"),
text: "you know23",
author: "Xintong23"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc07e95ff0c211dec04"),
text: "you know24",
author: "Xintong24"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc07e95ff0c211dec05"),
text: "you know25",
author: "Xintong25"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc07e95ff0c211dec06"),
text: "you know26",
author: "Xintong26"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc17e95ff0c211dec07"),
text: "you know27",
author: "Xintong27"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc17e95ff0c211dec08"),
text: "you know28",
author: "Xintong28"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc17e95ff0c211dec09"),
text: "you know29",
author: "Xintong29"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc17e95ff0c211dec0a"),
text: "you know30",
author: "Xintong30"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc17e95ff0c211dec0b"),
text: "you know31",
author: "Xintong31"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc17e95ff0c211dec0c"),
text: "you know32",
author: "Xintong32"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc17e95ff0c211dec0d"),
text: "you know33",
author: "Xintong33"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc17e95ff0c211dec0e"),
text: "you know34",
author: "Xintong34"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc17e95ff0c211dec0f"),
text: "you know35",
author: "Xintong35"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc17e95ff0c211dec10"),
text: "you know36",
author: "Xintong36"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc17e95ff0c211dec11"),
text: "you know37",
author: "Xintong37"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc17e95ff0c211dec12"),
text: "you know38",
author: "Xintong38"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc17e95ff0c211dec13"),
text: "you know39",
author: "Xintong39"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc17e95ff0c211dec14"),
text: "you know40",
author: "Xintong40"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc17e95ff0c211dec15"),
text: "you know41",
author: "Xintong41"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc17e95ff0c211dec16"),
text: "you know42",
author: "Xintong42"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc17e95ff0c211dec17"),
text: "you know43",
author: "Xintong43"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc17e95ff0c211dec18"),
text: "you know44",
author: "Xintong44"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc17e95ff0c211dec19"),
text: "you know45",
author: "Xintong45"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc17e95ff0c211dec1a"),
text: "you know46",
author: "Xintong46"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc17e95ff0c211dec1b"),
text: "you know47",
author: "Xintong47"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc27e95ff0c211dec1c"),
text: "you know48",
author: "Xintong48"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc27e95ff0c211dec1d"),
text: "you know49",
author: "Xintong49"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc27e95ff0c211dec1e"),
text: "you know50",
author: "Xintong50"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc27e95ff0c211dec1f"),
text: "you know51",
author: "Xintong51"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc27e95ff0c211dec20"),
text: "you know52",
author: "Xintong52"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc27e95ff0c211dec21"),
text: "you know53",
author: "Xintong53"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc27e95ff0c211dec22"),
text: "you know54",
author: "Xintong54"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc27e95ff0c211dec23"),
text: "you know55",
author: "Xintong55"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc27e95ff0c211dec24"),
text: "you know56",
author: "Xintong56"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc27e95ff0c211dec25"),
text: "you know57",
author: "Xintong57"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc27e95ff0c211dec26"),
text: "you know58",
author: "Xintong58"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc27e95ff0c211dec27"),
text: "you know59",
author: "Xintong59"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc27e95ff0c211dec28"),
text: "you know60",
author: "Xintong60"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc27e95ff0c211dec29"),
text: "you know61",
author: "Xintong61"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc27e95ff0c211dec2a"),
text: "you know62",
author: "Xintong62"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc27e95ff0c211dec2b"),
text: "you know63",
author: "Xintong63"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc27e95ff0c211dec2c"),
text: "you know64",
author: "Xintong64"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc27e95ff0c211dec2d"),
text: "you know65",
author: "Xintong65"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc27e95ff0c211dec2e"),
text: "you know66",
author: "Xintong66"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc27e95ff0c211dec2f"),
text: "you know67",
author: "Xintong67"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc37e95ff0c211dec30"),
text: "you know68",
author: "Xintong68"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc37e95ff0c211dec31"),
text: "you know69",
author: "Xintong69"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc37e95ff0c211dec32"),
text: "you know70",
author: "Xintong70"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc37e95ff0c211dec33"),
text: "you know71",
author: "Xintong71"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc37e95ff0c211dec34"),
text: "you know72",
author: "Xintong72"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc37e95ff0c211dec35"),
text: "you know73",
author: "Xintong73"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc37e95ff0c211dec36"),
text: "you know74",
author: "Xintong74"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc37e95ff0c211dec37"),
text: "you know75",
author: "Xintong75"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc37e95ff0c211dec38"),
text: "you know76",
author: "Xintong76"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc37e95ff0c211dec39"),
text: "you know77",
author: "Xintong77"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc37e95ff0c211dec3a"),
text: "you know78",
author: "Xintong78"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc37e95ff0c211dec3b"),
text: "you know79",
author: "Xintong79"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc37e95ff0c211dec3c"),
text: "you know80",
author: "Xintong80"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc37e95ff0c211dec3d"),
text: "you know81",
author: "Xintong81"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc37e95ff0c211dec3e"),
text: "you know82",
author: "Xintong82"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc37e95ff0c211dec3f"),
text: "you know83",
author: "Xintong83"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc37e95ff0c211dec40"),
text: "you know84",
author: "Xintong84"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc37e95ff0c211dec41"),
text: "you know85",
author: "Xintong85"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc37e95ff0c211dec42"),
text: "you know86",
author: "Xintong86"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc37e95ff0c211dec43"),
text: "you know87",
author: "Xintong87"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc37e95ff0c211dec44"),
text: "you know88",
author: "Xintong88"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc47e95ff0c211dec45"),
text: "you know89",
author: "Xintong89"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc47e95ff0c211dec46"),
text: "you know90",
author: "Xintong90"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc47e95ff0c211dec47"),
text: "you know91",
author: "Xintong91"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc47e95ff0c211dec48"),
text: "you know92",
author: "Xintong92"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc47e95ff0c211dec49"),
text: "you know93",
author: "Xintong93"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc47e95ff0c211dec4a"),
text: "you know94",
author: "Xintong94"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc47e95ff0c211dec4b"),
text: "you know95",
author: "Xintong95"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc47e95ff0c211dec4c"),
text: "you know96",
author: "Xintong96"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc47e95ff0c211dec4d"),
text: "you know97",
author: "Xintong97"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc47e95ff0c211dec4e"),
text: "you know98",
author: "Xintong98"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f978dc47e95ff0c211dec4f"),
text: "you know99",
author: "Xintong99"
} ]);
db.getCollection("posts").insert([ {
_id: ObjectId("5f98c4b6cfecae18595bdd6e"),
author: "test",
text: "<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/OUTNDbRGX1s\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>"
} ]);
// ----------------------------
// Collection structure for users
// ----------------------------
db.getCollection("users").drop();
db.createCollection("users");
// ----------------------------
// Documents of users
// ----------------------------
db.getCollection("users").insert([ {
_id: ObjectId("5f9c7d939c2771d443e1f954"),
username: "linda",
password: "123456"
} ]);
db.getCollection("users").insert([ {
_id: ObjectId("5f9d9b687d9272872d27c4c4"),
username: "dawd",
password: "qwer1234"
} ]);
db.getCollection("users").insert([ {
_id: ObjectId("5f9da74321d2ac934a93c8d9"),
username: "lol",
password: "lol"
} ]);
db.getCollection("users").insert([ {
_id: ObjectId("5f9df2f5b16583155f4b020f"),
username: "kiki",
password: "123"
} ]);
db.getCollection("users").insert([ {
_id: ObjectId("5f9e258fa77cd6198b219dc3"),
username: "qqcom",
password: "qq"
} ]);
db.getCollection("users").insert([ {
_id: ObjectId("5fa0a87ebd56a6146e78c3bd"),
username: "hello",
password: "hello"
} ]);
db.getCollection("users").insert([ {
_id: ObjectId("5fa0af17be38ea1e9004e351"),
username: "dadada",
password: "dadada"
} ]);
db.getCollection("users").insert([ {
_id: ObjectId("5fab581e939b2611d8633e90"),
username: "seven",
password: "test"
} ]);
db.getCollection("users").insert([ {
_id: ObjectId("5fab59790376b714b2a4d663"),
username: "seven1",
password: "test"
} ]);
db.getCollection("users").insert([ {
_id: ObjectId("5fab734082ed8451356013d4"),
username: "yaaa",
password: "test"
} ]);
db.getCollection("users").insert([ {
_id: ObjectId("5fab7d4c12fe9b523c1d1a80"),
username: "yao123",
password: "12345"
} ]);
db.getCollection("users").insert([ {
_id: ObjectId("5fab8cc554800f53c32bc68d"),
username: "ser",
password: "ser"
} ]);
db.getCollection("users").insert([ {
_id: ObjectId("5fae006da26cb5216a02f0d9"),
username: "12345671",
password: "12345671"
} ]);
db.getCollection("users").insert([ {
_id: ObjectId("5fb071e4c22986bc944d28a1"),
username: "qiqi",
password: "123"
} ]);
// ----------------------------
// Collection structure for videos
// ----------------------------
db.getCollection("videos").drop();
db.createCollection("videos");
// ----------------------------
// Documents of videos
// ----------------------------
db.getCollection("videos").insert([ {
_id: ObjectId("5f9c763b95981ed151a37e20"),
name: "100 days of Ragdoll Kittens in 8 minutes [ENG SUB]",
url: "https://www.youtube.com/embed/Q-IaI7mvAT4",
votes: NumberInt("27")
} ]);
db.getCollection("videos").insert([ {
_id: ObjectId("5f9dff869c622c6c878c2d59"),
name: "Panda cubs and nanny Meiโs war โ
ก",
url: "https://www.youtube.com/embed/I-ovzUNno7g",
votes: NumberInt("3")
} ]);
db.getCollection("videos").insert([ {
_id: ObjectId("5f9e15f7f5875bc4feb451c6"),
name: "Cat VS Lobster| Seeing Lobaster for the first time",
url: "https://www.youtube.com/embed/OUTNDbRGX1s",
votes: NumberInt("7")
} ]);
db.getCollection("videos").insert([ {
_id: ObjectId("5f9e1eef61cfa35f918a2257"),
name: "Smallest dog in the world",
url: "https://www.youtube.com/embed/Jqb5zFexlCc",
votes: NumberInt("2")
} ]);
|
SELECT * FROM test_form LIMIT 0, 5; -- 0็ช็ฎใใ5ไปถ
SELECT * FROM test_form LIMIT 5, 5; -- 5็ช็ฎใใ5ไปถ
|
INSERT INTO DQC_RepQuality_Excellent (WMID, ReportedQuality) VALUES (258,"Excellent");
INSERT INTO DQC_RepQuality_Excellent (WMID, ReportedQuality) VALUES (263,"Excellent");
INSERT INTO DQC_RepQuality_Excellent (WMID, ReportedQuality) VALUES (264,"Excellent");
INSERT INTO DQC_RepQuality_Excellent (WMID, ReportedQuality) VALUES (265,"Excellent");
INSERT INTO DQC_RepQuality_Excellent (WMID, ReportedQuality) VALUES (268,"Excellent");
INSERT INTO DQC_RepQuality_Excellent (WMID, ReportedQuality) VALUES (282,"Excellent");
INSERT INTO DQC_RepQuality_Excellent (WMID, ReportedQuality) VALUES (283,"Excellent");
INSERT INTO DQC_RepQuality_Excellent (WMID, ReportedQuality) VALUES (285,"Excellent");
INSERT INTO DQC_RepQuality_Excellent (WMID, ReportedQuality) VALUES (293,"Excellent");
INSERT INTO DQC_RepQuality_Excellent (WMID, ReportedQuality) VALUES (294,"Excellent");
INSERT INTO DQC_RepQuality_Excellent (WMID, ReportedQuality) VALUES (299,"Excellent");
INSERT INTO DQC_RepQuality_Excellent (WMID, ReportedQuality) VALUES (300,"Excellent");
INSERT INTO DQC_RepQuality_Excellent (WMID, ReportedQuality) VALUES (302,"Excellent");
INSERT INTO DQC_RepQuality_Excellent (WMID, ReportedQuality) VALUES (311,"Excellent");
INSERT INTO DQC_RepQuality_Excellent (WMID, ReportedQuality) VALUES (314,"Excellent");
INSERT INTO DQC_RepQuality_Excellent (WMID, ReportedQuality) VALUES (317,"Excellent");
INSERT INTO DQC_RepQuality_Excellent (WMID, ReportedQuality) VALUES (318,"Excellent");
INSERT INTO DQC_RepQuality_Excellent (WMID, ReportedQuality) VALUES (319,"Excellent");
INSERT INTO DQC_RepQuality_Excellent (WMID, ReportedQuality) VALUES (328,"Excellent");
INSERT INTO DQC_RepQuality_Excellent (WMID, ReportedQuality) VALUES (338,"Excellent");
INSERT INTO DQC_RepQuality_Excellent (WMID, ReportedQuality) VALUES (340,"Excellent");
INSERT INTO DQC_RepQuality_Excellent (WMID, ReportedQuality) VALUES (342,"Excellent");
INSERT INTO DQC_RepQuality_Excellent (WMID, ReportedQuality) VALUES (367,"Excellent");
INSERT INTO DQC_RepQuality_Excellent (WMID, ReportedQuality) VALUES (370,"Excellent");
INSERT INTO DQC_RepQuality_Excellent (WMID, ReportedQuality) VALUES (371,"Excellent");
INSERT INTO DQC_RepQuality_Excellent (WMID, ReportedQuality) VALUES (373,"Excellent");
INSERT INTO DQC_RepQuality_Excellent (WMID, ReportedQuality) VALUES (957,"Excellent");
INSERT INTO DQC_RepQuality_Excellent (WMID, ReportedQuality) VALUES (971,"Excellent");
INSERT INTO DQC_RepQuality_Excellent (WMID, ReportedQuality) VALUES (972,"Excellent");
INSERT INTO DQC_RepQuality_Excellent (WMID, ReportedQuality) VALUES (974,"Excellent");
INSERT INTO DQC_RepQuality_Excellent (WMID, ReportedQuality) VALUES (985,"Excellent");
|
copy customer from '/big_fast_drive/anil/dbops/test/ssb/data/s1/customer.tbl.p' delimiter '|';
copy ddate from '/big_fast_drive/anil/dbops/test/ssb/data/s1/date.tbl' delimiter '|';
copy lineorder from '/big_fast_drive/anil/dbops/test/ssb/data/s1/lineorder.tbl' delimiter '|';
copy part from '/big_fast_drive/anil/dbops/test/ssb/data/s1/part.tbl.p' delimiter '|';
copy supplier from '/big_fast_drive/anil/dbops/test/ssb/data/s1/supplier.tbl.p' delimiter '|';
|
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!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 utf8 */;
CREATE TABLE IF NOT EXISTS `items` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`description` text NOT NULL,
`category` text NOT NULL,
`date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`status` varchar(16) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=12 ;
/*!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 */;
|
create table ACT_RU_TASK (
ID_ NVARCHAR2(64),
REV_ INTEGER,
EXECUTION_ID_ NVARCHAR2(64),
PROC_INST_ID_ NVARCHAR2(64),
PROC_DEF_ID_ NVARCHAR2(64),
TASK_DEF_ID_ NVARCHAR2(64),
SCOPE_ID_ NVARCHAR2(255),
SUB_SCOPE_ID_ NVARCHAR2(255),
SCOPE_TYPE_ NVARCHAR2(255),
SCOPE_DEFINITION_ID_ NVARCHAR2(255),
PROPAGATED_STAGE_INST_ID_ NVARCHAR2(255),
NAME_ NVARCHAR2(255),
PARENT_TASK_ID_ NVARCHAR2(64),
DESCRIPTION_ NVARCHAR2(2000),
TASK_DEF_KEY_ NVARCHAR2(255),
OWNER_ NVARCHAR2(255),
ASSIGNEE_ NVARCHAR2(255),
DELEGATION_ NVARCHAR2(64),
PRIORITY_ INTEGER,
CREATE_TIME_ TIMESTAMP(6),
DUE_DATE_ TIMESTAMP(6),
CATEGORY_ NVARCHAR2(255),
SUSPENSION_STATE_ INTEGER,
TENANT_ID_ NVARCHAR2(255) DEFAULT '',
FORM_KEY_ NVARCHAR2(255),
CLAIM_TIME_ TIMESTAMP(6),
IS_COUNT_ENABLED_ NUMBER(1,0) CHECK (IS_COUNT_ENABLED_ IN (1,0)),
VAR_COUNT_ INTEGER,
ID_LINK_COUNT_ INTEGER,
SUB_TASK_COUNT_ INTEGER,
primary key (ID_)
);
create index ACT_IDX_TASK_CREATE on ACT_RU_TASK(CREATE_TIME_);
create index ACT_IDX_TASK_SCOPE on ACT_RU_TASK(SCOPE_ID_, SCOPE_TYPE_);
create index ACT_IDX_TASK_SUB_SCOPE on ACT_RU_TASK(SUB_SCOPE_ID_, SCOPE_TYPE_);
create index ACT_IDX_TASK_SCOPE_DEF on ACT_RU_TASK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
insert into ACT_GE_PROPERTY values ('task.schema.version', '6.8.1.0', 1);
|
-- Table: public.t_user_rights
-- DROP TABLE public.t_user_rights;
CREATE TABLE public.t_user_rights
(
"ID" integer NOT NULL DEFAULT nextval('"t_user_rights_ID_seq"'::regclass),
"CHARACTER_ENCODING" integer NOT NULL DEFAULT nextval('"t_user_rights_CHARACTER_ENCODING_seq"'::regclass),
"ROLE_NAME" character varying(50) COLLATE pg_catalog."default",
"BUSINESS_AREA_FINANCIAL_CLOUD" boolean NOT NULL DEFAULT false,
"BUSINESS_AREA_TAX_CLOUD" boolean NOT NULL DEFAULT false,
"BUSINESS_AREA_INVOICE_CLOUDS" boolean NOT NULL DEFAULT false,
"BUSINESS_AREA_FINANCIAL_CLOUDS" boolean NOT NULL DEFAULT false,
"BUSINESS_AREA_COST_CLOUDS" boolean NOT NULL DEFAULT false,
"BUSINESS_AREA_MASTER_DATA" boolean NOT NULL DEFAULT false,
"BUSINESS_AREA_REPORT" boolean NOT NULL DEFAULT false,
"PERMISSION_SETTINGS_SEARCH" boolean NOT NULL DEFAULT false,
"PERMISSION_SETTINGS_EXCHANGE_VIEW" boolean NOT NULL DEFAULT false,
"PERMISSION_SETTINGS_EXCHANGE_MANAGEMENT" boolean NOT NULL DEFAULT false,
"PERMISSION_SETTINGS_ELEMENT_VIEW" boolean NOT NULL DEFAULT false,
"PERMISSION_SETTINGS_ELEMENT_MANAGEMENT" boolean NOT NULL DEFAULT false,
"PERMISSION_SETTINGS_EVENT" boolean NOT NULL DEFAULT false,
"PERMISSION_SETTINGS_STORAGE" boolean NOT NULL DEFAULT false,
"PERMISSION_SETTINGS_USER_MANAGEMENT" boolean NOT NULL DEFAULT false,
"PERMISSION_SETTINGS_USER_ROLE_PERMISSIONS" boolean NOT NULL DEFAULT false,
CONSTRAINT t_user_rights_pkey PRIMARY KEY ("ID")
)
WITH (
OIDS = FALSE
)
TABLESPACE pg_default;
ALTER TABLE public.t_user_rights
OWNER to postgres;
COMMENT ON COLUMN public.t_user_rights."PERMISSION_SETTINGS_EXCHANGE_MANAGEMENT"
IS ' '; |
--
-- Uncomment me if you want :)
-- CREATE DATABASE caso voley;
CREATE TABLE Estado
(
IdEstado Integer NOT NULL,
Descripcion String NOT NULL
);
CREATE TABLE Persona
(
Nombres String NOT NULL,
Apellidos String NOT NULL,
FecNacimiento String NOT NULL,
IdSexo Integer NOT NULL,
Telefono String NOT NULL,
Direccion String NOT NULL,
IdEstado Integer NOT NULL,
Email String NOT NULL
);
CREATE TABLE Sexo
(
IdSexo Integer NOT NULL,
Descripcion String NOT NULL
);
CREATE TABLE Tarifa
(
IdTarifa Integer NOT NULL,
Valor Real NOT NULL
);
CREATE TABLE Membresia
(
idMembresia Integer NOT NULL,
FechaInicio String NOT NULL,
FechaInicio String NOT NULL,
EstadoPago Boolean NOT NULL
);
|
set client_min_messages to warning;
drop sequence if exists grem_seq;
drop sequence if exists empr_seq;
drop sequence if exists para_seq;
drop sequence if exists esge_seq;
drop sequence if exists rubr_seq;
drop sequence if exists esre_seq;
drop sequence if exists vapa_seq;
drop sequence if exists mone_seq;
drop sequence if exists pais_seq;
drop sequence if exists pers_seq;
drop sequence if exists perf_seq;
drop sequence if exists esci_seq;
drop sequence if exists sexo_seq;
drop sequence if exists prog_seq;
drop sequence if exists usua_seq;
drop sequence if exists uspe_seq;
drop sequence if exists pepr_seq;
\q
|
-- doi xpaths just in the metadata (fgdc or iso)
select tag, protocol, count(distinct response_id) as num
from doi_identifiers_in_md
group by tag, protocol
order by protocol, num desc, tag; |
/*
Navicat MySQL Data Transfer
Source Server : 2
Source Server Version : 50624
Source Host : localhost:3306
Source Database : goods
Target Server Type : MYSQL
Target Server Version : 50624
File Encoding : 65001
Date: 2015-05-28 12:56:53
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for goods
-- ----------------------------
DROP TABLE IF EXISTS `goods`;
CREATE TABLE `goods` (
`ID` int(20) NOT NULL,
`Name` varchar(20) NOT NULL,
`Count` int(10) NOT NULL,
`Price` double(10,2) NOT NULL,
PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of goods
-- ----------------------------
INSERT INTO `goods` VALUES ('3', 'ๆนไพฟ้ข', '4500', '5.00');
INSERT INTO `goods` VALUES ('12', '็ฟๆณๆฐด', '2000', '3.00');
-- ----------------------------
-- Table structure for login
-- ----------------------------
DROP TABLE IF EXISTS `login`;
CREATE TABLE `login` (
`UserName` varchar(20) NOT NULL,
`Password` varchar(20) NOT NULL,
`Role` varchar(10) NOT NULL,
PRIMARY KEY (`UserName`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of login
-- ----------------------------
INSERT INTO `login` VALUES ('a', 'a', '0');
INSERT INTO `login` VALUES ('admin', 'admin', '0');
|
-- Ross Nelson CSC352 Assignment 2
-- January 27th 2020
-- 1.
DECLARE
-- Swap the new last name and current last name values to revert changes if ROLLBACK is not being used
EMP_FIRST_NAME EMPLOYEES.FIRST_NAME%TYPE := 'Neena';
EMP_LAST_NAME EMPLOYEES.LAST_NAME%TYPE := 'Kochhar';
EMP_NEW_LAST_NAME EMPLOYEES.LAST_NAME%TYPE := 'Austin';
BEGIN
UPDATE EMPLOYEES
SET LAST_NAME = EMP_NEW_LAST_NAME
WHERE FIRST_NAME = EMP_FIRST_NAME AND LAST_NAME = EMP_LAST_NAME;
DBMS_OUTPUT.PUT_LINE(EMP_FIRST_NAME || ' ' || EMP_NEW_LAST_NAME);
END;
/
--Rollback changes so the script can be run again without error
ROLLBACK;
-- 2.
DECLARE
DEP_ID DEPARTMENTS.DEPARTMENT_ID%TYPE;
DEP_NAME DEPARTMENTS.DEPARTMENT_NAME%TYPE;
MAN_ID DEPARTMENTS.MANAGER_ID%TYPE;
LOC_ID DEPARTMENTS.LOCATION_ID%TYPE;
BEGIN
INSERT INTO DEPARTMENTS (DEPARTMENT_ID, DEPARTMENT_NAME, MANAGER_ID, LOCATION_ID)
VALUES (299, 'Future', 204, 1700);
SELECT DEPARTMENT_ID, DEPARTMENT_NAME, MANAGER_ID, LOCATION_ID
INTO DEP_ID, DEP_NAME, MAN_ID, LOC_ID
FROM DEPARTMENTS
WHERE DEPARTMENT_ID = 299;
DBMS_OUTPUT.PUT_LINE(DEP_ID || ' ' || DEP_NAME || ' ' || MAN_ID || ' ' || LOC_ID);
END;
/
-- 3.
DECLARE
DEL_DEP_NAME DEPARTMENTS.DEPARTMENT_NAME%TYPE;
DEL_MAN_ID DEPARTMENTS.MANAGER_ID%TYPE;
BEGIN
DELETE
FROM DEPARTMENTS
WHERE DEPARTMENT_ID = 299
RETURNING DEPARTMENT_NAME, MANAGER_ID
INTO DEL_DEP_NAME, DEL_MAN_ID;
DBMS_OUTPUT.PUT_LINE(DEL_DEP_NAME || ' ' || DEL_MAN_ID);
END;
/
-- 4.
DECLARE
CLERK VARCHAR2(15) := 'CLERK';
MANAGER VARCHAR2(15) := 'Manager';
EMP_JOB_ID VARCHAR2(15) := 'OTHERS';
BEGIN
FOR EMP IN (
SELECT FIRST_NAME, LAST_NAME, JOB_ID
FROM EMPLOYEES
)
LOOP
IF (SUBSTR(EMP.JOB_ID, 4) = 'CLERK') THEN
EMP_JOB_ID := CLERK;
ELSIF (SUBSTR(EMP.JOB_ID, 4) = 'MAN') THEN
EMP_JOB_ID := MANAGER;
END IF;
DBMS_OUTPUT.PUT_LINE(EMP.FIRST_NAME || ' ' || EMP.LAST_NAME || ' ' || EMP_JOB_ID);
END LOOP;
END;
/
-- 5.
ACCEPT EMP_ID PROMPT "Please enter Employee ID: ";
DECLARE
EMP_SALARY EMPLOYEES.SALARY%TYPE;
EMP_COMMISSION_PCT EMPLOYEES.COMMISSION_PCT%TYPE;
EMP_NAME EMPLOYEES.FIRST_NAME%TYPE;
INC EMPLOYEES.SALARY%TYPE;
BONUS EMPLOYEES.SALARY%TYPE;
BEGIN
SELECT SALARY, COMMISSION_PCT, FIRST_NAME
INTO EMP_SALARY, EMP_COMMISSION_PCT, EMP_NAME
FROM EMPLOYEES
WHERE EMPLOYEE_ID = '&EMP_ID';
INC := EMP_SALARY + (NVL(EMP_COMMISSION_PCT, 0) * EMP_SALARY);
IF (INC = EMP_SALARY) THEN
IF (INC >= 20000) THEN
BONUS := 500;
ELSIF (INC >= 10000) THEN
BONUS := 600;
ELSIF (INC > 0) THEN
BONUS := 700;
ELSE
BONUS := 0;
END IF;
ELSE
IF (INC >= 15000) THEN
BONUS := 200;
ELSIF (INC >= 10000) THEN
BONUS := 300;
ELSIF (INC >= 5000) THEN
BONUS := 400;
ELSIF (INC > 0) THEN
BONUS := 500;
ELSE
BONUS := 0;
END IF;
END IF;
DBMS_OUTPUT.PUT_LINE('BONUS: ' || BONUS);
END;
/
-- 6.
-- BASIC LOOP
DECLARE
I NUMBER := 11;
BEGIN
LOOP
DBMS_OUTPUT.PUT_LINE(I);
I := I + 1;
IF I = 14 THEN
EXIT;
END IF;
END LOOP;
END;
/
-- FOR LOOP
DECLARE
I NUMBER(2);
BEGIN
FOR I IN 11 .. 13 LOOP
DBMS_OUTPUT.PUT_LINE(I);
END LOOP;
END;
/
-- WHILE LOOP
DECLARE
I NUMBER(2) := 11;
BEGIN
WHILE I < 14 LOOP
DBMS_OUTPUT.PUT_LINE(I);
I := I + 1;
END LOOP;
END;
/ |
DROP TABLE IF EXISTS meals_table; |
Select
title
From sakila.film
Where film_id in
(
Select film_id from sakila.film_category where category_id in
(
Select category_id from sakila.category where name ='Family'
)
) |
create table clases
(
nIdClase int auto_increment
primary key,
nIdProfesor int not null,
nIdMateria int not null,
sHorario varchar(45) not null,
constraint nIdMateria_fk_clases
foreign key (nIdMateria) references materias (nIdMateria)
on delete cascade,
constraint nIdProfesor_fk_clases
foreign key (nIdProfesor) references clases (nIdClase)
);
create index nIdMateria_fk_clases_idx
on clases (nIdMateria);
create index nIdProfesor_fk_clases_idx
on clases (nIdProfesor);
|
rem
rem $Header: catldr.sql,v 1.9 1995/11/08 15:21:34 jhealy Exp $ ulview.sql
rem
Rem Copyright (c) 1990 by Oracle Corporation
Rem NAME
Rem catldr.sql
Rem FUNCTION
Rem Views for the direct path of the loader
Rem NOTES
Rem This script must be run while connected as SYS or INTERNAL.
Rem MODIFIED
Rem jhealy 11/07/95 - bitmap index support phase 1
Rem wmaimone 05/06/94 - #184921 run as sys/internal
Rem ksudarsh 04/07/94 - update loader_constraints_info
Rem ksudarsh 02/06/94 - merge changes from branch 1.3.710.2
Rem ksudarsh 02/04/94 - fix authorizations
Rem jbellemo 12/17/93 - merge changes from branch 1.3.710.1
Rem jbellemo 11/29/93 - #170173: change uid to userenv schemaid
Rem ksudarsh 11/02/92 - pdl changes
Rem tpystyne 11/22/92 - use create or replace view
Rem glumpkin 10/25/92 - Renamed from ULVIEW.SQL
Rem cheigham 04/28/92 - users should see info only on tables on which th
Rem cheigham 10/26/91 - Creation
Rem cheigham 10/07/91 - add lists, groups to tab,ind views
Rem cheigham 09/30/91 - merge changes from branch 1.3.50.2
Rem cheigham 09/23/91 - fix cdef$ column reference
Rem cheigham 08/27/91 - add ts# to loader_tab_info:
Rem cheigham 04/11/91 - expand loader_constraint_info
Rem Heigham 09/26/90 - fix v7 LOADER_TRIGGER_INFO def
Rem Heigham 07/16/90 - remove duplicate grant
Rem Heigham 06/28/90 - add v$parameters grant
Rem Heigham 01/22/90 - Creation
Rem
rem
create or replace view LOADER_COL_INFO
(TABNAME, OWNER, COLNAME, SEGCOL, TYPE, LENGTH, PRECISION, SCALE, NONULL,
OFFSET)
as
select o.name, u.name, c.name, c.segcol#, c.type#, c.length, c.precision,
c.scale, c.null$, c.offset
from sys.col$ c, sys.obj$ o, sys.user$ u
where o.obj# = c.obj#
and o.owner# = u.user#
and (o.owner# = userenv('schemaid')
or o.obj# in
(select oa.obj#
from sys.objauth$ oa
where grantee# in ( select kzsrorol
from x$kzsro
)
)
or /* user has system privileges */
exists (select null from v$enabledprivs
where priv_number in (-45 /* LOCK ANY TABLE */,
-47 /* SELECT ANY TABLE */,
-48 /* INSERT ANY TABLE */,
-49 /* UPDATE ANY TABLE */,
-50 /* DELETE ANY TABLE */)
)
)
/
drop public synonym LOADER_COL_INFO
/
create public synonym LOADER_COL_INFO for LOADER_COL_INFO
/
grant select on LOADER_COL_INFO to public
/
create or replace view LOADER_TAB_INFO
(NAME, FILENO, BLOCKNO, NUMCOLS, OWNER, OBJECTNO, TABLESPACENO, LISTS, GROUPS)
as
select o.name, t.file#, t.block#, t.cols, u.name, t.obj#, t.ts#, s.lists,
s.groups
from sys.tab$ t, sys.obj$ o, sys.user$ u, sys.seg$ s
where t.obj# = o.obj#
and o.owner# = u.user#
and t.file# = s.file#
and t.block# = s.block#
and (o.owner# = userenv('schemaid')
or o.obj# in
(select oa.obj#
from sys.objauth$ oa
where grantee# in ( select kzsrorol
from x$kzsro
)
)
or /* user has system privileges */
exists (select null from v$enabledprivs
where priv_number in (-45 /* LOCK ANY TABLE */,
-47 /* SELECT ANY TABLE */,
-48 /* INSERT ANY TABLE */,
-49 /* UPDATE ANY TABLE */,
-50 /* DELETE ANY TABLE */)
)
)
/
drop public synonym LOADER_TAB_INFO
/
create public synonym LOADER_TAB_INFO for LOADER_TAB_INFO
/
grant select on LOADER_TAB_INFO to PUBLIC
/
create or replace view LOADER_IND_INFO
(NAME, TAB_NAME, OWNER_NAME, TABLESPACENO, PCTFRE, FILENO, BLOCKNO, NUMCOLS, OWNERNO,
UNIQUENESS, OBJECTNO, LISTS, GROUPS, BITMAP)
as
select o.name, t.name, u.name, i.ts#, i.pctfree$, i.file#, i.block#, i.cols, o.owner#,
i.unique$, i.obj#, s.lists, s.groups, i.spare8
from sys.ind$ i, sys.obj$ t, sys.obj$ o, sys.user$ u, sys.seg$ s
where i.obj# = o.obj#
and i.bo# = t.obj#
and o.owner# = u.user#
and i.file# = s.file#
and i.block# = s.block#
and (o.owner# = userenv('schemaid')
or i.bo# in
(select oa.obj#
from sys.objauth$ oa
where grantee# in ( select kzsrorol
from x$kzsro
)
)
or /* user has system privileges */
exists (select null from v$enabledprivs
where priv_number in (-45 /* LOCK ANY TABLE */,
-47 /* SELECT ANY TABLE */,
-48 /* INSERT ANY TABLE */,
-49 /* UPDATE ANY TABLE */,
-50 /* DELETE ANY TABLE */)
)
)
/
drop public synonym LOADER_IND_INFO
/
create public synonym LOADER_IND_INFO for LOADER_IND_INFO
/
grant select on LOADER_IND_INFO to PUBLIC
/
create or replace view LOADER_INDCOL_INFO
(INDEX_NAME, INDEX_OWNER, POSITION, SEGCOL)
as
select idx.name, io.name, ic.pos#, ic.segcol#
from sys.user$ io, sys.obj$ idx, sys.icol$ ic
where idx.obj# = ic.obj#
and idx.owner# = io.user#
and (idx.owner# = userenv('schemaid')
or ic.bo# in
(select oa.obj#
from sys.objauth$ oa
where grantee# in ( select kzsrorol
from x$kzsro
)
)
or /* user has system privileges */
exists (select null from v$enabledprivs
where priv_number in (-45 /* LOCK ANY TABLE */,
-47 /* SELECT ANY TABLE */,
-48 /* INSERT ANY TABLE */,
-49 /* UPDATE ANY TABLE */,
-50 /* DELETE ANY TABLE */)
)
)
/
drop public synonym LOADER_INDCOL_INFO
/
create public synonym LOADER_INDCOL_INFO for LOADER_INDCOL_INFO
/
grant select on LOADER_INDCOL_INFO to PUBLIC
/
create or replace view LOADER_PARAM_INFO
(BLOCKSZ, SERIALIZABLE)
as
select v1.value, v2.value from v$parameter v1, v$parameter v2
where v1.name = 'db_block_size' and v2.name = 'serializable'
/
drop public synonym LOADER_PARAM_INFO
/
create public synonym LOADER_PARAM_INFO for LOADER_PARAM_INFO
/
grant select on LOADER_PARAM_INFO to PUBLIC
/
remark
remark VIEWS FOR FIXED TABLES OF STATISTICS
remark
remark CONTROL BLOCK STATS
remark
create or replace view v_$loadcstat as select * from v$loadcstat;
drop public synonym v$loadcstat;
create public synonym v$loadcstat for v_$loadcstat;
grant select on v_$loadcstat to public;
remark
remark TABLE STATS
remark
create or replace view v_$loadtstat as select * from v$loadtstat;
drop public synonym v$loadtstat;
create public synonym v$loadtstat for v_$loadtstat;
grant select on v_$loadtstat to public;
remark
remark VIEWS FOR V7
create or replace view LOADER_CONSTRAINT_INFO
(OWNER, CONSTRAINT_NAME, CONSTRAINT_NUMBER, TYPE, TABLE_NAME, ENABLED,
NOTNULL, NUMCOLS)
as
select u.name, con.name, cd.con#, cd.type,
o.name, cd.enabled, col.null$, cd.cols
from sys.con$ con, sys.user$ u, sys.cdef$ cd, sys.obj$ o,
sys.ccol$ cco, sys.col$ col
where con.owner# = u.user#
and con.con# = cd.con#
and cd.obj# = o.obj#
and cco.con# = con.con#
and col.obj# = cco.obj#
and col.col# = cco.col#
and (con.owner# = userenv('schemaid')
or o.obj# in
(select oa.obj#
from sys.objauth$ oa
where grantee# in ( select kzsrorol
from x$kzsro
)
)
or /* user has system privileges */
exists (select null from v$enabledprivs
where priv_number in (-45 /* LOCK ANY TABLE */,
-47 /* SELECT ANY TABLE */,
-48 /* INSERT ANY TABLE */,
-49 /* UPDATE ANY TABLE */,
-50 /* DELETE ANY TABLE */)
)
)
/
drop public synonym LOADER_CONSTRAINT_INFO
/
create public synonym LOADER_CONSTRAINT_INFO for LOADER_CONSTRAINT_INFO
/
grant select on LOADER_CONSTRAINT_INFO to PUBLIC
/
create or replace view LOADER_TRIGGER_INFO
(OWNER, TRIGGER_NAME, TABLE_NAME, ENABLED)
as
select u.name, o1.name, o.name, t.enabled
from sys.obj$ o, sys.obj$ o1, sys.user$ u, sys.trigger$ t
where t.baseobject = o.obj#
and o.owner# = u.user#
and t.obj# = o1.obj#
and (o.owner# = userenv('schemaid')
or o.obj# in
(select oa.obj#
from sys.objauth$ oa
where grantee# in ( select kzsrorol
from x$kzsro
)
)
or /* user has system privileges */
exists (select null from v$enabledprivs
where priv_number in (-45 /* LOCK ANY TABLE */,
-47 /* SELECT ANY TABLE */,
-48 /* INSERT ANY TABLE */,
-49 /* UPDATE ANY TABLE */,
-50 /* DELETE ANY TABLE */)
)
)
/
drop public synonym LOADER_TRIGGER_INFO
/
create public synonym LOADER_TRIGGER_INFO for LOADER_TRIGGER_INFO
/
grant select on LOADER_TRIGGER_INFO to PUBLIC
/
remark
remark VIEWS for Parallel Data Loader
remark
drop view LOADER_FILE_TS
/
create view LOADER_FILE_TS
(TABLESPACENO, FILENAME, FILENO)
as
select file$.ts#, v$dbfile.name, file$.file#
from file$, v$dbfile
where file$.file# = v$dbfile.file#
/
drop public synonym LOADER_FILE_TS
/
create public synonym LOADER_FILE_TS for LOADER_FILE_TS
/
grant select on LOADER_FILE_TS to public
/
|
delete from mainmenuinfo where id=368
/
delete from mainmenuconfig where infoid=368
/
delete from HtmlLabelIndex where id=20253
/
delete from HtmlLabelIndex where id=20254
/
delete from HtmlLabelIndex where id=20255
/
delete from HtmlLabelIndex where id=20256
/
delete from HtmlLabelInfo where indexid=20253
/
delete from HtmlLabelInfo where indexid=20254
/
delete from HtmlLabelInfo where indexid=20255
/
delete from HtmlLabelInfo where indexid=20256
/
INSERT INTO HtmlLabelIndex values(20253,'็จไบๆฃๆฅๆไปถไธไผ ๅคงๅฐ็ๆงไปถๆฒกๆๅฎ่ฃ
๏ผ่ฏทๆฃๆฅIE่ฎพ็ฝฎ๏ผๆไธ็ฎก็ๅ่็ณป')
/
INSERT INTO HtmlLabelIndex values(20255,'ๆญค็ฎๅฝไธไธ่ฝไธไผ ่ถ
่ฟ')
/
INSERT INTO HtmlLabelIndex values(20256,'็ๆไปถ,ๅฆๆ้่ฆไผ ้ๅคงๆไปถ,่ฏทไธ็ฎก็ๅ่็ณป!')
/
INSERT INTO HtmlLabelIndex values(20254,'ๆไผ ้ไปถไธบ:')
/
INSERT INTO HtmlLabelInfo VALUES(20253,'็จไบๆฃๆฅๆไปถไธไผ ๅคงๅฐ็ๆงไปถๆฒกๆๅฎ่ฃ
๏ผ่ฏทๆฃๆฅIE่ฎพ็ฝฎ๏ผๆไธ็ฎก็ๅ่็ณป',7)
/
INSERT INTO HtmlLabelInfo VALUES(20253,'don not install activex',8)
/
INSERT INTO HtmlLabelInfo VALUES(20254,'ๆไผ ้ไปถไธบ:',7)
/
INSERT INTO HtmlLabelInfo VALUES(20254,'you upload file is:',8)
/
INSERT INTO HtmlLabelInfo VALUES(20255,'ๆญค็ฎๅฝไธไธ่ฝไธไผ ่ถ
่ฟ',7)
/
INSERT INTO HtmlLabelInfo VALUES(20255,'this catelog con not uplaod file exceed',8)
/
INSERT INTO HtmlLabelInfo VALUES(20256,'็ๆไปถ,ๅฆๆ้่ฆไผ ้ๅคงๆไปถ,่ฏทไธ็ฎก็ๅ่็ณป๏ผ',7)
/
INSERT INTO HtmlLabelInfo VALUES(20256,'''file,if you want send max file,please contact to administrator!',8)
/
|
๏ปฟ/*!40101 SET NAMES utf8 */;
CREATE DATABASE /*!32312 IF NOT EXISTS*/`ocomon_rc6` /*!40100 DEFAULT CHARACTER SET utf8 */;
CREATE USER 'ocomon'@'localhost' IDENTIFIED BY 'senha_ocomon_mysql';
GRANT SELECT, INSERT, UPDATE, DELETE, DROP, EXECUTE ON `ocomon_rc6`.* TO 'ocomon'@'localhost';
USE `ocomon_rc6`;
--
-- Estrutura da tabela `CCUSTO`
--
CREATE TABLE `CCUSTO` (
`codigo` int(4) NOT NULL auto_increment,
`codccusto` varchar(6) NOT NULL default '',
`descricao` varchar(25) NOT NULL default '',
PRIMARY KEY (`codigo`),
KEY `codccusto` (`codccusto`)
) COMMENT='Tabela de Centros de Custo';
-- --------------------------------------------------------
--
-- Estrutura da tabela `assentamentos`
--
CREATE TABLE `assentamentos` (
`numero` int(11) NOT NULL auto_increment,
`ocorrencia` int(11) NOT NULL default '0',
`assentamento` text NOT NULL,
`data` datetime default NULL,
`responsavel` int(4) NOT NULL default '0',
`responsavelbkp` varchar(20) default NULL,
PRIMARY KEY (`numero`),
KEY `ocorrencia` (`ocorrencia`)
) ;
-- --------------------------------------------------------
--
-- Estrutura da tabela `assistencia`
--
CREATE TABLE `assistencia` (
`assist_cod` int(4) NOT NULL auto_increment,
`assist_desc` varchar(30) default NULL,
PRIMARY KEY (`assist_cod`)
) COMMENT='Tabela de tipos de assistencia para manutencao';
-- --------------------------------------------------------
--
-- Estrutura da tabela `avisos`
--
CREATE TABLE `avisos` (
`aviso_id` int(11) NOT NULL auto_increment,
`avisos` text,
`data` datetime default NULL,
`origem` int(4) NOT NULL default '0',
`status` varchar(100) default NULL,
`area` int(11) NOT NULL default '0',
`origembkp` varchar(20) default NULL,
PRIMARY KEY (`aviso_id`)
) ;
-- --------------------------------------------------------
--
-- Estrutura da tabela `cat_problema_sistemas`
--
CREATE TABLE `cat_problema_sistemas` (
`ctps_id` int(10) NOT NULL default '0',
`ctps_descricao` varchar(100) NOT NULL default '',
`ctps_peso` decimal(10,2) NOT NULL default '1.00',
PRIMARY KEY (`ctps_id`)
) ;
-- --------------------------------------------------------
--
-- Estrutura da tabela `categoriaXproblema_sistemas`
--
CREATE TABLE `categoriaXproblema_sistemas` (
`prob_id` int(11) NOT NULL default '0',
`ctps_id` int(11) NOT NULL default '0',
`ctps_id_old` int(11) NOT NULL default '0',
PRIMARY KEY (`prob_id`),
KEY `ctps_id` (`ctps_id`,`prob_id`)
) ;
-- --------------------------------------------------------
--
-- Estrutura da tabela `categorias`
--
CREATE TABLE `categorias` (
`cat_cod` int(4) NOT NULL auto_increment,
`cat_desc` varchar(30) NOT NULL default '',
PRIMARY KEY (`cat_cod`)
) COMMENT='Tabela de categoria de softwares';
-- --------------------------------------------------------
--
-- Estrutura da tabela `dominios`
--
CREATE TABLE `dominios` (
`dom_cod` int(4) NOT NULL auto_increment,
`dom_desc` varchar(15) NOT NULL default '',
PRIMARY KEY (`dom_cod`)
) COMMENT='Tabela de Domรญnios de Rede';
-- --------------------------------------------------------
--
-- Estrutura da tabela `emprestimos`
--
CREATE TABLE `emprestimos` (
`empr_id` int(11) NOT NULL auto_increment,
`material` text NOT NULL,
`responsavel` int(4) NOT NULL default '0',
`data_empr` datetime default NULL,
`data_devol` datetime default NULL,
`quem` varchar(100) default NULL,
`local` varchar(100) default NULL,
`ramal` int(11) default NULL,
`responsavelbkp` varchar(20) default NULL,
PRIMARY KEY (`empr_id`)
) ;
-- --------------------------------------------------------
--
-- Estrutura da tabela `equipamentos`
--
CREATE TABLE `equipamentos` (
`comp_cod` int(4) unsigned NOT NULL auto_increment,
`comp_inv` int(6) NOT NULL default '0',
`comp_sn` varchar(30) default NULL,
`comp_marca` int(4) unsigned NOT NULL default '0',
`comp_mb` int(4) default NULL,
`comp_proc` int(4) unsigned default NULL,
`comp_memo` int(4) unsigned default NULL,
`comp_video` int(4) unsigned default NULL,
`comp_som` int(4) unsigned default NULL,
`comp_rede` int(4) unsigned default NULL,
`comp_modelohd` int(4) unsigned default NULL,
`comp_modem` int(4) unsigned default NULL,
`comp_cdrom` int(4) unsigned default NULL,
`comp_dvd` int(4) unsigned default NULL,
`comp_grav` int(4) unsigned default NULL,
`comp_nome` varchar(15) default NULL,
`comp_local` int(4) unsigned NOT NULL default '0',
`comp_fornecedor` int(4) default NULL,
`comp_nf` varchar(30) default NULL,
`comp_coment` text,
`comp_data` datetime default NULL,
`comp_valor` float default NULL,
`comp_data_compra` datetime NOT NULL default '0000-00-00 00:00:00',
`comp_inst` int(4) NOT NULL default '0',
`comp_ccusto` int(6) default NULL,
`comp_tipo_equip` int(4) NOT NULL default '0',
`comp_tipo_imp` int(4) default NULL,
`comp_resolucao` int(4) default NULL,
`comp_polegada` int(4) default NULL,
`comp_fab` int(4) NOT NULL default '0',
`comp_situac` int(4) default NULL,
`comp_reitoria` int(4) default NULL,
`comp_tipo_garant` int(4) default NULL,
`comp_garant_meses` int(4) default NULL,
`comp_assist` int(4) default NULL,
PRIMARY KEY (`comp_inv`,`comp_inst`),
KEY `comp_cod` (`comp_cod`),
KEY `comp_inv` (`comp_inv`),
KEY `comp_assist` (`comp_assist`)
) COMMENT='Tabela principal modulo de inventario de computadores';
-- --------------------------------------------------------
--
-- Estrutura da tabela `estoque`
--
CREATE TABLE `estoque` (
`estoq_cod` int(4) NOT NULL auto_increment,
`estoq_tipo` int(4) NOT NULL default '0',
`estoq_desc` int(4) NOT NULL default '0',
`estoq_sn` varchar(30) default NULL,
`estoq_local` int(4) NOT NULL default '0',
`estoq_comentario` varchar(250) default NULL,
PRIMARY KEY (`estoq_cod`),
KEY `estoq_tipo` (`estoq_tipo`,`estoq_desc`),
KEY `estoq_local` (`estoq_local`)
) COMMENT='Tabela de estoque de itens.';
-- --------------------------------------------------------
--
-- Estrutura da tabela `fabricantes`
--
CREATE TABLE `fabricantes` (
`fab_cod` int(4) NOT NULL auto_increment,
`fab_nome` varchar(30) NOT NULL default '',
`fab_tipo` int(4) default NULL,
PRIMARY KEY (`fab_cod`),
KEY `fab_cod` (`fab_cod`),
KEY `fab_tipo` (`fab_tipo`)
) COMMENT='Tabela de fabricantes de equipamentos do Invmon';
-- --------------------------------------------------------
--
-- Estrutura da tabela `feriados`
--
CREATE TABLE `feriados` (
`cod_feriado` int(4) NOT NULL auto_increment,
`data_feriado` datetime NOT NULL default '0000-00-00 00:00:00',
`desc_feriado` varchar(40) default NULL,
PRIMARY KEY (`cod_feriado`),
KEY `data_feriado` (`data_feriado`)
) COMMENT='Tabela de feriados';
-- --------------------------------------------------------
--
-- Estrutura da tabela `fornecedores`
--
CREATE TABLE `fornecedores` (
`forn_cod` int(4) NOT NULL auto_increment,
`forn_nome` varchar(30) NOT NULL default '',
`forn_fone` varchar(30) NOT NULL default '',
PRIMARY KEY (`forn_cod`),
KEY `forn_cod` (`forn_cod`)
) COMMENT='Tabela de fornecedores de equipamentos';
-- --------------------------------------------------------
--
-- Estrutura da tabela `historico`
--
CREATE TABLE `historico` (
`hist_cod` int(4) NOT NULL auto_increment,
`hist_inv` int(6) NOT NULL default '0',
`hist_inst` int(4) NOT NULL default '0',
`hist_local` int(4) NOT NULL default '0',
`hist_data` datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (`hist_cod`),
KEY `hist_inv` (`hist_inv`),
KEY `hist_inst` (`hist_inst`)
) COMMENT='Tabela de controle de histรณrico de locais por onde o equipam';
-- --------------------------------------------------------
--
-- Estrutura da tabela `hw_sw`
--
CREATE TABLE `hw_sw` (
`hws_cod` int(4) NOT NULL auto_increment,
`hws_sw_cod` int(4) NOT NULL default '0',
`hws_hw_cod` int(4) NOT NULL default '0',
`hws_hw_inst` int(4) NOT NULL default '0',
PRIMARY KEY (`hws_cod`),
KEY `hws_sw_cod` (`hws_sw_cod`,`hws_hw_cod`),
KEY `hws_hw_inst` (`hws_hw_inst`)
) COMMENT='Tabela de relacionamentos entre equipamentos e softwares';
-- --------------------------------------------------------
--
-- Estrutura da tabela `instituicao`
--
CREATE TABLE `instituicao` (
`inst_cod` int(4) NOT NULL auto_increment,
`inst_nome` varchar(30) NOT NULL default '',
`inst_status` int(11) NOT NULL default '1',
PRIMARY KEY (`inst_cod`),
KEY `inst_cod` (`inst_cod`),
KEY `inst_status` (`inst_status`)
) COMMENT='Tabela de Instituiรงรตes Lasalistas';
-- --------------------------------------------------------
--
-- Estrutura da tabela `itens`
--
CREATE TABLE `itens` (
`item_cod` int(4) NOT NULL auto_increment,
`item_nome` varchar(40) NOT NULL default '',
PRIMARY KEY (`item_cod`),
KEY `item_nome` (`item_nome`)
) COMMENT='Tabela de componentes individuais';
-- --------------------------------------------------------
--
-- Estrutura da tabela `licencas`
--
CREATE TABLE `licencas` (
`lic_cod` int(4) NOT NULL auto_increment,
`lic_desc` varchar(30) NOT NULL default '',
PRIMARY KEY (`lic_cod`)
) COMMENT='Tabela de tipos de licenรงas de softwares';
-- --------------------------------------------------------
--
-- Estrutura da tabela `localizacao`
--
CREATE TABLE `localizacao` (
`loc_id` int(11) NOT NULL auto_increment,
`local` char(200) default NULL,
`loc_reitoria` int(4) default '0',
`loc_prior` int(4) default NULL,
`loc_dominio` int(4) default NULL,
`loc_predio` int(4) default NULL,
`loc_status` int(4) NOT NULL default '1',
UNIQUE KEY `loc_id` (`loc_id`),
KEY `loc_sla` (`loc_prior`),
KEY `loc_dominio` (`loc_dominio`),
KEY `loc_predio` (`loc_predio`),
KEY `loc_status` (`loc_status`),
KEY `loc_prior` (`loc_prior`)
) ;
-- --------------------------------------------------------
--
-- Estrutura da tabela `marcas_comp`
--
CREATE TABLE `marcas_comp` (
`marc_cod` int(4) unsigned NOT NULL auto_increment,
`marc_nome` varchar(30) NOT NULL default '0',
`marc_tipo` int(4) NOT NULL default '0',
PRIMARY KEY (`marc_cod`),
KEY `marc_cod` (`marc_cod`),
KEY `marc_tipo` (`marc_tipo`)
) COMMENT='Tabela das marcas de computadores';
-- --------------------------------------------------------
--
-- Estrutura da tabela `materiais`
--
CREATE TABLE `materiais` (
`mat_cod` int(4) NOT NULL auto_increment,
`mat_nome` varchar(100) NOT NULL default '',
`mat_qtd` int(11) NOT NULL default '0',
`mat_caixa` int(4) NOT NULL default '0',
`mat_data` datetime NOT NULL default '0000-00-00 00:00:00',
`mat_obs` varchar(200) NOT NULL default '',
`mat_modelo_equip` int(4) default NULL,
PRIMARY KEY (`mat_cod`),
KEY `mat_cod_2` (`mat_cod`),
KEY `mat_modelo_equip` (`mat_modelo_equip`)
) COMMENT='Tabela de materiais do Helpdesk';
-- --------------------------------------------------------
--
-- Estrutura da tabela `modelos_itens`
--
CREATE TABLE `modelos_itens` (
`mdit_cod` int(4) NOT NULL auto_increment,
`mdit_fabricante` varchar(30) NOT NULL default '',
`mdit_desc` varchar(40) default NULL,
`mdit_desc_capacidade` float default NULL,
`mdit_tipo` int(4) NOT NULL default '0',
`mdit_cod_old` int(4) default NULL,
`mdit_sufixo` varchar(5) default NULL,
PRIMARY KEY (`mdit_cod`),
KEY `mdit_desc` (`mdit_desc`),
KEY `mdit_tipo` (`mdit_tipo`),
KEY `cod_old` (`mdit_cod_old`)
) COMMENT='Tabela de modelos de componentes';
-- --------------------------------------------------------
--
-- Estrutura da tabela `modulos`
--
CREATE TABLE `modulos` (
`modu_cod` int(4) NOT NULL auto_increment,
`modu_nome` varchar(15) NOT NULL default '',
PRIMARY KEY (`modu_cod`),
KEY `modu_nome` (`modu_nome`)
) COMMENT='Tabela de mรยณdulos do sistema';
-- --------------------------------------------------------
--
-- Estrutura da tabela `moldes`
--
CREATE TABLE `moldes` (
`mold_cod` int(4) NOT NULL auto_increment,
`mold_inv` int(6) default NULL,
`mold_sn` varchar(30) default NULL,
`mold_marca` int(4) NOT NULL default '0',
`mold_mb` int(4) default NULL,
`mold_proc` int(4) default NULL,
`mold_memo` int(4) default NULL,
`mold_video` int(4) default NULL,
`mold_som` int(4) default NULL,
`mold_rede` int(4) default NULL,
`mold_modelohd` int(4) default NULL,
`mold_modem` int(4) default NULL,
`mold_cdrom` int(4) default NULL,
`mold_dvd` int(4) default NULL,
`mold_grav` int(4) default NULL,
`mold_nome` varchar(10) default NULL,
`mold_local` int(4) default NULL,
`mold_fornecedor` int(4) default NULL,
`mold_nf` varchar(30) default NULL,
`mold_coment` varchar(200) default NULL,
`mold_data` datetime default NULL,
`mold_valor` float default NULL,
`mold_data_compra` datetime NOT NULL default '0000-00-00 00:00:00',
`mold_inst` int(4) default NULL,
`mold_ccusto` int(4) default NULL,
`mold_tipo_equip` int(4) NOT NULL default '0',
`mold_tipo_imp` int(4) default NULL,
`mold_resolucao` int(4) default NULL,
`mold_polegada` int(4) default NULL,
`mold_fab` int(4) default NULL,
PRIMARY KEY (`mold_marca`),
KEY `mold_cod` (`mold_cod`)
) COMMENT='Tabela de padrรตes de configuraรงรตes';
-- --------------------------------------------------------
--
-- Estrutura da tabela `nivel`
--
CREATE TABLE `nivel` (
`nivel_cod` int(4) NOT NULL auto_increment,
`nivel_nome` varchar(20) NOT NULL default '',
PRIMARY KEY (`nivel_cod`)
) COMMENT='Tabela de nรญveis de acesso ao invmon';
-- --------------------------------------------------------
--
-- Estrutura da tabela `ocorrencias`
--
CREATE TABLE `ocorrencias` (
`numero` int(11) NOT NULL auto_increment,
`problema` int(11) NOT NULL default '0',
`descricao` text NOT NULL,
`equipamento` int(6) default NULL,
`sistema` int(11) NOT NULL default '0',
`contato` varchar(100) NOT NULL default '',
`telefone` varchar(10) default NULL,
`local` int(11) NOT NULL default '0',
`operador` int(4) NOT NULL default '0',
`data_abertura` datetime default NULL,
`data_fechamento` datetime default NULL,
`status` int(11) default NULL,
`data_atendimento` datetime default NULL,
`instituicao` int(4) default NULL,
`aberto_por` int(4) NOT NULL default '0',
`operadorbkp` varchar(20) default NULL,
`abertoporbkp` varchar(20) default NULL,
PRIMARY KEY (`numero`),
KEY `data_abertura` (`data_abertura`),
KEY `data_fechamento` (`data_fechamento`),
KEY `local` (`local`),
KEY `aberto_por` (`aberto_por`)
) ;
-- --------------------------------------------------------
--
-- Estrutura da tabela `permissoes`
--
CREATE TABLE `permissoes` (
`perm_cod` int(4) NOT NULL auto_increment,
`perm_area` int(4) NOT NULL default '0',
`perm_modulo` int(4) NOT NULL default '0',
`perm_flag` int(4) NOT NULL default '0',
PRIMARY KEY (`perm_cod`),
KEY `perm_area` (`perm_area`,`perm_modulo`,`perm_flag`)
) COMMENT='Tabela para permissoes das รกreas';
-- --------------------------------------------------------
--
-- Estrutura da tabela `polegada`
--
CREATE TABLE `polegada` (
`pole_cod` int(4) NOT NULL auto_increment,
`pole_nome` varchar(30) NOT NULL default '',
PRIMARY KEY (`pole_cod`),
KEY `pole_cod` (`pole_cod`)
) COMMENT='Tabela de polegadas de monitores de vรญdeo';
-- --------------------------------------------------------
--
-- Estrutura da tabela `predios`
--
CREATE TABLE `predios` (
`pred_cod` int(4) NOT NULL auto_increment,
`pred_desc` varchar(15) NOT NULL default '',
PRIMARY KEY (`pred_cod`)
) COMMENT='Tabela de predios - vinculada a tabela de localizaรยงรยตes';
-- --------------------------------------------------------
--
-- Estrutura da tabela `prioridades`
--
CREATE TABLE `prioridades` (
`prior_cod` int(4) NOT NULL auto_increment,
`prior_nivel` varchar(15) NOT NULL default '',
`prior_sla` int(4) NOT NULL default '0',
PRIMARY KEY (`prior_cod`),
KEY `prior_nivel` (`prior_nivel`,`prior_sla`),
KEY `prior_sla` (`prior_sla`)
) COMMENT='Tabela de prioridades para resposta de chamados';
-- --------------------------------------------------------
--
-- Estrutura da tabela `problemas`
--
CREATE TABLE `problemas` (
`prob_id` int(11) NOT NULL auto_increment,
`problema` varchar(100) NOT NULL default '',
`prob_area` int(4) default NULL,
`prob_sla` int(4) default NULL,
PRIMARY KEY (`prob_id`),
KEY `prob_id` (`prob_id`),
KEY `prob_area` (`prob_area`),
KEY `prob_sla` (`prob_sla`)
) ;
-- --------------------------------------------------------
--
-- Estrutura da tabela `reitorias`
--
CREATE TABLE `reitorias` (
`reit_cod` int(4) NOT NULL auto_increment,
`reit_nome` varchar(30) NOT NULL default '',
PRIMARY KEY (`reit_cod`),
KEY `reit_nome` (`reit_nome`)
) COMMENT='Tabela de reitorias do UniLasalle';
-- --------------------------------------------------------
--
-- Estrutura da tabela `resolucao`
--
CREATE TABLE `resolucao` (
`resol_cod` int(4) NOT NULL auto_increment,
`resol_nome` varchar(30) NOT NULL default '',
PRIMARY KEY (`resol_cod`),
KEY `resol_cod` (`resol_cod`)
) COMMENT='Tabela de resoluรงรตes para scanners';
-- --------------------------------------------------------
--
-- Estrutura da tabela `sistemas`
--
CREATE TABLE `sistemas` (
`sis_id` int(11) NOT NULL auto_increment,
`sistema` varchar(100) default NULL,
`sis_status` int(4) NOT NULL default '1',
`sis_email` varchar(35) default NULL,
PRIMARY KEY (`sis_id`),
KEY `sis_status` (`sis_status`)
) ;
ALTER TABLE `sistemas` ADD `sis_atende` INT( 1 ) DEFAULT '1' NOT NULL ;
-- --------------------------------------------------------
--
-- Estrutura da tabela `situacao`
--
CREATE TABLE `situacao` (
`situac_cod` int(4) NOT NULL auto_increment,
`situac_nome` varchar(20) NOT NULL default '',
`situac_desc` varchar(200) default NULL,
PRIMARY KEY (`situac_cod`),
KEY `situac_cod` (`situac_cod`)
) COMMENT='Tabela de situaรงรฃo de computadores quanto ao seu funcionamen';
-- --------------------------------------------------------
--
-- Estrutura da tabela `sla_solucao`
--
CREATE TABLE `sla_solucao` (
`slas_cod` int(4) NOT NULL auto_increment,
`slas_tempo` int(6) NOT NULL default '0',
`slas_desc` varchar(15) NOT NULL default '',
PRIMARY KEY (`slas_cod`),
KEY `slas_tempo` (`slas_tempo`),
KEY `slas_tempo_2` (`slas_tempo`)
) COMMENT='Tabela de SLAs de tempo de soluรงรฃo';
-- --------------------------------------------------------
--
-- Estrutura da tabela `softwares`
--
CREATE TABLE `softwares` (
`soft_cod` int(4) NOT NULL auto_increment,
`soft_fab` int(4) NOT NULL default '0',
`soft_desc` varchar(30) NOT NULL default '',
`soft_versao` varchar(10) NOT NULL default '',
`soft_cat` int(4) NOT NULL default '0',
`soft_tipo_lic` int(4) NOT NULL default '0',
`soft_qtd_lic` int(4) default NULL,
`soft_forn` int(4) default NULL,
`soft_nf` varchar(20) default NULL,
PRIMARY KEY (`soft_cod`),
KEY `soft_fab` (`soft_fab`,`soft_cat`,`soft_tipo_lic`),
KEY `soft_versao` (`soft_versao`),
KEY `soft_nf` (`soft_nf`),
KEY `soft_forn` (`soft_forn`)
) COMMENT='Tabela Softwares do sistema';
-- --------------------------------------------------------
--
-- Estrutura da tabela `solucoes`
--
CREATE TABLE `solucoes` (
`numero` int(11) NOT NULL default '0',
`problema` text NOT NULL,
`solucao` text NOT NULL,
`data` datetime default NULL,
`responsavel` int(4) NOT NULL default '0',
`responsavelbkp` varchar(20) default NULL,
PRIMARY KEY (`numero`),
KEY `numero` (`numero`)
) ;
-- --------------------------------------------------------
--
-- Estrutura da tabela `status`
--
CREATE TABLE `status` (
`stat_id` int(11) NOT NULL auto_increment,
`status` varchar(100) NOT NULL default '',
`stat_cat` int(4) default NULL,
`stat_painel` int(2) default NULL,
PRIMARY KEY (`stat_id`),
KEY `stat_cat` (`stat_cat`),
KEY `stat_painel` (`stat_painel`)
) ;
-- --------------------------------------------------------
--
-- Estrutura da tabela `status_categ`
--
CREATE TABLE `status_categ` (
`stc_cod` int(4) NOT NULL auto_increment,
`stc_desc` varchar(30) NOT NULL default '',
PRIMARY KEY (`stc_cod`)
) COMMENT='Tabela de Categorias de Status para Chamados';
-- --------------------------------------------------------
--
-- Estrutura da tabela `sw_padrao`
--
CREATE TABLE `sw_padrao` (
`swp_cod` int(4) NOT NULL auto_increment,
`swp_sw_cod` int(4) NOT NULL default '0',
PRIMARY KEY (`swp_cod`),
KEY `swp_sw_cod` (`swp_sw_cod`)
) COMMENT='Tabela de softwares padrao para cada equipamento';
-- --------------------------------------------------------
--
-- Estrutura da tabela `tempo_garantia`
--
CREATE TABLE `tempo_garantia` (
`tempo_cod` int(4) NOT NULL auto_increment,
`tempo_meses` int(4) NOT NULL default '0',
PRIMARY KEY (`tempo_cod`),
KEY `tempo_meses` (`tempo_meses`)
) COMMENT='Tabela de tempos de duraรงรฃo das garantias';
-- --------------------------------------------------------
--
-- Estrutura da tabela `tempo_status`
--
CREATE TABLE `tempo_status` (
`ts_cod` int(6) NOT NULL auto_increment,
`ts_ocorrencia` int(5) NOT NULL default '0',
`ts_status` int(4) NOT NULL default '0',
`ts_tempo` int(10) NOT NULL default '0',
`ts_data` datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (`ts_cod`),
KEY `ts_ocorrencia` (`ts_ocorrencia`,`ts_status`)
) COMMENT='Tabela para armazenar o tempo dos chamados em cada status';
-- --------------------------------------------------------
--
-- Estrutura da tabela `tipo_equip`
--
CREATE TABLE `tipo_equip` (
`tipo_cod` int(11) NOT NULL auto_increment,
`tipo_nome` varchar(30) NOT NULL default '',
PRIMARY KEY (`tipo_cod`),
KEY `tipo_cod` (`tipo_cod`)
) COMMENT='Tabela de Tipos de Equipamentos de informรกtica';
-- --------------------------------------------------------
--
-- Estrutura da tabela `tipo_garantia`
--
CREATE TABLE `tipo_garantia` (
`tipo_garant_cod` int(4) NOT NULL auto_increment,
`tipo_garant_nome` varchar(30) NOT NULL default '',
PRIMARY KEY (`tipo_garant_cod`)
) COMMENT='Tabela de tipos de garantias de equipamentos';
-- --------------------------------------------------------
--
-- Estrutura da tabela `tipo_imp`
--
CREATE TABLE `tipo_imp` (
`tipo_imp_cod` int(11) NOT NULL auto_increment,
`tipo_imp_nome` varchar(30) NOT NULL default '',
PRIMARY KEY (`tipo_imp_cod`),
KEY `tipo_imp_cod` (`tipo_imp_cod`)
) COMMENT='Tabela de tipos de impressoras';
-- --------------------------------------------------------
--
-- Estrutura da tabela `tipo_item`
--
CREATE TABLE `tipo_item` (
`tipo_it_cod` int(4) NOT NULL auto_increment,
`tipo_it_desc` varchar(20) NOT NULL default '',
PRIMARY KEY (`tipo_it_cod`)
) COMMENT='Tipos de itens - hw ou sw';
-- --------------------------------------------------------
--
-- Estrutura da tabela `usuarios`
--
CREATE TABLE `usuarios` (
`user_id` int(4) NOT NULL auto_increment,
`login` varchar(100) NOT NULL default '',
`nome` varchar(200) NOT NULL default '',
`password` varchar(200) NOT NULL default '',
`data_inc` date default NULL,
`data_admis` date default NULL,
`email` varchar(100) default NULL,
`fone` varchar(10) default NULL,
`nivel` char(2) default NULL,
`AREA` char(3) default 'ALL',
PRIMARY KEY (`user_id`),
KEY `login` (`login`)
) COMMENT='Tabela de operadores do sistema';
-- --------------------------------------------------------
--
-- Estrutura da tabela `usuarios_areas`
--
CREATE TABLE `usuarios_areas` (
`uarea_cod` int(4) NOT NULL auto_increment,
`uarea_uid` int(4) NOT NULL default '0',
`uarea_sid` varchar(4) NOT NULL default '',
PRIMARY KEY (`uarea_cod`),
KEY `uarea_uid` (`uarea_uid`,`uarea_sid`)
) COMMENT='Tabela de areas que o usuario pertence';
-- Insere o usuario ADMIN
INSERT INTO `usuarios` (`login` , `nome` , `password` , `data_inc` , `data_admis` , `email` , `fone` , `nivel` , `AREA` )
VALUES ('admin', 'Administrador do Sistema', '21232f297a57a5a743894a0e4a801fc3', now(), now() , 'admin@yourdomain.com' , '123456' , 1 , '1');
--
-- Extraindo dados da tabela `assistencia`
--
INSERT INTO `assistencia` (`assist_cod`, `assist_desc`) VALUES (1, 'Contrato de Manutenรงรฃo');
INSERT INTO `assistencia` (`assist_cod`, `assist_desc`) VALUES (2, 'Garantia do Fabricante');
INSERT INTO `assistencia` (`assist_cod`, `assist_desc`) VALUES (3, 'Sem Cobertura');
--
-- Extraindo dados da tabela `modulos`
--
INSERT INTO `modulos` VALUES (2, 'inventรกrio');
INSERT INTO `modulos` VALUES (1, 'ocorrรชncias');
--
-- Extraindo dados da tabela `categorias`
--
INSERT INTO `categorias` VALUES (1, 'Escritรณrio');
INSERT INTO `categorias` VALUES (2, 'Browser');
INSERT INTO `categorias` VALUES (3, 'Editor');
INSERT INTO `categorias` VALUES (4, 'Visualizador');
INSERT INTO `categorias` VALUES (5, 'Jogos');
INSERT INTO `categorias` VALUES (6, 'Sistema Operacional');
INSERT INTO `categorias` VALUES (7, 'Antivรญrus');
INSERT INTO `categorias` VALUES (8, 'E-mail');
INSERT INTO `categorias` VALUES (9, 'Desenvolvimento');
INSERT INTO `categorias` VALUES (10, 'Utilitรกrios');
INSERT INTO `categorias` VALUES (11, 'Compactador');
--
-- Extraindo dados da tabela `itens`
--
INSERT INTO `itens` VALUES (1, 'HD');
INSERT INTO `itens` VALUES (2, 'Placa de vรญdeo');
INSERT INTO `itens` VALUES (3, 'Placa de rede');
INSERT INTO `itens` VALUES (4, 'Placa de som');
INSERT INTO `itens` VALUES (5, 'CD-ROM');
INSERT INTO `itens` VALUES (6, 'Modem');
INSERT INTO `itens` VALUES (7, 'Memรณria');
INSERT INTO `itens` VALUES (8, 'DVD');
INSERT INTO `itens` VALUES (9, 'Gravador');
INSERT INTO `itens` VALUES (10, 'Placa mรฃe');
INSERT INTO `itens` VALUES (11, 'Processador');
INSERT INTO `itens` VALUES (12, 'Placas Diversas'); -- Alterado Por lrgamito
INSERT INTO `itens` VALUES (13, 'Leitor de Cartรฃo'); -- Alterado Por lrgamito
INSERT INTO `itens` VALUES (14, 'OS'); -- Alterado Por lrgamito
-- Extraindo dados da tabela `dominios`
--
INSERT INTO `dominios` VALUES (1, 'ARQUIVOS');
--
-- Extraindo dados da tabela `fabricantes`
--
INSERT INTO `fabricantes` VALUES (1, 'Samsung', 1);
INSERT INTO `fabricantes` VALUES (2, 'LG', 1);
INSERT INTO `fabricantes` VALUES (3, 'Philips', 1);
INSERT INTO `fabricantes` VALUES (4, 'Toshiba', 1);
INSERT INTO `fabricantes` VALUES (5, 'Compaq', 1);
INSERT INTO `fabricantes` VALUES (6, 'IBM', 1);
INSERT INTO `fabricantes` VALUES (7, 'Dell', 1);
INSERT INTO `fabricantes` VALUES (8, 'Epson', 1);
INSERT INTO `fabricantes` VALUES (9, 'HP', 1);
INSERT INTO `fabricantes` VALUES (10, 'Lexmark', 1);
INSERT INTO `fabricantes` VALUES (11, 'Ricoh', 1);
INSERT INTO `fabricantes` VALUES (12, 'Creative', 1);
INSERT INTO `fabricantes` VALUES (13, 'Alfa Digital', 1);
INSERT INTO `fabricantes` VALUES (14, 'Itautec', 1);
INSERT INTO `fabricantes` VALUES (15, 'Metron', 1);
INSERT INTO `fabricantes` VALUES (16, 'Netrix', 1);
INSERT INTO `fabricantes` VALUES (17, 'Waytech', 1);
INSERT INTO `fabricantes` VALUES (18, 'Canon', 1);
INSERT INTO `fabricantes` VALUES (19, 'Montada', 1);
INSERT INTO `fabricantes` VALUES (20, '3 Com', 1);
INSERT INTO `fabricantes` VALUES (21, 'SMS', 1);
INSERT INTO `fabricantes` VALUES (22, 'AOC', 1);
INSERT INTO `fabricantes` VALUES (23, 'Brother', 1);
INSERT INTO `fabricantes` VALUES (24, 'Iomega', 1);
INSERT INTO `fabricantes` VALUES (25, 'Bematech', 1);
INSERT INTO `fabricantes` VALUES (26, 'Mark Vision', 1);
INSERT INTO `fabricantes` VALUES (27, 'NK', 1);
INSERT INTO `fabricantes` VALUES (28, 'Icone Sul', 1);
INSERT INTO `fabricantes` VALUES (29, 'TCI', 1);
INSERT INTO `fabricantes` VALUES (30, 'Infoway P75', 1);
INSERT INTO `fabricantes` VALUES (31, 'AdRS', 1);
INSERT INTO `fabricantes` VALUES (32, 'Compudesk', 1);
INSERT INTO `fabricantes` VALUES (33, 'Perto', 1);
INSERT INTO `fabricantes` VALUES (34, 'Okipage', 1);
INSERT INTO `fabricantes` VALUES (35, 'NCS', 1);
INSERT INTO `fabricantes` VALUES (36, 'SACT', 1);
INSERT INTO `fabricantes` VALUES (37, 'GTI', 1);
INSERT INTO `fabricantes` VALUES (38, 'Troni', 1);
INSERT INTO `fabricantes` VALUES (39, 'SID', 1);
INSERT INTO `fabricantes` VALUES (40, 'Yamaha', 1);
INSERT INTO `fabricantes` VALUES (41, 'CP Eletronica', 1);
INSERT INTO `fabricantes` VALUES (42, 'Kingston', 1);
INSERT INTO `fabricantes` VALUES (43, 'Encore', 1);
INSERT INTO `fabricantes` VALUES (44, 'Gรชnius', 1);
INSERT INTO `fabricantes` VALUES (45, 'Planet', 1);
INSERT INTO `fabricantes` VALUES (46, 'Inovar', 1);
INSERT INTO `fabricantes` VALUES (47, 'InFocus', 1);
INSERT INTO `fabricantes` VALUES (48, 'TrendNet', 1);
INSERT INTO `fabricantes` VALUES (49, 'Elebra', 1);
INSERT INTO `fabricantes` VALUES (51, 'EMC', 1);
INSERT INTO `fabricantes` VALUES (52, 'ABC BULL', 1);
INSERT INTO `fabricantes` VALUES (53, 'Facit', 1);
INSERT INTO `fabricantes` VALUES (54, 'VideoComp', 1);
INSERT INTO `fabricantes` VALUES (55, 'Techmedia', 1);
INSERT INTO `fabricantes` VALUES (56, 'Advanced', 1);
INSERT INTO `fabricantes` VALUES (57, 'TDA', 1);
INSERT INTO `fabricantes` VALUES (58, 'Byte On', 1);
INSERT INTO `fabricantes` VALUES (59, 'Acer', 1);
INSERT INTO `fabricantes` VALUES (60, 'Visioneer', 1);
INSERT INTO `fabricantes` VALUES (61, 'Extreme', 1);
INSERT INTO `fabricantes` VALUES (62, 'SUN', 3);
INSERT INTO `fabricantes` VALUES (63, 'D-link', 1);
INSERT INTO `fabricantes` VALUES (64, 'Liesegang', 1);
INSERT INTO `fabricantes` VALUES (65, 'N/A', 1);
INSERT INTO `fabricantes` VALUES (66, 'Sony', 1);
INSERT INTO `fabricantes` VALUES (67, 'Lightware', 1);
INSERT INTO `fabricantes` VALUES (68, 'PowerWare', 1);
INSERT INTO `fabricantes` VALUES (69, 'Ericsson', 1);
INSERT INTO `fabricantes` VALUES (70, 'Cisco', 1);
INSERT INTO `fabricantes` VALUES (71, 'Metrologic', 1);
INSERT INTO `fabricantes` VALUES (72, 'Gertec', 1);
INSERT INTO `fabricantes` VALUES (73, 'Aligent', 1);
INSERT INTO `fabricantes` VALUES (74, 'DIGI', 1);
INSERT INTO `fabricantes` VALUES (75, 'Adobe', 2);
INSERT INTO `fabricantes` VALUES (76, 'Microsoft', 2);
INSERT INTO `fabricantes` VALUES (77, 'EA Games', 2);
INSERT INTO `fabricantes` VALUES (80, 'OpenOffice.org', 2);
INSERT INTO `fabricantes` VALUES (81, 'Trend', 3);
INSERT INTO `fabricantes` VALUES (82, 'Qualcom', 2);
INSERT INTO `fabricantes` VALUES (83, 'Mozilla.org', 2);
INSERT INTO `fabricantes` VALUES (84, 'Adaptec', 2);
INSERT INTO `fabricantes` VALUES (85, 'Macromedia', 2);
INSERT INTO `fabricantes` VALUES (86, 'Ahead', 2);
INSERT INTO `fabricantes` VALUES (90, 'Izsoft', 2);
INSERT INTO `fabricantes` VALUES (91, 'Projeto Livre', 2);
INSERT INTO `fabricantes` VALUES (92, 'Projeto Pessoal', 2);
INSERT INTO `fabricantes` VALUES (93, 'CyberLink', 2);
INSERT INTO `fabricantes` VALUES (94, 'Oracle', 2);
INSERT INTO `fabricantes` VALUES (95, 'SPSS Inc.', 2);
INSERT INTO `fabricantes` VALUES (96, 'Globalink', 2);
INSERT INTO `fabricantes` VALUES (97, 'SulSoft', 2);
INSERT INTO `fabricantes` VALUES (98, 'Corel', 2);
INSERT INTO `fabricantes` VALUES (99, 'Host & Haicol', 2);
INSERT INTO `fabricantes` VALUES (100, 'Borland', 2);
INSERT INTO `fabricantes` VALUES (101, 'Logic Works', 2);
INSERT INTO `fabricantes` VALUES (103, 'Safer-Networking', 2);
INSERT INTO `fabricantes` VALUES (104, 'CM Data', 2);
INSERT INTO `fabricantes` VALUES (105, 'MACECRAFT SOFTWARE', 2);
INSERT INTO `fabricantes` VALUES (106, 'LeaderShip', 1);
INSERT INTO `fabricantes` VALUES (107, 'Justsoft', 2);
INSERT INTO `fabricantes` VALUES (108, 'Xerox', 3);
INSERT INTO `fabricantes` VALUES (109, 'Sharp', 1);
INSERT INTO `fabricantes` VALUES (110, 'Minolta', 1);
INSERT INTO `fabricantes` VALUES (111, 'Micronet', 1);
INSERT INTO `fabricantes` VALUES (112, 'Kodak', 3);
INSERT INTO `fabricantes` VALUES (115, 'USRobotics', 1);
INSERT INTO `fabricantes` VALUES (116, 'EliteGroup Computer Systens', 1);
INSERT INTO `fabricantes` VALUES (117, 'Dr. Hank', 1);
INSERT INTO `fabricantes` VALUES (119, 'MicroPower', 2);
--
-- Extraindo dados da tabela `fornecedores`
--
INSERT INTO `fornecedores` VALUES (1, 'Teletex', '0800-55-64-05');
INSERT INTO `fornecedores` VALUES (2, 'DELL', '0800-90-33-55');
INSERT INTO `fornecedores` VALUES (3, 'Processor', '0800-13-09-99');
INSERT INTO `fornecedores` VALUES (4, 'Ingram Micro', '(11) 3677-5800');
--
-- Extraindo dados da tabela `licencas`
--
INSERT INTO `licencas` VALUES (1, 'Open Source / livre');
INSERT INTO `licencas` VALUES (2, 'Freeware');
INSERT INTO `licencas` VALUES (3, 'Shareware');
INSERT INTO `licencas` VALUES (4, 'Adware');
INSERT INTO `licencas` VALUES (5, 'Contrato');
INSERT INTO `licencas` VALUES (6, 'Comercial');
INSERT INTO `licencas` VALUES (7, 'OEM');
--
-- Extraindo dados da tabela `localizacao`
--
INSERT INTO `localizacao` VALUES (1, 'DEFAULT', NULL, 5, NULL, NULL, 1);
--
-- Extraindo dados da tabela `modelos_itens`
--
INSERT INTO `modelos_itens` VALUES (1, 'Seagate', 'IDE 5400rpm', 10.2, 1, 2, 'GB');
INSERT INTO `modelos_itens` VALUES (2, 'Fujitsu', 'IDE', 10, 1, 3, 'GB');
INSERT INTO `modelos_itens` VALUES (3, 'Toshiba', 'IDE', 6, 1, 4, 'GB');
INSERT INTO `modelos_itens` VALUES (4, 'Seagate', 'IDE', 10, 1, 5, 'GB');
INSERT INTO `modelos_itens` VALUES (5, 'Seagate', 'IDE 5400rpm', 40, 1, 17, 'GB');
INSERT INTO `modelos_itens` VALUES (6, 'Quantum', 'IDE', 2, 1, 7, 'GB');
INSERT INTO `modelos_itens` VALUES (7, 'Maxtor', 'IDE 5400rpm', 40, 1, 8, 'GB');
INSERT INTO `modelos_itens` VALUES (8, 'Samsung', 'IDE 5400rpm', 10.2, 1, 9, 'GB');
INSERT INTO `modelos_itens` VALUES (9, 'Quantum', 'IDE', 1.2, 1, 10, 'GB');
INSERT INTO `modelos_itens` VALUES (10, 'Seagate', 'IDE', 1.2, 1, 11, 'GB');
INSERT INTO `modelos_itens` VALUES (11, 'Quantum', 'SCSI', 3, 1, 12, 'GB');
INSERT INTO `modelos_itens` VALUES (12, 'Quantum', 'IDE', 0.6, 1, 13, 'GB');
INSERT INTO `modelos_itens` VALUES (13, 'Western Digital', 'IDE', 1, 1, 14, 'GB');
INSERT INTO `modelos_itens` VALUES (14, 'Western Digital', 'IDE 5400rpm', 20, 1, 15, 'GB');
INSERT INTO `modelos_itens` VALUES (15, 'Fujitsu', 'IDE', 20, 1, 16, 'GB');
INSERT INTO `modelos_itens` VALUES (16, 'Maxtor', 'IDE 5400rpm', 20, 1, 18, 'GB');
INSERT INTO `modelos_itens` VALUES (17, 'Samsung', 'IDE 5400rpm', 20, 1, 19, 'GB');
INSERT INTO `modelos_itens` VALUES (18, 'Western Digital', 'IDE 5400rpm', 40, 1, 20, 'GB');
INSERT INTO `modelos_itens` VALUES (19, 'Seagate', 'IDE 5400rpm', 20, 1, 21, 'GB');
INSERT INTO `modelos_itens` VALUES (20, 'Toshiba', 'IDE 5400rpm', 12, 1, 22, 'GB');
INSERT INTO `modelos_itens` VALUES (21, 'Toshiba', 'IDE 5400rpm', 20, 1, 23, 'GB');
INSERT INTO `modelos_itens` VALUES (22, 'Hitashi', 'IDE 4200rpm', 20, 1, 24, 'GB');
INSERT INTO `modelos_itens` VALUES (23, 'Genรฉrico', 'IDE 4200rpm', 40, 1, 25, 'GB');
INSERT INTO `modelos_itens` VALUES (24, 'Quantum', 'IDE', 4, 1, 26, 'GB');
INSERT INTO `modelos_itens` VALUES (25, 'Seagate', 'IDE', 4, 1, 27, 'GB');
INSERT INTO `modelos_itens` VALUES (26, 'Maxtor', 'IDE 5400rpm', 4, 1, 28, 'GB');
INSERT INTO `modelos_itens` VALUES (27, 'Western Digital', 'IDE', 1.2, 1, 29, 'GB');
INSERT INTO `modelos_itens` VALUES (28, 'Genรฉrico', 'M1614TA', 1, 1, 30, 'GB');
INSERT INTO `modelos_itens` VALUES (29, 'Samsung', 'IDE', 2.1, 1, 31, 'GB');
INSERT INTO `modelos_itens` VALUES (30, 'Quantum', 'IDE', 2.1, 1, 32, 'GB');
INSERT INTO `modelos_itens` VALUES (31, 'Quantum', 'IDE', 3.2, 1, 33, 'GB');
INSERT INTO `modelos_itens` VALUES (32, 'Maxtor', 'IDE', 6.5, 1, 34, 'GB');
INSERT INTO `modelos_itens` VALUES (33, 'Seagate', 'IDE', 2.5, 1, 35, 'GB');
INSERT INTO `modelos_itens` VALUES (34, 'Genรฉrico', 'IDE', 4, 1, 36, 'GB');
INSERT INTO `modelos_itens` VALUES (35, 'Western Digital', 'IDE', 6, 1, 37, 'GB');
INSERT INTO `modelos_itens` VALUES (36, 'Fujitsu', 'IDE', 6, 1, 38, 'GB');
INSERT INTO `modelos_itens` VALUES (37, 'Genรฉrico', 'IDE', 20, 1, 39, 'GB');
INSERT INTO `modelos_itens` VALUES (38, 'Genรฉrico', 'IDE', 6, 1, 40, 'GB');
INSERT INTO `modelos_itens` VALUES (39, 'Fujitsu', 'IDE', 1, 1, 41, 'GB');
INSERT INTO `modelos_itens` VALUES (40, 'Genรฉrico', 'IDE', 3, 1, 42, 'GB');
INSERT INTO `modelos_itens` VALUES (41, 'Samsung', 'Ultra DMA', 40, 1, 43, 'GB');
INSERT INTO `modelos_itens` VALUES (42, 'Genรฉrico', 'IDE', 2, 1, 44, 'GB');
INSERT INTO `modelos_itens` VALUES (43, 'Quantum', 'IDE', 1, 1, 45, 'GB');
INSERT INTO `modelos_itens` VALUES (44, 'Quantum', 'IDE 5400rpm', 10, 1, 46, 'GB');
INSERT INTO `modelos_itens` VALUES (45, 'Samsung', 'IDE 5400rpm', 5, 1, 47, 'GB');
INSERT INTO `modelos_itens` VALUES (46, 'Paladium', 'IDE 5400rpm', 1.2, 1, 48, 'GB');
INSERT INTO `modelos_itens` VALUES (47, 'Genรฉrico', 'IDE', 10, 1, 49, 'GB');
INSERT INTO `modelos_itens` VALUES (48, 'Quantum', 'IDE 5400rpm', 3, 1, 50, 'GB');
INSERT INTO `modelos_itens` VALUES (49, 'Genรฉrico', 'IDE 5400rpm', 30, 1, 51, 'GB');
INSERT INTO `modelos_itens` VALUES (50, 'IBM', 'SCSI', 4.3, 1, 52, 'GB');
INSERT INTO `modelos_itens` VALUES (51, 'Samsung', 'IDE 5400 rpm', 1.6, 1, 53, 'GB');
INSERT INTO `modelos_itens` VALUES (52, 'Samsung', 'IDE 5400 rpm', 9, 1, 54, 'GB');
INSERT INTO `modelos_itens` VALUES (53, 'Seagate', 'IDE 5400 rpm', 8, 1, 55, 'GB');
INSERT INTO `modelos_itens` VALUES (54, 'Genรฉrico', 'IDE', 15, 1, 56, 'GB');
INSERT INTO `modelos_itens` VALUES (55, 'Genรฉrico', 'IDE', 1, 1, 57, 'GB');
INSERT INTO `modelos_itens` VALUES (56, 'Genรฉrico', 'IDE', 0.8, 1, 58, 'GB');
INSERT INTO `modelos_itens` VALUES (57, 'Genรฉrico', 'IDE 5400 rpm', 0, 1, 59, 'GB');
INSERT INTO `modelos_itens` VALUES (58, 'Genรฉrico', 'IDE', 0.4, 1, 60, 'GB');
INSERT INTO `modelos_itens` VALUES (59, 'SIS', '6326', NULL, 2, 2, NULL);
INSERT INTO `modelos_itens` VALUES (60, 'Trident', 'Blade 3D on Board/AGP 4MB', NULL, 2, 3, NULL);
INSERT INTO `modelos_itens` VALUES (61, 'Trident', '9440', NULL, 2, 4, NULL);
INSERT INTO `modelos_itens` VALUES (62, 'Trident', '9750 AGP', NULL, 2, 5, NULL);
INSERT INTO `modelos_itens` VALUES (63, 'Trident', '9680', NULL, 2, 6, NULL);
INSERT INTO `modelos_itens` VALUES (64, 'Cirrus Logic', '9521', NULL, 2, 7, NULL);
INSERT INTO `modelos_itens` VALUES (65, 'Cirrus Logic', '9421', NULL, 2, 8, NULL);
INSERT INTO `modelos_itens` VALUES (66, 'SIS', '530 on board', NULL, 2, 9, NULL);
INSERT INTO `modelos_itens` VALUES (67, 'Intel', '82815 (Dell/HP)', NULL, 2, 10, NULL);
INSERT INTO `modelos_itens` VALUES (68, 'Trident', '9000i', NULL, 2, 11, NULL);
INSERT INTO `modelos_itens` VALUES (69, 'Trident', '8900 CL/D', NULL, 2, 12, NULL);
INSERT INTO `modelos_itens` VALUES (70, 'Cirrus Logic', '5480', NULL, 2, 13, NULL);
INSERT INTO `modelos_itens` VALUES (71, 'Nvidia', 'Vanta 16 MB', NULL, 2, 14, NULL);
INSERT INTO `modelos_itens` VALUES (72, 'Nvidia', 'Riva TNT2 32MB', NULL, 2, 15, NULL);
INSERT INTO `modelos_itens` VALUES (73, 'Via Tech.', 'VT8361/VT8601', NULL, 2, 16, NULL);
INSERT INTO `modelos_itens` VALUES (74, 'Intel', '82845G/GL/GE/PE/GV', NULL, 2, 17, NULL);
INSERT INTO `modelos_itens` VALUES (75, 'S3', 'Savage /IX W/MV(8MB)', NULL, 2, 18, NULL);
INSERT INTO `modelos_itens` VALUES (76, 'Intel', '82810E Integrated', NULL, 2, 19, NULL);
INSERT INTO `modelos_itens` VALUES (77, 'ATI', 'Rage Mobility AGP', NULL, 2, 20, NULL);
INSERT INTO `modelos_itens` VALUES (78, 'Radeon', 'ATI IGP 340M (Radeon Mobile)', NULL, 2, 21, NULL);
INSERT INTO `modelos_itens` VALUES (79, 'SIS', '300/305', NULL, 2, 22, NULL);
INSERT INTO `modelos_itens` VALUES (80, 'Cirrus Logic', 'CL-GD5434-HC-C', NULL, 2, 23, NULL);
INSERT INTO `modelos_itens` VALUES (81, 'Cirrus Logic', 'CL-GD5422-75A', NULL, 2, 24, NULL);
INSERT INTO `modelos_itens` VALUES (82, 'MarkVision', 'MVVEXP01 16Mb', NULL, 2, 25, NULL);
INSERT INTO `modelos_itens` VALUES (83, 'SIS', '86C306', NULL, 2, 26, NULL);
INSERT INTO `modelos_itens` VALUES (84, 'SIS', '86C201', NULL, 2, 27, NULL);
INSERT INTO `modelos_itens` VALUES (85, 'ATI', 'Rage LT PRO PCI', NULL, 2, 28, NULL);
INSERT INTO `modelos_itens` VALUES (86, 'Trident', '9660', NULL, 2, 29, NULL);
INSERT INTO `modelos_itens` VALUES (87, 'S3', 'Virge PCI 4MB', NULL, 2, 30, NULL);
INSERT INTO `modelos_itens` VALUES (88, 'Riva', 'TNT2 32MB AGP', NULL, 2, 31, NULL);
INSERT INTO `modelos_itens` VALUES (89, 'S3', 'Virge 86C325', NULL, 2, 32, NULL);
INSERT INTO `modelos_itens` VALUES (90, 'Cirrus Logic', '5430', NULL, 2, 33, NULL);
INSERT INTO `modelos_itens` VALUES (91, 'Via', 'Savage 4 16Mb', NULL, 2, 34, NULL);
INSERT INTO `modelos_itens` VALUES (92, 'ATI', '3D Rage Pro', NULL, 2, 35, NULL);
INSERT INTO `modelos_itens` VALUES (93, 'S3', 'ProSavage (16MB)', NULL, 2, 36, NULL);
INSERT INTO `modelos_itens` VALUES (94, 'S3', 'ProSavage (8MB)', NULL, 2, 37, NULL);
INSERT INTO `modelos_itens` VALUES (95, 'S3', 'ProSavage DDR (8MB)', NULL, 2, 38, NULL);
INSERT INTO `modelos_itens` VALUES (96, 'S3', 'Trio64v2-DX/GX (3MB)', NULL, 2, 39, NULL);
INSERT INTO `modelos_itens` VALUES (97, 'S3', 'Virge DX/GX (2MB)', NULL, 2, 40, NULL);
INSERT INTO `modelos_itens` VALUES (98, 'SIS', '630/730', NULL, 2, 41, NULL);
INSERT INTO `modelos_itens` VALUES (99, 'Cirrus Logic', '5428 on board', NULL, 2, 42, NULL);
INSERT INTO `modelos_itens` VALUES (100, 'SIS', '5597/5598', NULL, 2, 43, NULL);
INSERT INTO `modelos_itens` VALUES (101, 'Cirrus Logic', '5434 PCI', NULL, 2, 44, NULL);
INSERT INTO `modelos_itens` VALUES (102, 'Trident', '8400 PCI/AGP', NULL, 2, 45, NULL);
INSERT INTO `modelos_itens` VALUES (103, 'IGA', '1682 PCI', NULL, 2, 46, NULL);
INSERT INTO `modelos_itens` VALUES (104, 'Intel', '810 Chipset Graphics Driver', NULL, 2, 47, NULL);
INSERT INTO `modelos_itens` VALUES (105, 'SIS', 'Integrated Video', NULL, 2, 48, NULL);
INSERT INTO `modelos_itens` VALUES (106, 'SIS', '540', NULL, 2, 49, NULL);
INSERT INTO `modelos_itens` VALUES (107, '3 Com', '3C 905B', NULL, 3, 2, NULL);
INSERT INTO `modelos_itens` VALUES (108, '3 Com', '3c 900 TPO', NULL, 3, 3, NULL);
INSERT INTO `modelos_itens` VALUES (109, '3 Com', '3c 590', NULL, 3, 4, NULL);
INSERT INTO `modelos_itens` VALUES (110, '3 Com', '3C 905B-TX', NULL, 3, 5, NULL);
INSERT INTO `modelos_itens` VALUES (111, '3 Com', '3C 9050TX', NULL, 3, 6, NULL);
INSERT INTO `modelos_itens` VALUES (112, 'Intel', 'Pro/100+', NULL, 3, 7, NULL);
INSERT INTO `modelos_itens` VALUES (113, '3 Com', '3c 905C-TX', NULL, 3, 8, NULL);
INSERT INTO `modelos_itens` VALUES (114, 'Realtek', 'RTL8139 10/100', NULL, 3, 9, NULL);
INSERT INTO `modelos_itens` VALUES (115, 'Intel', '82557', NULL, 3, 10, NULL);
INSERT INTO `modelos_itens` VALUES (116, 'Intel', 'Pro 100 VM (compaq)', NULL, 3, 11, NULL);
INSERT INTO `modelos_itens` VALUES (117, 'Realtek', 'RTL8029', NULL, 3, 12, NULL);
INSERT INTO `modelos_itens` VALUES (118, '3 Com', '3c 920 Integrated (Dell)', NULL, 3, 13, NULL);
INSERT INTO `modelos_itens` VALUES (119, 'Intel', 'Pro PCI Adapter', NULL, 3, 14, NULL);
INSERT INTO `modelos_itens` VALUES (120, 'Intel', 'Pro /1000 (Dell)', NULL, 3, 15, NULL);
INSERT INTO `modelos_itens` VALUES (121, 'Intel', 'Pro 100 VE (HP/Compaq)', NULL, 3, 16, NULL);
INSERT INTO `modelos_itens` VALUES (122, 'Toshiba', 'PCMCIA ToPIC95-B(3com)', NULL, 3, 17, NULL);
INSERT INTO `modelos_itens` VALUES (123, 'Encore', 'PCMCIA 10/100 Base-TX', NULL, 3, 18, NULL);
INSERT INTO `modelos_itens` VALUES (124, 'Intel', 'Pro /100 M (Dell)', NULL, 3, 19, NULL);
INSERT INTO `modelos_itens` VALUES (125, 'Digitron', 'DEC Chip 21041-PB', NULL, 3, 20, NULL);
INSERT INTO `modelos_itens` VALUES (126, '3 Com', '3C 509B', NULL, 3, 21, NULL);
INSERT INTO `modelos_itens` VALUES (127, 'AMD', 'AM79C970 (PC NET Family)', NULL, 3, 22, NULL);
INSERT INTO `modelos_itens` VALUES (128, 'Winbond', 'W89C940F', NULL, 3, 23, NULL);
INSERT INTO `modelos_itens` VALUES (129, 'Digital', 'DC1017BA', NULL, 3, 24, NULL);
INSERT INTO `modelos_itens` VALUES (130, 'SIS', 'SIS 900', NULL, 3, 25, NULL);
INSERT INTO `modelos_itens` VALUES (131, 'Compex', '100TX', NULL, 3, 26, NULL);
INSERT INTO `modelos_itens` VALUES (132, 'Intel', '21140 10/100', NULL, 3, 27, NULL);
INSERT INTO `modelos_itens` VALUES (133, 'DEC', 'DC 21041 Ehernet', NULL, 3, 28, NULL);
INSERT INTO `modelos_itens` VALUES (134, 'Davicom', 'PCI', NULL, 3, 29, NULL);
INSERT INTO `modelos_itens` VALUES (135, 'Genรฉrico', 'NE2000', NULL, 3, 30, NULL);
INSERT INTO `modelos_itens` VALUES (136, 'Via', 'VT6105 RHINE III', NULL, 3, 31, NULL);
INSERT INTO `modelos_itens` VALUES (137, 'NE 2000', 'Compatรยญvel', NULL, 3, 32, NULL);
INSERT INTO `modelos_itens` VALUES (138, 'SIS', '900 10/100', NULL, 3, 33, NULL);
INSERT INTO `modelos_itens` VALUES (139, 'VIA', 'Rhine II Fast Ethernet', NULL, 3, 34, NULL);
INSERT INTO `modelos_itens` VALUES (140, 'Yes', 'Ne2000 Chipset', NULL, 3, 35, NULL);
INSERT INTO `modelos_itens` VALUES (141, 'UMC', 'UM 900 SAF', NULL, 3, 36, NULL);
INSERT INTO `modelos_itens` VALUES (142, '3 Com', 'Generic', NULL, 3, 37, NULL);
INSERT INTO `modelos_itens` VALUES (143, 'AMD', 'AM 2100', NULL, 3, 38, NULL);
INSERT INTO `modelos_itens` VALUES (144, '3Com', 'IIIBusMaster Etherlink', NULL, 3, 39, NULL);
INSERT INTO `modelos_itens` VALUES (145, 'Creative', 'SB AWE 64', NULL, 4, 2, NULL);
INSERT INTO `modelos_itens` VALUES (146, 'Xwave', 'PCI', NULL, 4, 3, NULL);
INSERT INTO `modelos_itens` VALUES (147, 'Yamaha', 'OPL 3 on board', NULL, 4, 4, NULL);
INSERT INTO `modelos_itens` VALUES (148, 'Iwill', 'On board', NULL, 4, 5, NULL);
INSERT INTO `modelos_itens` VALUES (149, 'C Mรยฉdia', '8738 audio driver on board', NULL, 4, 6, NULL);
INSERT INTO `modelos_itens` VALUES (150, 'Forte Media', 'FM 801', NULL, 4, 8, NULL);
INSERT INTO `modelos_itens` VALUES (151, 'Yamaha', 'Native DSXG-PCI', NULL, 4, 11, NULL);
INSERT INTO `modelos_itens` VALUES (152, 'C Mรยฉdia', 'CMI8738 integrated', NULL, 4, 12, NULL);
INSERT INTO `modelos_itens` VALUES (153, 'ESS', 'Maestro technology-2E', NULL, 4, 13, NULL);
INSERT INTO `modelos_itens` VALUES (154, 'Acer Labs', 'M5451 AC-link', NULL, 4, 14, NULL);
INSERT INTO `modelos_itens` VALUES (155, 'C Mรยฉdia', 'CMI 8330', NULL, 4, 15, NULL);
INSERT INTO `modelos_itens` VALUES (156, 'C Mรยฉdia', 'CMI 8338', NULL, 4, 16, NULL);
INSERT INTO `modelos_itens` VALUES (157, 'Creative', 'SB 16', NULL, 4, 17, NULL);
INSERT INTO `modelos_itens` VALUES (158, 'Creative', 'SB 32', NULL, 4, 18, NULL);
INSERT INTO `modelos_itens` VALUES (159, 'Creative', 'VIBRA 16C', NULL, 4, 19, NULL);
INSERT INTO `modelos_itens` VALUES (160, 'OPTi', '86C931', NULL, 4, 20, NULL);
INSERT INTO `modelos_itens` VALUES (161, 'SIS', '7018', NULL, 4, 21, NULL);
INSERT INTO `modelos_itens` VALUES (162, 'Sound Blaster', 'Pro', NULL, 4, 22, NULL);
INSERT INTO `modelos_itens` VALUES (163, 'Opti', '82c931', NULL, 4, 23, NULL);
INSERT INTO `modelos_itens` VALUES (164, 'Crystal', 'CS4231A-KL', NULL, 4, 24, NULL);
INSERT INTO `modelos_itens` VALUES (165, 'Creative', '32x', NULL, 5, 2, NULL);
INSERT INTO `modelos_itens` VALUES (166, 'Creative', '36x', NULL, 5, 3, NULL);
INSERT INTO `modelos_itens` VALUES (167, 'Max', '42x', NULL, 5, 4, NULL);
INSERT INTO `modelos_itens` VALUES (168, 'Max', '50x', NULL, 5, 5, NULL);
INSERT INTO `modelos_itens` VALUES (169, 'Creative', '50x', NULL, 5, 6, NULL);
INSERT INTO `modelos_itens` VALUES (170, 'Troni', 'CSI-56x', NULL, 5, 7, NULL);
INSERT INTO `modelos_itens` VALUES (171, 'Sony', '52x', NULL, 5, 8, NULL);
INSERT INTO `modelos_itens` VALUES (172, 'Samsung', '48x', NULL, 5, 9, NULL);
INSERT INTO `modelos_itens` VALUES (173, 'LG', '52x', NULL, 5, 10, NULL);
INSERT INTO `modelos_itens` VALUES (174, 'Genรฉrico', '56x', NULL, 5, 11, NULL);
INSERT INTO `modelos_itens` VALUES (175, 'Liteon', '48x', NULL, 5, 12, NULL);
INSERT INTO `modelos_itens` VALUES (176, 'LG', '48x', NULL, 5, 13, NULL);
INSERT INTO `modelos_itens` VALUES (177, 'Max', '48x', NULL, 5, 14, NULL);
INSERT INTO `modelos_itens` VALUES (178, 'Max', '44x', NULL, 5, 15, NULL);
INSERT INTO `modelos_itens` VALUES (179, 'Creative', '24x', NULL, 5, 16, NULL);
INSERT INTO `modelos_itens` VALUES (180, 'Panasonic', '4x', NULL, 5, 17, NULL);
INSERT INTO `modelos_itens` VALUES (181, 'Mitsushita', '54x', NULL, 5, 18, NULL);
INSERT INTO `modelos_itens` VALUES (182, 'Max', '60', NULL, 5, 19, NULL);
INSERT INTO `modelos_itens` VALUES (183, 'ATAPI', '52x', NULL, 5, 20, NULL);
INSERT INTO `modelos_itens` VALUES (184, 'Samsung', '8x', NULL, 5, 21, NULL);
INSERT INTO `modelos_itens` VALUES (185, 'Max', '56x', NULL, 5, 22, NULL);
INSERT INTO `modelos_itens` VALUES (186, 'Mitsumi FX', '54 x', NULL, 5, 23, NULL);
INSERT INTO `modelos_itens` VALUES (187, 'Max', '24x', NULL, 5, 24, NULL);
INSERT INTO `modelos_itens` VALUES (188, 'PCtel', 'HSP on board', NULL, 6, 2, NULL);
INSERT INTO `modelos_itens` VALUES (189, 'Lucent', 'Agere V.92', NULL, 6, 3, NULL);
INSERT INTO `modelos_itens` VALUES (190, 'Agere', 'PCI 56k V.92 Soft Moden', NULL, 6, 4, NULL);
INSERT INTO `modelos_itens` VALUES (191, 'PCtel', 'HSP56 PCI', NULL, 6, 5, NULL);
INSERT INTO `modelos_itens` VALUES (192, 'US Robotics', '56k Fax ext', NULL, 6, 6, NULL);
INSERT INTO `modelos_itens` VALUES (193, 'Toshiba', 'internal V.90 56k (built in Lu', NULL, 6, 7, NULL);
INSERT INTO `modelos_itens` VALUES (194, 'HSF', 'HSFi v.92 56k', NULL, 6, 8, NULL);
INSERT INTO `modelos_itens` VALUES (195, 'ESS', 'ES56STH-PI', NULL, 6, 9, NULL);
INSERT INTO `modelos_itens` VALUES (196, 'Motorola', 'SM56 PCI', NULL, 6, 10, NULL);
INSERT INTO `modelos_itens` VALUES (197, 'US Robotics', '33.6 voice', NULL, 6, 11, NULL);
INSERT INTO `modelos_itens` VALUES (198, 'Toshiba', '8x24x', NULL, 8, 1, NULL);
INSERT INTO `modelos_itens` VALUES (199, 'Genรฉrico(notes)', '24x', NULL, 8, 2, NULL);
INSERT INTO `modelos_itens` VALUES (200, 'LG', '50 x Combo', NULL, 8, 3, NULL);
INSERT INTO `modelos_itens` VALUES (201, 'Sony', '12x40x', NULL, 8, 4, NULL);
INSERT INTO `modelos_itens` VALUES (202, 'LG', '12x8x32x', NULL, 9, 2, NULL);
INSERT INTO `modelos_itens` VALUES (203, 'Samsung', '32x10x40x', NULL, 9, 3, NULL);
INSERT INTO `modelos_itens` VALUES (204, 'HP', '12x8x32', NULL, 9, 4, NULL);
INSERT INTO `modelos_itens` VALUES (205, 'NEC', '48x', NULL, 9, 5, NULL);
INSERT INTO `modelos_itens` VALUES (206, 'Genรฉrico(notes)', '24x', NULL, 9, 6, NULL);
INSERT INTO `modelos_itens` VALUES (207, 'TEAC', '4x4x24', NULL, 9, 7, NULL);
INSERT INTO `modelos_itens` VALUES (208, 'LG', '24x10x40', NULL, 9, 8, NULL);
INSERT INTO `modelos_itens` VALUES (209, 'Mitsumi', '54x', NULL, 9, 9, NULL);
INSERT INTO `modelos_itens` VALUES (210, 'Yamaha', '4x4x16', NULL, 9, 10, NULL);
INSERT INTO `modelos_itens` VALUES (211, 'Genรฉrico', 'GCE-8523B', NULL, 9, 11, NULL);
INSERT INTO `modelos_itens` VALUES (212, 'LG', '52X24X52X', NULL, 9, 12, NULL);
INSERT INTO `modelos_itens` VALUES (213, 'Iwill', 'XA 100 Plus ATX', NULL, 10, 1, NULL);
INSERT INTO `modelos_itens` VALUES (214, 'Digitron', 'BB745sV AT', NULL, 10, 3, NULL);
INSERT INTO `modelos_itens` VALUES (215, 'ECS-', 'P6IWP-fe', NULL, 10, 4, NULL);
INSERT INTO `modelos_itens` VALUES (216, 'Compaq', 'EVO D-300', NULL, 10, 5, NULL);
INSERT INTO `modelos_itens` VALUES (217, 'Dell', 'Optiplex GX-150', NULL, 10, 6, NULL);
INSERT INTO `modelos_itens` VALUES (218, 'Soyo', 'P4IS2/P4ISR (soyo)', NULL, 10, 7, NULL);
INSERT INTO `modelos_itens` VALUES (219, 'Chaintech', '7AIVL (MO07063BCHAE)', NULL, 10, 8, NULL);
INSERT INTO `modelos_itens` VALUES (220, 'Dell', 'Computer Corp 03x290', NULL, 10, 9, NULL);
INSERT INTO `modelos_itens` VALUES (221, 'HP', 'System Board', NULL, 10, 10, NULL);
INSERT INTO `modelos_itens` VALUES (222, 'Toshiba', 'Portable PC', NULL, 10, 11, NULL);
INSERT INTO `modelos_itens` VALUES (223, 'Dell', 'Computer Corp C8RP.07W079', NULL, 10, 12, NULL);
INSERT INTO `modelos_itens` VALUES (224, 'Compaq', 'EVO D-310', NULL, 10, 13, NULL);
INSERT INTO `modelos_itens` VALUES (225, 'Compaq', 'N1020v', NULL, 10, 14, NULL);
INSERT INTO `modelos_itens` VALUES (226, 'Amptron', 'PM8400C/8400D/8600B/8600C', NULL, 10, 15, NULL);
INSERT INTO `modelos_itens` VALUES (227, 'Amptron', 'PM598', NULL, 10, 16, NULL);
INSERT INTO `modelos_itens` VALUES (228, 'Kaimei', 'KM-T5-V2', NULL, 10, 17, NULL);
INSERT INTO `modelos_itens` VALUES (229, 'Shuttle', 'HOT-541', NULL, 10, 18, NULL);
INSERT INTO `modelos_itens` VALUES (230, 'Genรฉrico', 'Chipset Intel 82430 FX', NULL, 10, 19, NULL);
INSERT INTO `modelos_itens` VALUES (231, 'Hsin Tech', '519/529', NULL, 10, 20, NULL);
INSERT INTO `modelos_itens` VALUES (232, 'Gem light', 'GMB-P56IPS', NULL, 10, 21, NULL);
INSERT INTO `modelos_itens` VALUES (233, 'Via', 'VT82C42M', NULL, 10, 22, NULL);
INSERT INTO `modelos_itens` VALUES (234, 'OPTI Viper', '82C557M', NULL, 10, 23, NULL);
INSERT INTO `modelos_itens` VALUES (235, 'Genรฉrico', 'Chipset SB82371FB', NULL, 10, 24, NULL);
INSERT INTO `modelos_itens` VALUES (236, 'Genรฉrico', 'Chipset SIS 5591', NULL, 10, 25, NULL);
INSERT INTO `modelos_itens` VALUES (237, 'PC Chips', 'M598', NULL, 10, 26, NULL);
INSERT INTO `modelos_itens` VALUES (238, 'PC Chips', 'M748 LMRT', NULL, 10, 27, NULL);
INSERT INTO `modelos_itens` VALUES (239, 'Genรฉrico', 'Chipset ALi M1531 Aladdin', NULL, 10, 28, NULL);
INSERT INTO `modelos_itens` VALUES (240, 'Genรฉrico', 'Chipset SIS 5597', NULL, 10, 29, NULL);
INSERT INTO `modelos_itens` VALUES (241, 'Amptron', 'PM9900', NULL, 10, 30, NULL);
INSERT INTO `modelos_itens` VALUES (242, 'Amptron', 'PM9200', NULL, 10, 31, NULL);
INSERT INTO `modelos_itens` VALUES (243, 'Amptron', 'PM8800', NULL, 10, 32, NULL);
INSERT INTO `modelos_itens` VALUES (244, 'DTK', 'PAM - 0057I - E1', NULL, 10, 33, NULL);
INSERT INTO `modelos_itens` VALUES (245, 'Amptron', 'PM 7900/8800', NULL, 10, 34, NULL);
INSERT INTO `modelos_itens` VALUES (246, 'Genรฉrico', 'Chipset Intel Triton 82430VX', NULL, 10, 35, NULL);
INSERT INTO `modelos_itens` VALUES (247, 'Fugutech', 'M507', NULL, 10, 36, NULL);
INSERT INTO `modelos_itens` VALUES (248, 'PC Chips', 'M715', NULL, 10, 37, NULL);
INSERT INTO `modelos_itens` VALUES (249, 'Amptron', 'PM8600A', NULL, 10, 38, NULL);
INSERT INTO `modelos_itens` VALUES (250, 'Genรฉrico', 'Chipset SIS 540', NULL, 10, 39, NULL);
INSERT INTO `modelos_itens` VALUES (251, 'Genรฉrico', 'Chipset Utron VXPRO II', NULL, 10, 40, NULL);
INSERT INTO `modelos_itens` VALUES (252, 'Genรยฉrica', 'Chipset sis530', NULL, 10, 41, NULL);
INSERT INTO `modelos_itens` VALUES (253, 'Soyo', '5EH', NULL, 10, 42, NULL);
INSERT INTO `modelos_itens` VALUES (254, 'Via', 'VT8364', NULL, 10, 43, NULL);
INSERT INTO `modelos_itens` VALUES (255, 'A-Trend', 'ATC-6130', NULL, 10, 44, NULL);
INSERT INTO `modelos_itens` VALUES (256, 'Chaintech', '6xxx', NULL, 10, 45, NULL);
INSERT INTO `modelos_itens` VALUES (257, 'Chaintech', '7AIV', NULL, 10, 46, NULL);
INSERT INTO `modelos_itens` VALUES (258, 'Chaintech', '7AIV5(E)', NULL, 10, 47, NULL);
INSERT INTO `modelos_itens` VALUES (259, 'CTX-508', 'Chipset Intel Triton 82430VX', NULL, 10, 48, NULL);
INSERT INTO `modelos_itens` VALUES (260, 'ECS', 'K7VMM+', NULL, 10, 49, NULL);
INSERT INTO `modelos_itens` VALUES (261, 'GigaByte', 'GA-7VEML', NULL, 10, 50, NULL);
INSERT INTO `modelos_itens` VALUES (262, 'MSI', 'MS-6378', NULL, 10, 51, NULL);
INSERT INTO `modelos_itens` VALUES (263, 'PcChips', 'M810LR', NULL, 10, 52, NULL);
INSERT INTO `modelos_itens` VALUES (264, 'Shuttle', 'HOT-569', NULL, 10, 53, NULL);
INSERT INTO `modelos_itens` VALUES (265, 'Soyo', '4SAW', NULL, 10, 54, NULL);
INSERT INTO `modelos_itens` VALUES (266, 'Genรฉrico', 'Chipset Intel FW82371AB', NULL, 10, 55, NULL);
INSERT INTO `modelos_itens` VALUES (267, 'PcChips', 'LMR 598', NULL, 10, 56, NULL);
INSERT INTO `modelos_itens` VALUES (268, 'Soyo', 'Chipset SIS85c496', NULL, 10, 57, NULL);
INSERT INTO `modelos_itens` VALUES (269, 'ALI', 'M1429GA1', NULL, 10, 58, NULL);
INSERT INTO `modelos_itens` VALUES (270, 'Soyo', 'Chipset Intel pci 7sB82371FB', NULL, 10, 59, NULL);
INSERT INTO `modelos_itens` VALUES (271, 'Elpina', 'PM 9100/Pine PT-7602', NULL, 10, 60, NULL);
INSERT INTO `modelos_itens` VALUES (272, 'PcChips', '585 LMR', NULL, 10, 61, NULL);
INSERT INTO `modelos_itens` VALUES (273, 'Holco Enterprise', 'Generic', NULL, 10, 62, NULL);
INSERT INTO `modelos_itens` VALUES (274, 'Dell', 'Optiplex GX-100', NULL, 10, 63, NULL);
INSERT INTO `modelos_itens` VALUES (275, 'Soyo', '7VBA133', NULL, 10, 64, NULL);
INSERT INTO `modelos_itens` VALUES (276, 'Amptron', 'PM900', NULL, 10, 65, NULL);
INSERT INTO `modelos_itens` VALUES (277, 'N/A', '', 64, 7, 3, 'MB');
INSERT INTO `modelos_itens` VALUES (278, 'N/A', '', 128, 7, 4, 'MB');
INSERT INTO `modelos_itens` VALUES (279, 'N/A', '', 16, 7, 5, 'MB');
INSERT INTO `modelos_itens` VALUES (280, 'N/A', '', 32, 7, 6, 'MB');
INSERT INTO `modelos_itens` VALUES (281, 'N/A', '', 256, 7, 7, 'MB');
INSERT INTO `modelos_itens` VALUES (282, 'N/A', '', 512, 7, 8, 'MB');
INSERT INTO `modelos_itens` VALUES (283, 'N/A', '', 384, 7, 9, 'MB');
INSERT INTO `modelos_itens` VALUES (284, 'N/A', '', 320, 7, 10, 'MB');
INSERT INTO `modelos_itens` VALUES (285, 'N/A', '', 48, 7, 11, 'MB');
INSERT INTO `modelos_itens` VALUES (286, 'N/A', '', 24, 7, 12, 'MB');
INSERT INTO `modelos_itens` VALUES (287, 'N/A', '', 56, 7, 13, 'MB');
INSERT INTO `modelos_itens` VALUES (288, 'N/A', '', 96, 7, 14, 'MB');
INSERT INTO `modelos_itens` VALUES (289, 'N/A', '', 40, 7, 15, 'MB');
INSERT INTO `modelos_itens` VALUES (290, 'Intel', 'Pentium', 166, 11, 2, 'MHZ');
INSERT INTO `modelos_itens` VALUES (291, 'AMD', 'K6-2', 550, 11, 3, 'MHZ');
INSERT INTO `modelos_itens` VALUES (292, 'Intel', 'Pentium III', 1000, 11, 4, 'MHZ');
INSERT INTO `modelos_itens` VALUES (293, 'Intel', 'Pentium IV', 1700, 11, 5, 'MHZ');
INSERT INTO `modelos_itens` VALUES (294, 'AMD', 'K6-2', 300, 11, 6, 'MHZ');
INSERT INTO `modelos_itens` VALUES (295, 'Intel', 'Pentium', 75, 11, 7, 'MHZ');
INSERT INTO `modelos_itens` VALUES (296, 'Intel', 'Pentium', 200, 11, 8, 'MHZ');
INSERT INTO `modelos_itens` VALUES (297, 'Intel', 'Celeron', 600, 11, 9, 'MHZ');
INSERT INTO `modelos_itens` VALUES (298, 'AMD', 'K6-2', 450, 11, 10, 'MHZ');
INSERT INTO `modelos_itens` VALUES (299, 'AMD', 'K6-2', 500, 11, 11, 'MHZ');
INSERT INTO `modelos_itens` VALUES (300, 'Intel', 'Pentium', 133, 11, 12, 'MHZ');
INSERT INTO `modelos_itens` VALUES (301, 'Intel', 'Pentium III', 500, 11, 13, 'MHZ');
INSERT INTO `modelos_itens` VALUES (302, 'Intel', 'Pentium III', 450, 11, 14, 'MHZ');
INSERT INTO `modelos_itens` VALUES (303, 'AMD', 'Athlon', 1300, 11, 15, 'MHZ');
INSERT INTO `modelos_itens` VALUES (304, 'AMD', 'Athlon', 1500, 11, 16, 'MHZ');
INSERT INTO `modelos_itens` VALUES (305, 'AMD', 'Duron', 1100, 11, 17, 'MHZ');
INSERT INTO `modelos_itens` VALUES (306, 'AMD', 'K6-2', 266, 11, 18, 'MHZ');
INSERT INTO `modelos_itens` VALUES (307, 'Intel', 'Celeron', 700, 11, 19, 'MHZ');
INSERT INTO `modelos_itens` VALUES (308, 'Intel', 'Pentium II', 300, 11, 20, 'MHZ');
INSERT INTO `modelos_itens` VALUES (309, 'Intel', 'Pentium III', 900, 11, 21, 'MHZ');
INSERT INTO `modelos_itens` VALUES (310, 'Intel', 'Pentium IV', 1600, 11, 22, 'MHZ');
INSERT INTO `modelos_itens` VALUES (311, 'Intel', 'Pentium IV', 2260, 11, 23, 'MHZ');
INSERT INTO `modelos_itens` VALUES (312, 'Intel', 'Celeron', 1100, 11, 24, 'MHZ');
INSERT INTO `modelos_itens` VALUES (313, 'Intel', 'Pentium III', 700, 11, 25, 'MHZ');
INSERT INTO `modelos_itens` VALUES (314, 'Intel', 'Celeron', 1800, 11, 26, 'MHZ');
INSERT INTO `modelos_itens` VALUES (315, 'Intel', 'Pentium IV', 2000, 11, 27, 'MHZ');
INSERT INTO `modelos_itens` VALUES (316, 'Intel', 'Pentium III', 850, 11, 28, 'MHZ');
INSERT INTO `modelos_itens` VALUES (317, 'Intel', 'Pentium IV', 2600, 11, 29, 'MHZ');
INSERT INTO `modelos_itens` VALUES (318, 'Intel', 'Celereron IV', 1700, 11, 30, 'MHZ');
INSERT INTO `modelos_itens` VALUES (319, 'AMD', 'Athlon', 1400, 11, 31, 'MHZ');
INSERT INTO `modelos_itens` VALUES (320, 'AMD', 'K6-2', 350, 11, 32, 'MHZ');
INSERT INTO `modelos_itens` VALUES (321, 'Intel', 'Pentium MMX', 166, 11, 33, 'MHZ');
INSERT INTO `modelos_itens` VALUES (322, 'Intel', 'Pentium', 100, 11, 34, 'MHZ');
INSERT INTO `modelos_itens` VALUES (323, 'AMD', 'K6', 300, 11, 35, 'MHZ');
INSERT INTO `modelos_itens` VALUES (324, 'Intel', 'Pentium MMX', 233, 11, 36, 'MHZ');
INSERT INTO `modelos_itens` VALUES (325, 'Intel', 'Pentium', 150, 11, 37, 'MHZ');
INSERT INTO `modelos_itens` VALUES (326, 'Intel', 'Pentium MMX', 200, 11, 38, 'MHZ');
INSERT INTO `modelos_itens` VALUES (327, 'AMD', 'K6-2', 380, 11, 39, 'MHZ');
INSERT INTO `modelos_itens` VALUES (328, 'Intel', 'Pentium MMX', 150, 11, 40, 'MHZ');
INSERT INTO `modelos_itens` VALUES (329, 'AMD', 'Athlon', 1333, 11, 41, 'MHZ');
INSERT INTO `modelos_itens` VALUES (330, 'AMD', 'K6-2', 150, 11, 42, 'MHZ');
INSERT INTO `modelos_itens` VALUES (331, 'Intel', 'Celeron', 266, 11, 43, 'MHZ');
INSERT INTO `modelos_itens` VALUES (332, 'AMD', 'K6', 166, 11, 44, 'MHZ');
INSERT INTO `modelos_itens` VALUES (333, 'AMD', 'Duron', 750, 11, 45, 'MHZ');
INSERT INTO `modelos_itens` VALUES (334, 'AMD', 'Duron XP', 1300, 11, 46, 'MHZ');
INSERT INTO `modelos_itens` VALUES (335, 'AMD', 'Athlon XP', 1466, 11, 47, 'MHZ');
INSERT INTO `modelos_itens` VALUES (336, 'AMD', 'Athlon XP', 1100, 11, 48, 'MHZ');
INSERT INTO `modelos_itens` VALUES (337, 'Cyrix', 'DX', 4100, 11, 49, 'MHZ');
INSERT INTO `modelos_itens` VALUES (338, 'IBM', '586', 100, 11, 50, 'MHZ');
INSERT INTO `modelos_itens` VALUES (339, 'Intel', '486', 100, 11, 51, 'MHZ');
INSERT INTO `modelos_itens` VALUES (340, 'AMD', 'K6-2', 400, 11, 52, 'MHZ');
INSERT INTO `modelos_itens` VALUES (341, 'Intel', 'Pentium', 120, 11, 53, 'MHZ');
INSERT INTO `modelos_itens` VALUES (342, 'Intel', 'AC''97 82801BA(m) (Compaq/Dell/', NULL, 4, 7, NULL);
INSERT INTO `modelos_itens` VALUES (346, 'Intel Pentium', 'Xeon', 1200, 11, NULL, 'Mhz');
INSERT INTO `modelos_itens` VALUES (345, 'Intel Pentium', 'Xeon', 2200, 11, NULL, 'Mhz');
INSERT INTO `modelos_itens` VALUES (347, 'N/A', '', 2000, 7, NULL, 'MB');
INSERT INTO `modelos_itens` VALUES (348, 'Genรฉrico', 'Ultra 3 SCSI 15.000 Rpm', 36, 1, NULL, 'Gb');
INSERT INTO `modelos_itens` VALUES (349, 'N/A', 'Tigon3 10/100/1000', NULL, 3, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (350, 'N/A', 'N/A', NULL, 2, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (351, 'Genรฉrico', 'SCSI 10.000 Rpm', 36, 1, NULL, 'GB');
INSERT INTO `modelos_itens` VALUES (352, 'N/A', 'Marvel 10/100/1000', NULL, 3, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (353, 'ATI', 'Mach64-GR Graphics Accelerator', NULL, 2, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (354, 'N/A', 'N/A', NULL, 10, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (355, 'Intel', 'Pentium Xeon', 2400, 11, NULL, 'Mhz');
INSERT INTO `modelos_itens` VALUES (356, 'ATI', 'Rage XL', 8, 2, NULL, 'MB');
INSERT INTO `modelos_itens` VALUES (361, 'ATI', 'LT PRO AGP', 8, 2, NULL, 'MB');
INSERT INTO `modelos_itens` VALUES (362, 'Via Tech', 'AC\\''97 Audio Controller', NULL, 4, 9, NULL);
INSERT INTO `modelos_itens` VALUES (363, 'N/A', 'Cabo Paralelo padrรยฃo', NULL, 12, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (364, 'Leadership', 'XPC Stereo', 160, 13, NULL, 'Watts');
INSERT INTO `modelos_itens` VALUES (365, 'Sunshine', 'Lince - toshiba', NULL, 13, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (366, 'N/A', 'Genรยฉrica', NULL, 13, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (367, 'Multi-media', 'MS-560', 100, 13, NULL, 'Watts');
INSERT INTO `modelos_itens` VALUES (368, 'NVIDIA', 'GeForce4 MX Integrated', 32, 2, NULL, 'MB');
INSERT INTO `modelos_itens` VALUES (369, 'SoundMAX', 'Digital Audio', NULL, 4, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (370, '3Com', '3C920B-EMB Integrated (HP)', NULL, -1, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (371, '3Com', '3C920B-EMB Integrated (HP)', NULL, 3, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (372, 'Seagate', 'IDE 7200rpm', 40, 1, NULL, 'GB');
INSERT INTO `modelos_itens` VALUES (373, 'AMD', 'Atlhon XP', 1900, 11, NULL, 'Mhz');
INSERT INTO `modelos_itens` VALUES (374, 'HP', '0830h', NULL, 10, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (375, 'Genรฉrico', 'IDE', 0.325, 1, NULL, 'GB');
INSERT INTO `modelos_itens` VALUES (376, 'Intel', '486 DX2', 50, 11, NULL, 'Mhz');
INSERT INTO `modelos_itens` VALUES (377, 'N/A', 'Chips & Tech Accelerator', NULL, 2, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (378, 'N/A', '', 6, 7, NULL, 'MB');
INSERT INTO `modelos_itens` VALUES (379, 'N/A', '', 192, 7, NULL, 'MB');
INSERT INTO `modelos_itens` VALUES (380, 'LG', '16x COMBO 48x24x48x', NULL, 8, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (386, 'HP', '16X', NULL, 5, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (382, '', 'Dimm', NULL, 14, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (383, '', 'Mini-Dimm', NULL, 14, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (384, '', 'Serial', NULL, 15, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (385, '', 'PS/2', NULL, 15, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (387, 'Intel', 'Pentium Pro', 200, 11, NULL, 'MHZ');
INSERT INTO `modelos_itens` VALUES (388, 'Genรฉrico', 'SCSI', 4, 1, NULL, 'GB');
INSERT INTO `modelos_itens` VALUES (389, 'Genรฉrico', '8x', NULL, 5, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (390, 'Intel', '82443BX', NULL, 10, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (391, 'Intel', '82443GX', NULL, 10, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (392, 'Genรฉrico', 'SCSI', 36, 1, NULL, 'GB');
INSERT INTO `modelos_itens` VALUES (393, 'Genรฉrico', 'SCSI', 8, 1, NULL, 'GB');
INSERT INTO `modelos_itens` VALUES (394, 'Genรฉrico', 'SCSI', 18, 1, NULL, 'GB');
INSERT INTO `modelos_itens` VALUES (395, '', 'Genรฉrico', 45, 5, NULL, 'X');
INSERT INTO `modelos_itens` VALUES (396, 'Max', '40x', NULL, 5, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (397, 'Intel', 'Pentium III', 350, 11, NULL, 'MHZ');
INSERT INTO `modelos_itens` VALUES (398, 'Intel', 'Pentium II', 350, 11, NULL, 'MHZ');
INSERT INTO `modelos_itens` VALUES (399, 'Genรฉrico', 'SCSI', 9, 1, NULL, 'GB');
INSERT INTO `modelos_itens` VALUES (400, 'Intel', '82555', NULL, 3, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (401, 'N/A', '', 196, 7, NULL, 'MB');
INSERT INTO `modelos_itens` VALUES (402, '3Com', '3c 905', NULL, 3, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (403, 'Genรฉrico', '45x', NULL, 5, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (404, 'Netgear', 'FA310TX', NULL, 3, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (405, 'Genรฉrico', 'Drive de disquete', NULL, 16, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (406, 'Trident', '3D Blade (PCI)', 8, 2, NULL, 'MB');
INSERT INTO `modelos_itens` VALUES (407, 'Mitsumi', 'FX48++M', NULL, 5, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (408, 'ATI', 'Radeon IGP 345M', 64, 2, NULL, 'MB');
INSERT INTO `modelos_itens` VALUES (409, 'Legacy Audio Drivers', 'ALI M5451 AC-LINK', NULL, 4, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (410, 'Broadcom', '54G Max Performance', NULL, 3, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (411, 'Conexant', '56K Aclink Modem', NULL, 6, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (412, 'Thoshiba', 'MK4025GAS', 40, 1, NULL, 'GB');
INSERT INTO `modelos_itens` VALUES (413, 'Toshiba', 'SD-R2512 COMBO', NULL, 8, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (414, 'Intel', 'Pentium IV A', 2100, 11, NULL, 'MHZ');
INSERT INTO `modelos_itens` VALUES (415, 'n/a', 'Chipset ATI M. Radeon 7000 igp', NULL, 10, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (416, 'ATI', 'Rage LT Pro TVOUT', 8, 2, NULL, 'MB');
INSERT INTO `modelos_itens` VALUES (417, 'Intel', 'Pentium IV HT', 2800, 11, NULL, 'Mhz');
INSERT INTO `modelos_itens` VALUES (418, 'Dell', 'Optiplex GX-270', NULL, 10, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (419, 'Intel', '82865G Graphics Controller', 64, 2, NULL, 'Mb');
INSERT INTO `modelos_itens` VALUES (420, 'Intel', 'Pro / 1000 MT (Dell)', NULL, 3, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (421, 'Intel', 'ACรยด97 - 82801EB (Dell GX-270)', NULL, 4, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (422, 'Trident', '9685', 2, 2, NULL, 'MB');
INSERT INTO `modelos_itens` VALUES (423, 'Nvidia', 'GeForce4 MX 440 AGP', 64, 2, NULL, 'MB');
INSERT INTO `modelos_itens` VALUES (424, 'Samsung', 'DVD Combo (CDRW) SM-352F', NULL, 8, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (425, 'NVIDIA', 'RIVA TNT', 8, 2, NULL, 'MB');
INSERT INTO `modelos_itens` VALUES (426, 'Samsung', 'IDE 7200 RPM', 40, 1, NULL, 'GB');
INSERT INTO `modelos_itens` VALUES (427, 'LG', '52x32x52x', NULL, 9, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (428, 'Intel', 'Pentium IV A', 2800, 11, NULL, 'MHz');
INSERT INTO `modelos_itens` VALUES (429, 'Intel', '82845 G Graphics Controller', 64, 2, NULL, 'MB');
INSERT INTO `modelos_itens` VALUES (430, 'nVidia', 'GeForce4 MX 4000', 64, -1, NULL, 'Mb');
INSERT INTO `modelos_itens` VALUES (431, 'NVidia', 'GeForce4 MX 4000', 64, 2, NULL, 'Mb');
INSERT INTO `modelos_itens` VALUES (432, 'Genรฉrico', 'Intel Brookdale-G I845G', NULL, 10, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (433, 'SIS', '7012', NULL, 4, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (434, 'Samsung', '7200 RPM', 80, 1, NULL, 'GB');
INSERT INTO `modelos_itens` VALUES (435, 'Samsung', 'IDE 7200rpm', 80, 1, NULL, 'GB');
INSERT INTO `modelos_itens` VALUES (436, 'LG', 'LM-I56N', NULL, 6, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (437, 'LG', '16x COMBO 52x32x52x', NULL, 8, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (438, 'Asus', 'P4S800', NULL, 10, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (439, 'N/A', '', 8, 7, NULL, 'MB');
INSERT INTO `modelos_itens` VALUES (441, 'Pine', '3D Phanton XP-PCI2800', 32, 2, NULL, 'MB');
INSERT INTO `modelos_itens` VALUES (442, 'Intel', 'Celeron', 1300, 11, NULL, 'MHZ');
INSERT INTO `modelos_itens` VALUES (443, 'Intel', 'i810-W83627', NULL, 10, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (444, 'Intel', 'Pentium IV', 3000, 11, NULL, 'MHZ');
INSERT INTO `modelos_itens` VALUES (445, 'Dell', 'Optiplex GX 270 chipset i865G', NULL, 10, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (446, 'Intel', 'Pro /1000 MT', NULL, 3, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (447, 'Western Digital', 'IDE 7200 rpm', 40, 1, NULL, 'GB');
INSERT INTO `modelos_itens` VALUES (448, 'EliteGroup Computer System', 'ESC 651-M', NULL, 10, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (449, 'Maxtor', 'IDE 5400 rpm', 30, 1, NULL, 'GB');
INSERT INTO `modelos_itens` VALUES (450, 'FUJITSU', 'IDE 5400', 1.6, 1, NULL, 'GB');
INSERT INTO `modelos_itens` VALUES (451, 'AMD', 'Semprom', 2200, 11, NULL, 'MHZ');
INSERT INTO `modelos_itens` VALUES (452, 'Asus', 'P4S800-MX', NULL, 10, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (453, 'SIS', '661FX', 32, 2, NULL, 'MB');
INSERT INTO `modelos_itens` VALUES (454, 'Broadcom', 'NetXtreme 57xx', 1000, 3, NULL, 'MB');
INSERT INTO `modelos_itens` VALUES (455, 'Intel', '82915G/GV/910GL Express', 128, 2, NULL, 'MB');
INSERT INTO `modelos_itens` VALUES (456, 'Dell', 'Optiplex GX-280', NULL, 10, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (457, 'Western Digital', 'SATA 7200 rpm', 40, 1, NULL, 'GB');
INSERT INTO `modelos_itens` VALUES (458, 'Intel', 'Xeon FSB 800MHZ', 2800, 11, NULL, 'MHZ');
INSERT INTO `modelos_itens` VALUES (459, 'Dell', 'Pesc 1425', 800, 10, NULL, 'MHZ');
INSERT INTO `modelos_itens` VALUES (460, 'ATI', 'RADEON 7000-M', 16, 2, NULL, 'MB');
INSERT INTO `modelos_itens` VALUES (461, 'Seagate', 'SCSI', 36, 1, NULL, 'GB');
INSERT INTO `modelos_itens` VALUES (462, 'LG', '8x COMBO 24x24x24x', NULL, 8, NULL, NULL);
INSERT INTO `modelos_itens` VALUES (463, 'NEC', 'ND-3530A 16XDVDR 4XDVDRW 48XCD', NULL, 8, NULL, NULL);
--
-- Incluido por Lrgamito
--
INSERT INTO `modelos_itens` (`mdit_cod`, `mdit_fabricante`, `mdit_desc`, `mdit_desc_capacidade`, `mdit_tipo`, `mdit_cod_old`, `mdit_sufixo`) VALUES
(466, 'Intel', 'Core 2 Duo E4300', 1800, 11, NULL, 'MHz'),
(467, 'HEXON Tecnology', 'DDR2', 1024, 7, NULL, 'MB'),
(468, 'NVidia', 'GeForce 7300 LE', 256, 2, NULL, 'MB'),
(469, 'SAMSUNG', 'SATA - HD502HI', 500, 1, NULL, 'GB'),
(470, 'Asus', 'P5VD2-MX SE', NULL, 10, NULL, ''),
(472, 'Realtek', ' High Definition Audio', NULL, 4, NULL, ''),
(473, 'Intel', 'Core 2 Duo E4500', 2200, 11, NULL, 'MHz'),
(474, 'ASUS', 'P5GC-MX/1333', NULL, 10, NULL, ''),
(475, 'Nvidia', 'GeForce 8400 GS', 512, 2, NULL, 'MB'),
(476, 'Atheros', 'L2 Fast Ethernet', NULL, 3, NULL, ''),
(478, 'MAXTOR', 'STM', 160, 1, NULL, 'GB'),
(480, 'Samsung', 'IDE', 40, 1, NULL, 'GB'),
(481, 'Samsung', 'IDE', 80, 1, NULL, 'GB'),
(482, 'Samsung', 'IDE', 120, 1, NULL, 'GB'),
(484, 'Maxtro', 'IDE', 40, 1, NULL, 'GB'),
(485, 'Maxtro', 'IDE', 80, 1, NULL, 'GB'),
(486, 'Maxtro', 'IDE', 120, 1, NULL, 'GB'),
(488, 'Seagate', 'IDE', 40, 1, NULL, 'GB'),
(489, 'Seagate', 'IDE', 80, 1, NULL, 'GB'),
(490, 'Seagate', 'IDE', 120, 1, NULL, 'GB'),
(492, 'Fujitsu', 'IDE', 40, 1, NULL, 'GB'),
(493, 'Fujitsu', 'IDE', 80, 1, NULL, 'GB'),
(494, 'Fujitsu', 'IDE', 120, 1, NULL, 'GB'),
(496, 'Western Digital', 'IDE', 40, 1, NULL, 'GB'),
(497, 'Western Digital', 'IDE', 80, 1, NULL, 'GB'),
(498, 'Western Digital', 'IDE', 120, 1, NULL, 'GB'),
(499, 'Samsung', 'SATA', 40, 1, NULL, 'GB'),
(500, 'Samsung', 'SATA', 80, 1, NULL, 'GB'),
(501, 'Samsung', 'SATA', 160, 1, NULL, 'GB'),
(502, 'Samsung', 'SATA', 320, 1, NULL, 'GB'),
(503, 'Samsung', 'SATA', 500, 1, NULL, 'GB'),
(504, 'Maxtro', 'SATA', 40, 1, NULL, 'GB'),
(505, 'Maxtro', 'SATA', 80, 1, NULL, 'GB'),
(506, 'Maxtro', 'SATA', 160, 1, NULL, 'GB'),
(507, 'Maxtro', 'SATA', 320, 1, NULL, 'GB'),
(508, 'Maxtro', 'SATA', 500, 1, NULL, 'GB'),
(509, 'Seagate', 'SATA', 40, 1, NULL, 'GB'),
(510, 'Seagate', 'SATA', 80, 1, NULL, 'GB'),
(511, 'Seagate', 'SATA', 160, 1, NULL, 'GB'),
(512, 'Seagate', 'SATA', 320, 1, NULL, 'GB'),
(513, 'Seagate', 'SATA', 500, 1, NULL, 'GB'),
(514, 'Fujitsu', 'SATA', 40, 1, NULL, 'GB'),
(515, 'Fujitsu', 'SATA', 80, 1, NULL, 'GB'),
(516, 'Fujitsu', 'SATA', 160, 1, NULL, 'GB'),
(517, 'Fujitsu', 'SATA', 320, 1, NULL, 'GB'),
(518, 'Fujitsu', 'SATA', 500, 1, NULL, 'GB'),
(519, 'Western Digital', 'SATA', 40, 1, NULL, 'GB'),
(520, 'Western Digital', 'SATA', 80, 1, NULL, 'GB'),
(521, 'Western Digital', 'SATA', 160, 1, NULL, 'GB'),
(522, 'Western Digital', 'SATA', 320, 1, NULL, 'GB'),
(523, 'Western Digital', 'SATA', 500, 1, NULL, 'GB'),
(527, 'Kingston', 'DDR1', 512, 7, NULL, 'MB'),
(528, 'Kingston', 'DDR1', 256, 7, NULL, 'MB'),
(533, 'Kingston', 'DDR2', 512, 7, NULL, 'MB'),
(534, 'Kingston', 'DDR2', 256, 7, NULL, 'MB'),
(539, 'Markvision', 'DDR1', 512, 7, NULL, 'MB'),
(540, 'Markvision', 'DDR1', 256, 7, NULL, 'MB'),
(545, 'Markvision', 'DDR2', 512, 7, NULL, 'MB'),
(546, 'Markvision', 'DDR2', 256, 7, NULL, 'MB'),
(551, 'Corsair', 'DDR1', 512, 7, NULL, 'MB'),
(552, 'Corsair', 'DDR1', 256, 7, NULL, 'MB'),
(557, 'Corsair', 'DDR2', 512, 7, NULL, 'MB'),
(558, 'Corsair', 'DDR2', 256, 7, NULL, 'MB'),
(563, 'Samsung', 'DDR1', 512, 7, NULL, 'MB'),
(564, 'Samsung', 'DDR1', 256, 7, NULL, 'MB'),
(569, 'Samsung', 'DDR2', 512, 7, NULL, 'MB'),
(570, 'Samsung', 'DDR2', 256, 7, NULL, 'MB'),
(575, 'Titan', 'DDR1', 512, 7, NULL, 'MB'),
(576, 'Titan', 'DDR1', 256, 7, NULL, 'MB'),
(581, 'Titan', 'DDR2', 512, 7, NULL, 'MB'),
(582, 'Titan', 'DDR2', 256, 7, NULL, 'MB'),
(587, 'Genรฉrica', 'DDR1', 512, 7, NULL, 'MB'),
(588, 'Genรฉrica', 'DDR1', 256, 7, NULL, 'MB'),
(593, 'Genรฉrica', 'DDR2', 512, 7, NULL, 'MB'),
(594, 'Genรฉrica', 'DDR2', 256, 7, NULL, 'MB'),
(596, 'Lenten', 'Reborn plus v6.5', NULL, 12, NULL, ''),
(597, 'INTEL', 'G33/G31', NULL, 2, NULL, ''),
(598, '5 in 1', 'Genรฉrico', NULL, 13, NULL, ''),
(599, 'Microsoft', 'Windows XP', NULL, 14, NULL, ''),
(600, 'Microsoft', 'Windows 2000', NULL, 14, NULL, NULL),
(601, 'Microsoft', 'Windows Vista', NULL, 14, NULL, NULL),
(602, 'Microsoft', 'Windows 7', NULL, 14, NULL, NULL),
(603, 'Kingston', 'DDR1', 1024, 7, NULL, 'MB'),
(604, 'Kingston', 'DDR1', 2048, 7, NULL, 'MB'),
(605, 'Kingston', 'DDR1', 3072, 7, NULL, 'MB'),
(606, 'Kingston', 'DDR1', 4096, 7, NULL, 'MB'),
(607, 'Kingston', 'DDR2', 1024, 7, NULL, 'MB'),
(608, 'Kingston', 'DDR2', 2048, 7, NULL, 'MB'),
(609, 'Kingston', 'DDR2', 3072, 7, NULL, 'MB'),
(610, 'Kingston', 'DDR2', 4096, 7, NULL, 'MB'),
(611, 'Genรฉrica', 'DDR1', 1024, 7, NULL, 'MB'),
(612, 'Genรฉrica', 'DDR1', 2048, 7, NULL, 'MB'),
(613, 'Genรฉrica', 'DDR1', 3072, 7, NULL, 'MB'),
(614, 'Genรฉrica', 'DDR1', 4096, 7, NULL, 'MB'),
(615, 'Genรฉrica', 'DDR2', 1024, 7, NULL, 'MB'),
(616, 'Genรฉrica', 'DDR2', 2048, 7, NULL, 'MB'),
(617, 'Genรฉrica', 'DDR2', 3072, 7, NULL, 'MB'),
(618, 'Genรฉrica', 'DDR2', 4096, 7, NULL, 'MB'),
(619, 'Samsung', 'DDR1', 1024, 7, NULL, 'MB'),
(620, 'Samsung', 'DDR1', 2048, 7, NULL, 'MB'),
(621, 'Samsung', 'DDR1', 3072, 7, NULL, 'MB'),
(622, 'Samsung', 'DDR1', 4096, 7, NULL, 'MB'),
(623, 'Samsung', 'DDR2', 1024, 7, NULL, 'MB'),
(624, 'Samsung', 'DDR2', 2048, 7, NULL, 'MB'),
(625, 'Samsung', 'DDR2', 3072, 7, NULL, 'MB'),
(626, 'Samsung', 'DDR2', 4096, 7, NULL, 'MB'),
(627, 'Corsair', 'DDR1', 1024, 7, NULL, 'MB'),
(628, 'Corsair', 'DDR1', 2048, 7, NULL, 'MB'),
(629, 'Corsair', 'DDR1', 3072, 7, NULL, 'MB'),
(630, 'Corsair', 'DDR1', 4096, 7, NULL, 'MB'),
(631, 'Corsair', 'DDR2', 1024, 7, NULL, 'MB'),
(632, 'Corsair', 'DDR2', 2048, 7, NULL, 'MB'),
(633, 'Corsair', 'DDR2', 3072, 7, NULL, 'MB'),
(634, 'Corsair', 'DDR2', 4096, 7, NULL, 'MB'),
(635, 'Titan', 'DDR1', 1024, 7, NULL, 'MB'),
(636, 'Titan', 'DDR1', 2048, 7, NULL, 'MB'),
(637, 'Titan', 'DDR1', 3072, 7, NULL, 'MB'),
(638, 'Titan', 'DDR1', 4096, 7, NULL, 'MB'),
(639, 'Titan', 'DDR2', 1024, 7, NULL, 'MB'),
(640, 'Titan', 'DDR2', 2048, 7, NULL, 'MB'),
(641, 'Titan', 'DDR2', 3072, 7, NULL, 'MB'),
(642, 'Titan', 'DDR2', 4096, 7, NULL, 'MB'),
(643, 'Markvision', 'DDR1', 1024, 7, NULL, 'MB'),
(644, 'Markvision', 'DDR1', 2048, 7, NULL, 'MB'),
(645, 'Markvision', 'DDR1', 3072, 7, NULL, 'MB'),
(646, 'Markvision', 'DDR1', 4096, 7, NULL, 'MB'),
(647, 'Markvision', 'DDR2', 1024, 7, NULL, 'MB'),
(648, 'Markvision', 'DDR2', 2048, 7, NULL, 'MB'),
(649, 'Markvision', 'DDR2', 3072, 7, NULL, 'MB'),
(650, 'Markvision', 'DDR2', 4096, 7, NULL, 'MB'),
(651, 'Kingston', 'DDR3', 1024, 7, NULL, 'MB'),
(652, 'Kingston', 'DDR3', 2048, 7, NULL, 'MB'),
(653, 'Kingston', 'DDR3', 3072, 7, NULL, 'MB'),
(654, 'Kingston', 'DDR3', 4096, 7, NULL, 'MB'),
(655, 'Genรฉrica', 'DDR3', 1024, 7, NULL, 'MB'),
(656, 'Genรฉrica', 'DDR3', 2048, 7, NULL, 'MB'),
(657, 'Genรฉrica', 'DDR3', 3072, 7, NULL, 'MB'),
(658, 'Genรฉrica', 'DDR3', 4096, 7, NULL, 'MB'),
(659, 'Samsung', 'DDR3', 1024, 7, NULL, 'MB'),
(660, 'Samsung', 'DDR3', 2048, 7, NULL, 'MB'),
(661, 'Samsung', 'DDR3', 3072, 7, NULL, 'MB'),
(662, 'Samsung', 'DDR3', 4096, 7, NULL, 'MB'),
(663, 'Corsair', 'DDR3', 1024, 7, NULL, 'MB'),
(664, 'Corsair', 'DDR3', 2048, 7, NULL, 'MB'),
(665, 'Corsair', 'DDR3', 3072, 7, NULL, 'MB'),
(666, 'Corsair', 'DDR3', 4096, 7, NULL, 'MB'),
(667, 'Titan', 'DDR3', 1024, 7, NULL, 'MB'),
(668, 'Titan', 'DDR3', 2048, 7, NULL, 'MB'),
(669, 'Titan', 'DDR3', 3072, 7, NULL, 'MB'),
(670, 'Titan', 'DDR3', 4096, 7, NULL, 'MB'),
(671, 'Markvision', 'DDR3', 1024, 7, NULL, 'MB'),
(672, 'Markvision', 'DDR3', 2048, 7, NULL, 'MB'),
(673, 'Markvision', 'DDR3', 3072, 7, NULL, 'MB'),
(674, 'Markvision', 'DDR3', 4096, 7, NULL, 'MB'),
(675, 'Intel', 'Celeron E1500', 2200, 11, NULL, 'Mhz'),
(676, 'Gigabyte', 'P4M800 pro', NULL, 10, NULL, ''),
(677, 'Intel', 'Celeron', 2660, 11, NULL, 'Mhz'),
(678, 'VIA', 'S3G UNICHROME', NULL, 2, NULL, ''),
(679, 'SAMSUNG', 'RW', NULL, 5, NULL, ''),
(681, 'Phitronics', 'PN73PV3-M', NULL, 10, NULL, ''),
(682, 'Nvidia', 'Geforce 7', NULL, 2, NULL, ''),
(683, 'Nvidia', 'Nforce', NULL, 3, NULL, ''),
(684, 'Realtek', 'RTL HIGH', NULL, 4, NULL, ''),
(685, 'MAXTOR', 'SATA', 250, 1, NULL, 'GB'),
(686, 'Gigabyte', 'GA-945GZM-s2', NULL, 10, NULL, ''),
(687, 'Intel', '82945G', NULL, 2, NULL, ''),
(688, 'D-Link', 'DWL-G510', NULL, 3, NULL, ''),
(689, 'Realtek', 'AC 97', NULL, 4, NULL, ''),
(690, 'Intel', 'Dual Core', 2000, 11, NULL, 'mhz'),
(691, 'Realtek', 'RTL 8168', NULL, 3, NULL, ''),
(692, 'Intel', 'Dual Core', 1800, 11, NULL, 'mhz'),
(693, 'Gigabyte', 'GA-VM800PMC', NULL, 10, NULL, ''),
(694, 'Gigabyte', 'GA-VM900MV', NULL, 10, NULL, ''),
(695, 'VIA', 'CHROME 9HCIGP', NULL, 2, NULL, ''),
(696, 'intel', 'd845', NULL, 10, NULL, ''),
(697, 'BIOSTAR', 'P4M80-M4', NULL, 10, NULL, ''),
(698, 'GIGABYTE', '8I865GME-775', NULL, 10, NULL, ''),
(699, 'D-LINK', 'AIRPLUS DWL', NULL, 3, NULL, ''),
(700, 'SIS', '300/305', NULL, 2, NULL, ''),
(701, 'SIS', '7018 AUDIO DRIVER', NULL, 4, NULL, ''),
(702, 'ECS', 'P4M800PRO-M', NULL, 10, NULL, ''),
(703, 'INTEL', 'CELERON D 2.53 GHZ', NULL, 11, NULL, ''),
(704, 'PCCHIPS', 'P21G', NULL, 10, NULL, ''),
(705, 'PCCHIPS', 'P25G V3.0', NULL, 10, NULL, ''),
(706, 'ECS', '741GX-M', NULL, 10, NULL, ''),
(707, 'AMD', 'SEMPRON 902', NULL, 11, NULL, 'MHZ'),
(708, 'SIS', '650/651', NULL, 2, NULL, ''),
(709, 'ECS', 'M810DLU', NULL, 10, NULL, ''),
(710, 'LEGACY', '0', NULL, 4, NULL, ''),
(711, 'AMD', 'DURON 1.20', NULL, 11, NULL, 'GHZ'),
(712, 'SAMSUNG', '20', NULL, 1, NULL, 'GB'),
(713, 'FUJITSU', 'IDE', 20, 1, NULL, 'GB'),
(714, 'INTEL', 'CELERON 2.0', NULL, 11, NULL, 'GHZ'),
(715, 'INTEL', 'CELERON 2.66', NULL, 11, NULL, 'GHZ'),
(716, 'ECS', '741 GX-M', NULL, 10, NULL, ''),
(717, 'KINGSTON', 'DIMM', 1024, 7, NULL, 'MB'),
(718, 'SIS', '650/651/740/661FX/741/760 SERIES', NULL, 2, NULL, ''),
(719, 'KINGSTON', 'DDR1', 352, 7, NULL, 'MB'),
(720, 'PCCHIPS', 'M825UXX', NULL, 10, NULL, ''),
(721, 'VIA RHINE II', ' FAST ETHERNET ADAPTER', NULL, 3, NULL, ''),
(722, 'INTEL', 'PRO/100 VE NETWORK CONNECTION', NULL, 2, NULL, ''),
(723, 'LEGACY', 'DRIVER DE AUDIO', NULL, 4, NULL, ''),
(724, 'INTEL', 'CELERON D 331', NULL, 11, NULL, 'GHZ'),
(725, 'VIA', 'USB ENLANCED HOST CONTROLLER', NULL, 4, NULL, ''),
(726, 'INTEL', '82865G GRAPHICS CONTROLLER', NULL, 2, NULL, ''),
(727, 'INTEL', 'PENTIUM 4 3.20', NULL, 11, NULL, 'GHZ'),
(728, 'AMD', 'SEMPROM 1.60', NULL, 11, NULL, 'GHZ'),
(729, 'KINGSTON ', 'DIMM', 256, 7, NULL, 'MB'),
(730, 'intel', 'celeron 1.80 ', NULL, 11, NULL, 'ghz'),
(731, 'nvidia', 'gforce 7100', NULL, 2, NULL, ''),
(732, 'nvidia', 'nforce', NULL, 3, NULL, ''),
(733, 'samsung', 'sata', 150, 1, NULL, 'gb'),
(734, 'asus', 'p4m900', NULL, 10, NULL, ''),
(735, 'via', 'high definition', NULL, 4, NULL, ''),
(736, 'via', 'rhine II', NULL, 3, NULL, ''),
(737, 'INTEL', 'PENTIUM DUAL 2.20', NULL, 11, NULL, 'GHZ'),
(738, '0', '945GC', NULL, 10, NULL, ''),
(739, 'GIGABYTE', 'GA-8VM800M', NULL, 10, NULL, ''),
(740, 'INTEL', 'CELERON 4.20', NULL, 11, NULL, 'GHZ'),
(741, 'VIA', 'VT1708 HIGH DEFINITION AUDIO', NULL, 4, NULL, ''),
(742, 'ASROCK', 'P4VM890', NULL, 10, NULL, ''),
(743, '0', 'M863G', NULL, 10, NULL, ''),
(744, 'AMD', 'SEMPROM 1.67', NULL, 11, NULL, 'GHZ'),
(745, 'SIS', '651', NULL, 2, NULL, ''),
(746, 'SIS', '900', NULL, 3, NULL, ''),
(747, '0', 'P4M800CE', NULL, 10, NULL, ''),
(748, 'INTEL', 'D845GVSR', NULL, 10, NULL, ''),
(749, 'INTEL', '82801DB-AC'97', NULL, 4, NULL, ''),
(750, 'INTEL', 'DUAL CORE 1.60', NULL, 11, NULL, 'GHZ'),
(751, 'INTEL', '946G2 EXPRESS', NULL, 2, NULL, ''),
(752, 'BROADCOM', 'NET LINK', NULL, 3, NULL, ''),
(753, 'SOUND MAX', 'ADAPTER AUDIO', NULL, 4, NULL, ''),
(754, 'P4SPMX', 'SE', NULL, 10, NULL, ''),
(755, '3COM', '10/100', NULL, 3, NULL, ''),
(756, 'PCCHIPS', 'M810DLU', NULL, 10, NULL, ''),
(757, 'MPU-401', 'COMPARTEBLE MIDI DEVICE', NULL, 4, NULL, ''),
(758, 'AMD', 'DURON 1.30', NULL, 11, NULL, 'GHZ');
--
-- Extraindo dados da tabela `nivel`
--
INSERT INTO `nivel` VALUES (1, 'Administrador');
INSERT INTO `nivel` VALUES (2, 'Operador');
INSERT INTO `nivel` VALUES (3, 'Apenas Consulta');
INSERT INTO `nivel` VALUES (4, 'Contabilidade');
INSERT INTO `nivel` VALUES (5, 'Desabilitado');
--
-- Extraindo dados da tabela `polegada`
--
INSERT INTO `polegada` VALUES (1, '14 polegadas');
INSERT INTO `polegada` VALUES (2, '15 polegadas');
INSERT INTO `polegada` VALUES (3, '17 polegadas');
INSERT INTO `polegada` VALUES (4, '18 polegadas'); -- Incluido por lrgamito
INSERT INTO `polegada` VALUES (5, '19 polegadas'); -- Incluido por lrgamito
INSERT INTO `polegada` VALUES (6, '20 polegadas'); -- Incluido por lrgamito
--
-- Extraindo dados da tabela `prioridades`
--
INSERT INTO `prioridades` VALUES (2, 'NรญVEL 1', 18);
INSERT INTO `prioridades` VALUES (3, 'NรญVEL 2', 19);
INSERT INTO `prioridades` VALUES (4, 'NรญVEL 3', 20);
INSERT INTO `prioridades` VALUES (5, 'NรญVEL 4', 2);
--
-- Extraindo dados da tabela `reitorias`
--
INSERT INTO `reitorias` VALUES (1, 'DEFAULT');
--
-- Extraindo dados da tabela `resolucao`
--
INSERT INTO `resolucao` VALUES (1, '9600 DPI');
INSERT INTO `resolucao` VALUES (2, '2400 DPI');
INSERT INTO `resolucao` VALUES (3, '1200 DPI');
--
-- Extraindo dados da tabela `situacao`
--
INSERT INTO `situacao` VALUES (1, 'Operacional', 'Equipamento sem problemas de funcionamento');
INSERT INTO `situacao` VALUES (2, 'Nรฃo Operacional', 'Equipamento utilizado apenas para testes de hardware e nรฃo funcionando');
INSERT INTO `situacao` VALUES (3, 'Em manutenรงรฃo', 'Equipamento aguardando peรงa para manutenรงรฃo');
INSERT INTO `situacao` VALUES (4, 'Furtado', 'Equipamentos furtados da empresa.');
INSERT INTO `situacao` VALUES (5, 'Trocado', 'Equipamento trocado por outro em funรงรฃo da sua garantia.');
INSERT INTO `situacao` VALUES (6, 'Aguardando orรงamento', 'Aguardando orรงamento para conserto');
INSERT INTO `situacao` VALUES (7, 'Sucateado', 'Equipamento nรฃo possui condiรงรตes para conserto');
--
-- Extraindo dados da tabela `sla_solucao`
--
INSERT INTO `sla_solucao` VALUES (1, 15, '15 minutos');
INSERT INTO `sla_solucao` VALUES (2, 30, '30 minutos');
INSERT INTO `sla_solucao` VALUES (3, 45, '45 minutos');
INSERT INTO `sla_solucao` VALUES (4, 60, '1 hora');
INSERT INTO `sla_solucao` VALUES (5, 120, '2 horas');
INSERT INTO `sla_solucao` VALUES (6, 180, '3 horas');
INSERT INTO `sla_solucao` VALUES (7, 240, '4 horas');
INSERT INTO `sla_solucao` VALUES (8, 480, '8 horas');
INSERT INTO `sla_solucao` VALUES (9, 720, '12 horas');
INSERT INTO `sla_solucao` VALUES (10, 1440, '24 horas');
INSERT INTO `sla_solucao` VALUES (11, 2880, '2 dias');
INSERT INTO `sla_solucao` VALUES (12, 4320, '3 dias');
INSERT INTO `sla_solucao` VALUES (13, 5760, '4 dias');
INSERT INTO `sla_solucao` VALUES (14, 10080, '1 semana');
INSERT INTO `sla_solucao` VALUES (15, 20160, '2 semanas');
INSERT INTO `sla_solucao` VALUES (16, 30240, '3 semanas');
INSERT INTO `sla_solucao` VALUES (17, 43200, '1 mรชs');
INSERT INTO `sla_solucao` VALUES (18, 5, '5 minutos');
INSERT INTO `sla_solucao` VALUES (19, 10, '10 minutos');
INSERT INTO `sla_solucao` VALUES (20, 20, '20 minutos');
INSERT INTO `sla_solucao` VALUES (21, 25, '25 minutos');
--
-- Extraindo dados da tabela `status_categ`
--
INSERT INTO `status_categ` VALUES (1, 'AO USUรRIO');
INSERT INTO `status_categ` VALUES (2, 'ร รREA TรCNICA');
INSERT INTO `status_categ` VALUES (3, 'ร SERVIรOS DE TERCEIROS');
INSERT INTO `status_categ` VALUES (4, 'INDEPENDENTE');
--
-- Extraindo dados da tabela `status`
--
INSERT INTO `status` VALUES (1, 'Aguardando atendimento', 2, 2);
INSERT INTO `status` VALUES (2, 'Em atendimento', 2, 1);
INSERT INTO `status` VALUES (3, 'Em estudo', 2, 1);
INSERT INTO `status` VALUES (4, 'Encerrada', 4, 3);
INSERT INTO `status` VALUES (7, 'Agendado com usuรrio', 1, 2);
INSERT INTO `status` VALUES (12, 'Cancelado', 4, 3);
INSERT INTO `status` VALUES (15, 'Todos', 4, 2);
INSERT INTO `status` VALUES (16, 'Aguardando feedback do usuรrio', 1, 2);
INSERT INTO `status` VALUES (19, 'Indisponรvel para atendimento', 1, 2);
INSERT INTO `status` VALUES (21, 'Encaminhado para operador', 2, 1);
INSERT INTO `status` VALUES (22, 'Interrompido para atender outro chamado', 2, 1);
INSERT INTO `status` VALUES (25, 'Aguardando retorno do fornecedor', 3, 1);
INSERT INTO `status` VALUES (26, 'Com Backup', 4, 2);
INSERT INTO `status` VALUES (27, 'Reservado para Operador', 2, 1);
--
-- Extraindo dados da tabela `tempo_garantia`
--
INSERT INTO `tempo_garantia` VALUES (1, 12);
INSERT INTO `tempo_garantia` VALUES (2, 24);
INSERT INTO `tempo_garantia` VALUES (3, 36);
INSERT INTO `tempo_garantia` VALUES (4, 6);
INSERT INTO `tempo_garantia` VALUES (5, 18);
--
-- Extraindo dados da tabela `tipo_equip`
--
INSERT INTO `tipo_equip` VALUES (1, 'Desktop');
INSERT INTO `tipo_equip` VALUES (2, 'Notebook');
INSERT INTO `tipo_equip` VALUES (3, 'Impressora');
INSERT INTO `tipo_equip` VALUES (4, 'Scanner');
INSERT INTO `tipo_equip` VALUES (5, 'Monitor');
INSERT INTO `tipo_equip` VALUES (6, 'Zip Drive');
INSERT INTO `tipo_equip` VALUES (7, 'Switch');
INSERT INTO `tipo_equip` VALUES (8, 'Roteador');
INSERT INTO `tipo_equip` VALUES (9, 'Gravador externo de CD');
INSERT INTO `tipo_equip` VALUES (10, 'Placa externa de captura');
INSERT INTO `tipo_equip` VALUES (11, 'No Break');
INSERT INTO `tipo_equip` VALUES (12, 'Storage');
--
-- Extraindo dados da tabela `tipo_garantia`
--
INSERT INTO `tipo_garantia` VALUES (1, 'Balcรฃo');
INSERT INTO `tipo_garantia` VALUES (2, 'On site');
--
-- Extraindo dados da tabela `tipo_imp`
--
INSERT INTO `tipo_imp` VALUES (1, 'Matricial');
INSERT INTO `tipo_imp` VALUES (2, 'Jato de tinta');
INSERT INTO `tipo_imp` VALUES (3, 'Laser');
INSERT INTO `tipo_imp` VALUES (4, 'Multifuncional');
INSERT INTO `tipo_imp` VALUES (5, 'Copiadora');
INSERT INTO `tipo_imp` VALUES (6, 'Matricial cupom nรฃo fiscal');
INSERT INTO `tipo_imp` VALUES (7, 'Etiqueta');
--
-- Extraindo dados da tabela `tipo_item`
--
INSERT INTO `tipo_item` VALUES (1, 'HARDWARE');
INSERT INTO `tipo_item` VALUES (2, 'SOFTWARE');
INSERT INTO `tipo_item` VALUES (3, 'HARDWARE E SOFTWARE');
--
-- Extraindo dados da tabela `instituicao`
--
INSERT INTO `instituicao` VALUES (1, '01-DEFAULT', 1);
--
-- Extraindo dados da tabela `usuarios_areas`
--
INSERT INTO `usuarios_areas` VALUES (1, 1, '1');
INSERT INTO `permissoes` VALUES (1, 1, 1, 1);
INSERT INTO `permissoes` VALUES (2, 1, 2, 1);
UPDATE `nivel` SET `nivel_nome` = 'Somente Abertura' WHERE `nivel_cod` = 3;
CREATE TABLE `configusercall` (
`conf_cod` INT( 4 ) NOT NULL AUTO_INCREMENT ,
`conf_nivel` VARCHAR( 200 ) NOT NULL ,
`conf_scr_area` INT( 1 ) DEFAULT '1' NOT NULL ,
`conf_scr_prob` INT( 1 ) DEFAULT '1' NOT NULL ,
`conf_scr_desc` INT( 1 ) DEFAULT '1' NOT NULL ,
`conf_scr_unit` INT( 1 ) DEFAULT '1' NOT NULL ,
`conf_scr_tag` INT( 1 ) DEFAULT '1' NOT NULL ,
`conf_scr_chktag` INT( 1 ) DEFAULT '1' NOT NULL ,
`conf_scr_chkhist` INT( 1 ) DEFAULT '1' NOT NULL ,
`conf_scr_contact` INT( 1 ) DEFAULT '1' NOT NULL ,
`conf_scr_fone` INT( 1 ) DEFAULT '1' NOT NULL ,
`conf_scr_local` INT( 1 ) DEFAULT '1' NOT NULL ,
`conf_scr_btloadlocal` INT( 1 ) DEFAULT '1' NOT NULL ,
`conf_scr_searchbylocal` INT( 1 ) DEFAULT '1' NOT NULL ,
`conf_scr_operator` INT( 1 ) DEFAULT '1' NOT NULL ,
`conf_scr_date` INT( 1 ) DEFAULT '1' NOT NULL ,
`conf_scr_status` INT( 1 ) DEFAULT '1' NOT NULL ,
`conf_scr_replicate` INT( 1 ) DEFAULT '1' NOT NULL ,
`conf_scr_mail` INT( 1 ) DEFAULT '1' NOT NULL ,
`conf_scr_msg` TEXT NOT NULL ,
PRIMARY KEY ( `conf_cod` )
) COMMENT = 'tabela de configuraรงรฃo para usuรกrios de somente abertura de chamados';
ALTER TABLE `configusercall` ADD `conf_opentoarea` INT( 4 ) DEFAULT '1' NOT NULL AFTER `conf_nivel` ;
ALTER TABLE `configusercall` ADD INDEX ( `conf_opentoarea` ) ;
ALTER TABLE `configusercall` ADD INDEX ( `conf_nivel` ) ;
ALTER TABLE `configusercall` ADD `conf_ownarea` INT( 4 ) DEFAULT '1' NOT NULL AFTER `conf_nivel` ;
ALTER TABLE `configusercall` ADD INDEX ( `conf_ownarea` ) ;
ALTER TABLE `configusercall` ADD `conf_user_opencall` INT( 1 ) DEFAULT '0' NOT NULL AFTER `conf_cod` ;
ALTER TABLE `configusercall` CHANGE `conf_nivel` `conf_custom_areas` VARCHAR( 200 ) NOT NULL;
ALTER TABLE `usuarios` ADD `user_admin` INT( 1 ) DEFAULT '0' NOT NULL ;
CREATE TABLE `utmp_usuarios` (
`utmp_cod` int(4) NOT NULL auto_increment,
`utmp_login` varchar(15) NOT NULL default '',
`utmp_nome` varchar(40) NOT NULL default '',
`utmp_email` varchar(40) NOT NULL default '',
`utmp_passwd` varchar(40) NOT NULL default '',
`utmp_rand` varchar(40) NOT NULL default '',
PRIMARY KEY (`utmp_cod`),
UNIQUE KEY `utmp_login` (`utmp_login`,`utmp_email`),
KEY `utmp_rand` (`utmp_rand`)
) COMMENT='Tabela de transiรงรฃo para cadastro de usuรกrios';
CREATE TABLE `mailconfig` (
`mail_cod` INT( 4 ) NOT NULL AUTO_INCREMENT ,
`mail_issmtp` INT( 1 ) DEFAULT '1' NOT NULL ,
`mail_host` VARCHAR( 40 ) DEFAULT 'mail.smtp.com' NOT NULL ,
`mail_isauth` INT( 1 ) DEFAULT '0' NOT NULL ,
`mail_user` VARCHAR( 20 ) ,
`mail_pass` VARCHAR( 50 ) ,
`mail_from` VARCHAR( 40 ) DEFAULT 'ocomon@yourdomain.com' NOT NULL ,
`mail_ishtml` INT( 1 ) DEFAULT '1' NOT NULL ,
PRIMARY KEY ( `mail_cod` )
) COMMENT = 'Tabela de configuracao para envio de e-mails';
CREATE TABLE `msgconfig` (
`msg_cod` INT( 4 ) NOT NULL AUTO_INCREMENT ,
`msg_event` VARCHAR( 40 ) DEFAULT 'evento' NOT NULL ,
`msg_fromname` VARCHAR( 40 ) DEFAULT 'from' NOT NULL ,
`msg_replyto` VARCHAR( 40 ) DEFAULT 'ocomon@yourdomain.com' NOT NULL ,
`msg_subject` VARCHAR( 40 ) DEFAULT 'subject' NOT NULL ,
`msg_body` TEXT,
`msg_altbody` TEXT,
PRIMARY KEY ( `msg_cod` )
) COMMENT = 'Tabela de configuracao das mensagens de e-mail';
ALTER TABLE `msgconfig` ADD UNIQUE (
`msg_event`
);
INSERT INTO `mailconfig` ( `mail_cod` , `mail_issmtp` , `mail_host` , `mail_isauth` , `mail_user` , `mail_pass` , `mail_from` , `mail_ishtml` )
VALUES (
'', '1', 'mail.smtp.com', '0', NULL , NULL , 'mail@yourdomain.com', '1'
);
INSERT INTO `msgconfig` VALUES (1, 'abertura-para-usuario', 'Sistema Ocomon', 'reply-to', 'CHAMADO ABERTO NO SISTEMA', 'Caro %usuario%,<br />Seu chamado foi aberto com sucesso no sistema de atendimento.<br />O número do chamado é %numero%<br />Aguarde o atendimento pela equipe de suporte.<br />%site%', 'Caro %usuario%,\r\nSeu chamado foi aberto com sucesso no sistema de atendimento.\r\nO nรบmero do chamado รฉ %numero%\r\nAguarde o atendimento pela equipe de suporte.\r\n%site%');
INSERT INTO `msgconfig` VALUES (2, 'abertura-para-area', 'Sistema Ocomon', 'reply-to', 'CHAMADO ABERTO PARA %area%', 'Sistema Ocomon<br />Foi aberto um novo chamado técnico para ser atendido pela área %area%.<br />O número do chamado é %numero%<br />Descrição: %descricao%<br />Contato: %contato%<br />Setor: %setor%<br />Ramal: %ramal%<br />Chamado aberto pelo operador: %operador%<br />%site%', 'Sistema Ocomon\r\nFoi aberto um novo chamado tรฉcnico para ser atendido pela รกrea %area%.\r\nO nรบmero do chamado รฉ %numero%\r\nDescriรงรฃo: %descricao%\r\nContato: %contato%\r\nSetor: %setor%\r\nRamal: %ramal%\r\nChamado aberto pelo operador: %operador%\r\n%site%');
INSERT INTO `msgconfig` VALUES (3, 'encerra-para-area', 'SISTEMA OCOMON', 'reply-to', 'OCOMON - CHAMADO ENCERRADO', 'Sistema Ocomon<br />O chamado %numero% foi fechado pelo operador %operador%<br />Descrição técnica: %descricao%<br />Solução: %solucao%', 'Sistema Ocomon\r\nO chamado %numero% foi fechado pelo operador %operador%\r\nDescriรงรฃo tรฉcnica: %descricao%\r\nSoluรงรฃo: %solucao%');
INSERT INTO `msgconfig` VALUES (4, 'encerra-para-usuario', 'SISTEMA OCOMON', 'reply-to', 'OCOMON -CHAMADO ENCERRADO NO SISTEMA', 'Caro %contato%<br />Seu chamado foi encerrado no sistema de atendimento.<br />Número do chamado: %numero%<br />Para maiores informações acesso o sistema com seu nome de usuário e senha no endereço abaixo:<br />%site%', 'Caro %contato%\r\nSeu chamado foi encerrado no sistema de atendimento.\r\nNรบmero do chamado: %numero%\r\nPara maiores informaรงรตes acesso o sistema com seu nome de usuรกrio e senha no endereรงo abaixo:\r\n%site%');
INSERT INTO `msgconfig` VALUES (5, 'edita-para-area', 'SISTEMA OCOMON', 'reply-to', 'CHAMADO EDITADO PARA %area%', '<span style="color: rgb(0, 0, 0);">Sistema Ocomon</span><br />Foram adicionadas informações ao chamado %numero% para a área %area%<br />Descrição: %descricao%<br />Alteração mais recente: %assentamento%<br />Contato: %contato%<br />Ramal: %ramal%<br />Ocorrência editada pelo operador: %operador%<br />%site%', 'Sistema Ocomon\r\nForam adicionadas informaรงรตes ao chamado %numero% para a รกrea %area%\r\nDescriรงรฃo: %descricao%\r\nAlteraรงรฃo mais recente: %assentamento%\r\nContato: %contato%\r\nRamal: %ramal%\r\nOcorrรชncia editada pelo operador: %operador%\r\n%site%');
INSERT INTO `msgconfig` VALUES (6, 'edita-para-usuario', 'SISTEMA OCOMON', 'reply-to', 'OCOMON - ALTERAรรES NO SEU CHAMADO', 'Caro %contato%,<br />O chamado %numero% foi editado no sistema de atendimento.<br />Alteração mais recente: %assentamento%<br />Para maiores informações acesse o sistema com seu usuário e senha no endereço abaixo:<br />%site%', 'Caro %contato%,\r\nO chamado %numero% foi editado no sistema de atendimento.\r\nAlteraรงรฃo mais recente: %assentamento%\r\nPara maiores informaรงรตes acesse o sistema com seu usuรกrio e senha no endereรงo abaixo:\r\n%site%');
INSERT INTO `msgconfig` VALUES (7, 'edita-para-operador', 'SISTEMA OCOMON', 'reply-to', 'CHAMADO PARA %operador%', 'Caro %operador%,<br />O chamado %numero% foi editado e está direcionado a você.<br />Descrição: %descricao%<br />Alteração mais recente: %assentamento%<br />Contato: %contato% <br />Ramal: %ramal%<br />Ocorrência editada pelo operador: %editor%<br />%site%', 'Caro %operador%,\r\nO chamado %numero% foi editado e estรก direcionado a vocรช.\r\nDescriรงรฃo: %descricao%\r\nAlteraรงรฃo mais recente: %assentamento%\r\nContato: %contato%\r\nRamal: %ramal%\r\nOcorrรชncia editada pelo operador: %editor%\r\n%site%');
INSERT INTO `msgconfig` VALUES (8, 'cadastro-usuario', 'SISTEMA OCOMON', 'reply-to', 'OCOMON - CONFIRMAรรO DE CADASTRO', 'Prezado %usuario%,<br />Sua solicitação para criação do login "%login%" foi bem sucedida!<br />Para confirmar sua inscrição clique no link abaixo:<br />%linkconfirma%', 'Prezado %usuario%,\r\nSua solicitaรงรฃo para criaรงรฃo do login "%login%" foi bem sucedida!\r\nPara confirmar sua inscriรงรฃo clique no link abaixo:\r\n%linkconfirma%');
INSERT INTO `msgconfig` VALUES ('', 'cadastro-usuario-from-admin', 'SISTEMA OCOMON', 'reply-to', 'OCOMON - CONFIRMAรรO DE CADASTRO', 'Prezado %usuario%<br />Seu cadastro foi efetuado com sucesso no sistema de chamados do Helpdesk<br />Seu login é: %login%<br />Para abrir chamados acesse o site %site%<br />Atenciosamente Helpdesk Unilasalle', 'Prezado %usuario%\r\nSeu cadastro foi efetuado com sucesso no sistema de chamados do Helpdesk\r\nSeu login รฉ: %login%\r\nPara abrir chamados acesse o site %site%\r\nAtenciosamente Helpdesk Unilasalle');
ALTER TABLE `mailconfig` CHANGE `mail_user` `mail_user` VARCHAR( 40 ) DEFAULT NULL;
CREATE TABLE `imagens` (
`img_cod` INT( 4 ) NOT NULL AUTO_INCREMENT ,
`img_oco` INT( 4 ) NOT NULL ,
`img_nome` VARCHAR( 30 ) NOT NULL ,
`img_tipo` VARCHAR( 20 ) NOT NULL ,
`img_bin` LONGBLOB NOT NULL ,
PRIMARY KEY ( `img_cod` ) ,
INDEX ( `img_oco` )
) COMMENT = 'Tabela de imagens anexas aos chamados';
ALTER TABLE `imagens` ADD `img_largura` INT( 4 ) NULL ,
ADD `img_altura` INT( 4 ) NULL ;
ALTER TABLE `imagens` ADD `img_inv` INT( 6 ) NULL AFTER `img_oco` ,
ADD `img_model` INT( 4 ) NULL AFTER `img_inv` ;
ALTER TABLE `imagens` ADD INDEX ( `img_inv` , `img_model` ) ;
ALTER TABLE `imagens` CHANGE `img_oco` `img_oco` INT( 4 ) NULL;
ALTER TABLE `imagens` ADD `img_inst` INT( 4 ) NULL AFTER `img_oco` ;
ALTER TABLE `imagens` ADD INDEX ( `img_inst` ) ;
ALTER TABLE `configusercall` ADD `conf_scr_upload` INT( 1 ) NOT NULL DEFAULT '0';
CREATE TABLE `config` (
`conf_cod` INT( 4 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`conf_sql_user` VARCHAR( 20 ) NOT NULL DEFAULT 'ocomon',
`conf_sql_passwd` VARCHAR( 50 ) NULL ,
`conf_sql_server` VARCHAR( 40 ) NOT NULL DEFAULT 'localhost',
`conf_sql_db` VARCHAR( 40 ) NOT NULL DEFAULT 'ocomon',
`conf_db_ccusto` VARCHAR( 40 ) NOT NULL DEFAULT 'ocomon',
`conf_tb_ccusto` VARCHAR( 40 ) NOT NULL DEFAULT 'CCUSTO',
`conf_ccusto_id` VARCHAR( 20 ) NOT NULL DEFAULT 'codigo',
`conf_ccusto_desc` VARCHAR( 20 ) NOT NULL DEFAULT 'descricao',
`conf_ccusto_cod` VARCHAR( 20 ) NOT NULL DEFAULT 'codccusto',
`conf_ocomon_site` VARCHAR( 50 ) NOT NULL DEFAULT 'http://localhost/ocomon/',
`conf_inst_terceira` INT( 4 ) NOT NULL DEFAULT '-1',
`conf_log_path` VARCHAR( 50 ) NOT NULL DEFAULT '../../includes/logs/',
`conf_logo_path` VARCHAR( 50 ) NOT NULL DEFAULT '../../includes/logos',
`conf_icons_path` VARCHAR( 50 ) NOT NULL DEFAULT '../../includes/icons/',
`conf_help_icon` VARCHAR( 50 ) NOT NULL DEFAULT '../../includes/icons/solucoes2.png',
`conf_help_path` VARCHAR( 50 ) NOT NULL DEFAULT '../../includes/help/',
`conf_language` VARCHAR( 15 ) NOT NULL DEFAULT 'pt_BR.php',
`conf_auth_type` VARCHAR( 30 ) NOT NULL DEFAULT 'SYSTEM',
`conf_upld_size` INT( 10 ) NOT NULL DEFAULT '307200',
`conf_upld_width` INT( 5 ) NOT NULL DEFAULT '800',
`conf_upld_height` INT( 5 ) NOT NULL DEFAULT '600'
) TYPE = MYISAM COMMENT = 'Tabela de configuraรงรตes diversas do sistema';
INSERT INTO `config` ( `conf_cod` , `conf_sql_user` , `conf_sql_passwd` , `conf_sql_server` , `conf_sql_db` , `conf_db_ccusto` , `conf_tb_ccusto` , `conf_ccusto_id` , `conf_ccusto_desc` , `conf_ccusto_cod` , `conf_ocomon_site` , `conf_inst_terceira` , `conf_log_path` , `conf_logo_path` , `conf_icons_path` , `conf_help_icon` , `conf_help_path` , `conf_language` , `conf_auth_type` , `conf_upld_size` , `conf_upld_width` , `conf_upld_height` )
VALUES (
NULL , 'ocomon', NULL , 'localhost', 'ocomon', 'ocomon', 'CCUSTO', 'codigo', 'descricao', 'codccusto', 'http://localhost/ocomon/', '-1', '../../includes/logs/', '../../includes/logos', '../../includes/icons/', '../../includes/icons/solucoes2.png', '../../includes/help/', 'pt_BR.php', 'SYSTEM', '307200', '800', '600' );
CREATE TABLE `hw_alter` (
`hwa_cod` INT( 4 ) NOT NULL AUTO_INCREMENT ,
`hwa_inst` INT( 4 ) NOT NULL ,
`hwa_inv` INT( 6 ) NOT NULL ,
`hwa_item` INT( 4 ) NOT NULL ,
`hwa_user` INT( 4 ) NOT NULL ,
PRIMARY KEY ( `hwa_cod` ) ,
INDEX ( `hwa_inst` , `hwa_inv` , `hwa_item` , `hwa_user` )
) TYPE = MYISAM COMMENT = 'Tabela para armazenar alteracoes de hw';
ALTER TABLE `hw_alter` ADD `hwa_data` DATETIME NOT NULL ;
CREATE TABLE `ocodeps` (
`dep_pai` INT( 6 ) NOT NULL ,
`dep_filho` INT( 6 ) NOT NULL ,
PRIMARY KEY ( `dep_pai` ) ,
INDEX ( `dep_filho` )
) TYPE = MYISAM COMMENT = 'Tabela para controle de sub-chamados';
ALTER TABLE `ocodeps` DROP PRIMARY KEY;
ALTER TABLE `ocodeps` ADD INDEX ( `dep_pai` );
CREATE TABLE `doc_time` (
`doc_oco` INT( 6 ) NOT NULL ,
`doc_open` INT( 10 ) DEFAULT '0' NOT NULL ,
`doc_edit` INT( 10 ) DEFAULT '0' NOT NULL ,
`doc_close` INT( 10 ) DEFAULT '0' NOT NULL ,
PRIMARY KEY ( `doc_oco` )
) COMMENT = 'Tabela para armazenar o tempo de documentacao de cada chamado';
ALTER TABLE `doc_time` ADD `doc_user` INT( 4 ) NOT NULL ;
ALTER TABLE `doc_time` ADD INDEX ( `doc_user` ) ;
ALTER TABLE `doc_time` DROP PRIMARY KEY;
ALTER TABLE `doc_time` ADD `doc_id` INT( 6 ) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST ;
ALTER TABLE `doc_time` ADD INDEX ( `doc_oco` );
-- VERSION 2.0 --
ALTER TABLE `config` ADD `conf_formatBar` VARCHAR( 40 ) NULL DEFAULT '%%mural%';
ALTER TABLE `config` ADD INDEX ( `conf_formatBar` ) ;
ALTER TABLE `config` ADD `conf_page_size` INT( 3 ) NOT NULL DEFAULT '50';
ALTER TABLE `problemas` ADD `prob_tipo_1` INT( 4 ) NULL ,
ADD `prob_tipo_2` INT( 4 ) NULL ;
ALTER TABLE `problemas` ADD INDEX ( `prob_tipo_1` , `prob_tipo_2` ) ;
ALTER TABLE `problemas` ADD `prob_tipo_3` INT( 4 ) NULL ;
ALTER TABLE `problemas` ADD INDEX ( `prob_tipo_3` ) ;
CREATE TABLE `prob_tipo_1` (
`probt1_cod` INT( 4 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`probt1_desc` VARCHAR( 30 ) NOT NULL
) TYPE = MYISAM ;
CREATE TABLE `prob_tipo_2` (
`probt2_cod` INT( 4 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`probt2_desc` VARCHAR( 30 ) NOT NULL
) TYPE = MYISAM ;
CREATE TABLE `prob_tipo_3` (
`probt3_cod` INT( 4 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`probt3_desc` VARCHAR( 30 ) NOT NULL
) TYPE = MYISAM ;
ALTER TABLE `config` ADD `conf_prob_tipo_1` VARCHAR( 30 ) NOT NULL DEFAULT 'Categoria 1',
ADD `conf_prob_tipo_2` VARCHAR( 30 ) NOT NULL DEFAULT 'Categoria 2',
ADD `conf_prob_tipo_3` VARCHAR( 30 ) NOT NULL DEFAULT 'Categoria 3';
ALTER TABLE `config` ADD INDEX ( `conf_prob_tipo_1` , `conf_prob_tipo_2` , `conf_prob_tipo_3` ) ;
CREATE TABLE `temas` (
`tm_id` INT( 2 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`tm_destaca` VARCHAR( 10 ) NOT NULL DEFAULT '#CCCCCC',
`tm_marca` VARCHAR( 10 ) NOT NULL DEFAULT '#FFFFCC',
`tm_lin_par` VARCHAR( 10 ) NOT NULL DEFAULT '#E3E1E1',
`tm_lin_impar` VARCHAR( 10 ) NOT NULL DEFAULT '#F6F6F6',
`tm_color_body` VARCHAR( 10 ) NOT NULL DEFAULT '#F6F6F6',
`tm_color_td` VARCHAR( 10 ) NOT NULL DEFAULT '#DBDBDB',
`tm_borda_width` INT( 2 ) NOT NULL DEFAULT '2'
) TYPE = MYISAM ;
ALTER TABLE `temas` ADD `tm_nome` VARCHAR( 15 ) NOT NULL DEFAULT 'DEFAULT' AFTER `tm_id` ;
ALTER TABLE `temas` ADD `tm_borda_color` VARCHAR( 10 ) NOT NULL DEFAULT '#F6F6F6',
ADD `tm_tr_header` VARCHAR( 11 ) NOT NULL DEFAULT 'IMG_DEFAULT';
ALTER TABLE `temas` ADD `tm_color_topo` VARCHAR( 11 ) NOT NULL DEFAULT 'IMG_DEFAULT',
ADD `tm_color_barra` VARCHAR( 11 ) NOT NULL DEFAULT 'IMG_DEFAULT';
ALTER TABLE `temas` ADD `tm_color_menu` VARCHAR( 11 ) NOT NULL DEFAULT 'IMG_DEFAULT';
ALTER TABLE `temas` ADD `tm_color_barra_font` VARCHAR( 7 ) NOT NULL DEFAULT '#675E66',
ADD `tm_color_barra_hover` VARCHAR( 7 ) NOT NULL DEFAULT '#FFFFFF';
ALTER TABLE `temas` ADD `tm_barra_fundo_destaque` VARCHAR( 7 ) NOT NULL DEFAULT '#666666',
ADD `tm_barra_fonte_destaque` VARCHAR( 7 ) NOT NULL DEFAULT '#FFFFFF';
ALTER TABLE `temas` CHANGE `tm_id` `tm_id` INT( 2 ) NOT NULL AUTO_INCREMENT ,
CHANGE `tm_nome` `tm_nome` VARCHAR( 15 ) NOT NULL DEFAULT 'DEFAULT',
CHANGE `tm_destaca` `tm_color_destaca` VARCHAR( 10 ) NOT NULL DEFAULT '#CCCCCC',
CHANGE `tm_marca` `tm_color_marca` VARCHAR( 10 ) NOT NULL DEFAULT '#FFFFCC',
CHANGE `tm_lin_par` `tm_color_lin_par` VARCHAR( 10 ) NOT NULL DEFAULT '#E3E1E1',
CHANGE `tm_lin_impar` `tm_color_lin_impar` VARCHAR( 10 ) NOT NULL DEFAULT '#F6F6F6',
CHANGE `tm_color_body` `tm_color_body` VARCHAR( 10 ) NOT NULL DEFAULT '#F6F6F6',
CHANGE `tm_color_td` `tm_color_td` VARCHAR( 10 ) NOT NULL DEFAULT '#DBDBDB',
CHANGE `tm_borda_width` `tm_borda_width` INT( 2 ) NOT NULL DEFAULT '2',
CHANGE `tm_borda_color` `tm_borda_color` VARCHAR( 10 ) NOT NULL DEFAULT '#F6F6F6',
CHANGE `tm_tr_header` `tm_tr_header` VARCHAR( 15 ) NOT NULL DEFAULT 'IMG_DEFAULT_2',
CHANGE `tm_color_topo` `tm_color_topo` VARCHAR( 11 ) NOT NULL DEFAULT 'IMG_DEFAULT',
CHANGE `tm_color_barra` `tm_color_barra` VARCHAR( 11 ) NOT NULL DEFAULT 'IMG_DEFAULT',
CHANGE `tm_color_menu` `tm_color_menu` VARCHAR( 11 ) NOT NULL DEFAULT 'IMG_DEFAULT',
CHANGE `tm_color_barra_font` `tm_color_barra_font` VARCHAR( 7 ) NOT NULL DEFAULT '#675E66',
CHANGE `tm_color_barra_hover` `tm_color_barra_hover` VARCHAR( 7 ) NOT NULL DEFAULT '#FFFFFF',
CHANGE `tm_barra_fundo_destaque` `tm_barra_fundo_destaque` VARCHAR( 7 ) NOT NULL DEFAULT '#666666',
CHANGE `tm_barra_fonte_destaque` `tm_barra_fonte_destaque` VARCHAR( 7 ) NOT NULL DEFAULT '#FFFFFF';
CREATE TABLE `styles` (
`tm_id` INT( 2 ) NOT NULL AUTO_INCREMENT PRIMARY KEY
) TYPE = MYISAM ;
ALTER TABLE `styles` ADD `tm_color_destaca` VARCHAR( 15 ) NOT NULL DEFAULT '#CCCCCC';
ALTER TABLE `styles` ADD `tm_color_marca` VARCHAR( 15 ) NOT NULL DEFAULT '#FFFFCC';
ALTER TABLE `styles` ADD `tm_color_lin_par` VARCHAR( 15 ) NOT NULL DEFAULT '#E3E1E1';
ALTER TABLE `styles` ADD `tm_color_lin_impar` VARCHAR( 15 ) NOT NULL DEFAULT '#F6F6F6';
ALTER TABLE `styles` ADD `tm_color_body` VARCHAR( 15 ) NOT NULL DEFAULT '#F6F6F6',
ADD `tm_color_td` VARCHAR( 15 ) NOT NULL DEFAULT '#DBDBDB';
ALTER TABLE `styles` ADD `tm_borda_width` INT( 2 ) NOT NULL DEFAULT '2';
ALTER TABLE `styles` ADD `tm_borda_color` VARCHAR( 10 ) NOT NULL DEFAULT '#F6F6F6',
ADD `tm_tr_header` VARCHAR( 11 ) NOT NULL DEFAULT 'IMG_DEFAULT';
ALTER TABLE `styles` ADD `tm_color_topo` VARCHAR( 11 ) NOT NULL DEFAULT 'IMG_DEFAULT',
ADD `tm_color_barra` VARCHAR( 11 ) NOT NULL DEFAULT 'IMG_DEFAULT';
ALTER TABLE `styles` ADD `tm_color_menu` VARCHAR( 11 ) NOT NULL DEFAULT 'IMG_DEFAULT';
ALTER TABLE `styles` ADD `tm_color_barra_font` VARCHAR( 7 ) NOT NULL DEFAULT '#675E66',
ADD `tm_color_barra_hover` VARCHAR( 7 ) NOT NULL DEFAULT '#FFFFFF';
ALTER TABLE `styles` ADD `tm_barra_fundo_destaque` VARCHAR( 7 ) NOT NULL DEFAULT '#666666',
ADD `tm_barra_fonte_destaque` VARCHAR( 7 ) NOT NULL DEFAULT '#FFFFFF';
CREATE TABLE `uthemes` (
`uth_id` INT( 4 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`uth_uid` INT( 4 ) NOT NULL ,
`uth_thid` INT( 2 ) NOT NULL ,
INDEX ( `uth_uid` , `uth_thid` )
) TYPE = MYISAM COMMENT = 'Tabela de Temas por usuario';
ALTER TABLE `config` ADD `conf_allow_change_theme` INT( 1 ) NOT NULL DEFAULT '0';
ALTER TABLE `styles` ADD `tm_color_font_tr_header` VARCHAR( 7 ) NOT NULL DEFAULT '#000000';
ALTER TABLE `temas` ADD `tm_color_font_tr_header` VARCHAR( 7 ) NOT NULL DEFAULT '#000000';
ALTER TABLE `styles` ADD `tm_color_borda_header_centro` VARCHAR( 7 ) NOT NULL DEFAULT '#999999';
ALTER TABLE `temas` ADD `tm_color_borda_header_centro` VARCHAR( 7 ) NOT NULL DEFAULT '#999999';
ALTER TABLE `ocorrencias` CHANGE `telefone` `telefone` VARCHAR( 40 ) NULL DEFAULT NULL;
ALTER TABLE `temas` ADD `tm_color_topo_font` VARCHAR( 7 ) NOT NULL DEFAULT '#FFFFFF' AFTER `tm_color_topo` ;
ALTER TABLE `styles` ADD `tm_color_topo_font` VARCHAR( 7 ) NOT NULL DEFAULT '#FFFFFF' AFTER `tm_color_topo` ;
ALTER TABLE `config` ADD `conf_upld_file_types` VARCHAR( 30 ) NOT NULL DEFAULT '%%IMG%';
ALTER TABLE `imagens` ADD `img_size` BIGINT( 15 ) NOT NULL ;
ALTER TABLE `imagens` CHANGE `img_nome` `img_nome` VARCHAR( 40 ) NOT NULL;
ALTER TABLE `emprestimos` CHANGE `ramal` `ramal` VARCHAR( 20 ) NULL DEFAULT NULL;
ALTER TABLE `feriados` ADD `fixo_feriado` INT( 1 ) NOT NULL DEFAULT '0';
CREATE TABLE `contatos` (
`contact_id` INT( 5 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`contact_login` VARCHAR( 15 ) NOT NULL ,
`contact_name` VARCHAR( 40 ) NOT NULL ,
`contact_email` VARCHAR( 40 ) NOT NULL ,
UNIQUE (
`contact_login` ,
`contact_email`
)
) TYPE = MYISAM COMMENT = 'Tabela de Contatos';
CREATE TABLE `lock_oco` (
`lck_id` INT( 4 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`lck_uid` INT( 4 ) NOT NULL ,
`lck_oco` INT( 5 ) NOT NULL ,
INDEX ( `lck_uid` ) ,
UNIQUE (
`lck_oco`
)
) TYPE = MYISAM COMMENT = 'Tabela de Lock para chamados em ediรงรฃo';
ALTER TABLE `materiais` CHANGE `mat_caixa` `mat_caixa` VARCHAR( 30 ) NULL DEFAULT '';
ALTER TABLE `situacao` DROP INDEX `situac_cod`;
ALTER TABLE `situacao` ADD `situac_destaque` INT( 1 ) NOT NULL DEFAULT '0';
ALTER TABLE `config` ADD `conf_date_format` VARCHAR( 20 ) NOT NULL DEFAULT '%d/%m/%Y %H:%M:%S';
INSERT INTO `temas` VALUES (1, 'CLASSICO', '#D5D5D5', '#FFCC99', '#EAE6D0', '#F8F8F1', '#F6F6F6', '#ECECDB', 0, '#F6F6F6', '#DDDCC5', '#5e515b', '#FFFFFF', '#999999', 'IMG_DEFAULT', '#FFFFFF', '#FFFFFF', '#666666', '#FFFFFF', '#000000', '#DDDCC5');
INSERT INTO `temas` VALUES (2, 'LGAMITO', '#99CCFF', '#CCFFFF', '#E3E1E1', '#F6F6F6', '#FFFFFF', '#92AECC', 2, '#FFFFFF', 'IMG_DEFAULT', 'IMG_DEFAULT', '#FFFFFF', '#6177a2', 'IMG_DEFAULT', '#FFFFFF', '#FFFFFF', '#666666', '#FFFFFF', '#000000', '#92AECC');
ALTER TABLE `config` CHANGE `conf_ocomon_site` `conf_ocomon_site` VARCHAR( 100 ) NOT NULL DEFAULT 'http://localhost/ocomon/';
ALTER TABLE `estoque` ADD `estoq_tag_inv` INT( 6 ) NULL ,
ADD `estoq_tag_inst` INT( 6 ) NULL ,
ADD `estoq_nf` INT( 15 ) NULL ,
ADD `estoq_warranty` INT( 3 ) NULL ,
ADD `estoq_value` FLOAT( 15 ) NULL ,
ADD `estoq_situac` INT( 2 ) NULL ,
ADD `estoq_data_compra` DATETIME NULL ,
ADD `estoq_ccusto` INT( 6 ) NULL ,
ADD `estoq_vendor` INT( 6 ) NULL ;
ALTER TABLE `estoque` ADD INDEX ( `estoq_tag_inv` , `estoq_tag_inst` ) ;
ALTER TABLE `estoque` ADD `estoq_partnumber` VARCHAR( 15 ) NULL ;
ALTER TABLE `estoque` ADD INDEX ( `estoq_partnumber` ) ;
CREATE TABLE `equipXpieces` (
`eqp_id` INT( 4 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`eqp_equip_inv` INT( 6 ) NOT NULL ,
`eqp_equip_inst` INT( 4 ) NOT NULL ,
`eqp_piece_id` INT( 6 ) NOT NULL ,
`eqp_piece_modelo_id` INT( 6 ) NOT NULL ,
INDEX ( `eqp_equip_inv` , `eqp_equip_inst` , `eqp_piece_id` )
) TYPE = MYISAM COMMENT = 'Tabela de associacao de equipamentos com componentes';
CREATE TABLE `hist_pieces` (
`hp_id` INT( 6 ) NOT NULL AUTO_INCREMENT ,
`hp_piece_id` INT( 6 ) NOT NULL ,
`hp_piece_local` INT( 4 ) NULL ,
`hp_comp_inv` INT( 6 ) NULL ,
`hp_comp_inst` INT( 4 ) NULL ,
`hp_uid` INT( 6 ) NOT NULL ,
`hp_date` DATETIME NOT NULL ,
PRIMARY KEY ( `hp_id` ) ,
INDEX ( `hp_piece_id` , `hp_piece_local` , `hp_comp_inv` , `hp_comp_inst` )
) ENGINE = MYISAM CHARACTER SET latin1 COLLATE latin1_swedish_ci COMMENT = 'Tabela de histรณrico de movimentacรตes de peรงas avulsas';
CREATE TABLE `email_warranty` (
`ew_id` INT( 6 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`ew_piece_type` INT( 1 ) NOT NULL DEFAULT '0',
`ew_piece_id` INT( 6 ) NOT NULL ,
`ew_sent_first_alert` BOOL NOT NULL DEFAULT '0',
`ew_sent_last_alert` BOOL NOT NULL DEFAULT '0',
INDEX ( `ew_piece_id` )
) TYPE = MYISAM COMMENT = 'Tabela de controle para envio de email sobre prazo de garantias';
ALTER TABLE `config` ADD `conf_days_bf` INT( 3 ) NOT NULL DEFAULT '30',
ADD `conf_wrty_area` INT( 4 ) NOT NULL DEFAULT '1';
INSERT INTO `msgconfig` (`msg_cod`, `msg_event`, `msg_fromname`, `msg_replyto`, `msg_subject`, `msg_body`, `msg_altbody`)
VALUES (NULL , 'mail-about-warranty', 'SISTEMA OCOMON', 'ocomon@yourdomain.com', 'OCOMON - VENCIMENTO DE GARANTIA', 'Atenção: <br />Existem equipamentos com o prazo de garantia prestes a expirar.<br /><br />Tipo de equipamento: %tipo%<br />Número de série: %serial%<br />Partnumber: %partnumber%<br />Modelo: %modelo%<br />Departamento: %local%<br />Fornecedor: %fornecedor%<br />Nota fiscal: %notafiscal%<br />Vencimento: %vencimento%', 'Atenรงรฃo:\r\nExistem equipamentos com o prazo de garantia prestes a expirar.\r\n\r\nTipo de equipamento: %tipo%\r\nNรบmero de sรฉrie: %serial%\r\nPartnumber: %partnumber%\r\nModelo: %modelo%\r\nDepartamento: %local%\r\nFornecedor: %fornecedor%\r\nNota fiscal: %notafiscal%\r\nVencimento: %vencimento%');
ALTER TABLE `estoque` CHANGE `estoq_data_compra` `estoq_data_compra` DATETIME NULL DEFAULT '0000-00-00 00:00:00';
ALTER TABLE `config` ADD `conf_allow_reopen` TINYINT( 1 ) NOT NULL DEFAULT '1';
ALTER TABLE `config` ADD `conf_allow_date_edit` TINYINT( 1 ) NOT NULL DEFAULT '0';
ALTER TABLE `ocorrencias` DROP `operadorbkp` , DROP `abertoporbkp` ;
ALTER TABLE `ocorrencias` ADD `oco_scheduled` TINYINT( 1 ) NOT NULL DEFAULT '0',
ADD `oco_real_open_date` DATETIME NULL ;
ALTER TABLE `ocorrencias` ADD INDEX ( `oco_scheduled` ) ;
ALTER TABLE `configusercall` ADD `conf_scr_schedule` TINYINT( 1 ) NOT NULL DEFAULT '0';
ALTER TABLE `config` ADD `conf_schedule_status` INT( 4 ) NOT NULL DEFAULT '1';
ALTER TABLE `config` ADD `conf_schedule_status_2` INT( 4 ) NOT NULL DEFAULT '1';
ALTER TABLE `config` ADD `conf_foward_when_open` INT( 4 ) NOT NULL DEFAULT '1';
ALTER TABLE `configusercall` ADD `conf_scr_foward` TINYINT( 1 ) NOT NULL DEFAULT '0';
ALTER TABLE `hist_pieces` ADD `hp_technician` INT( 4 ) NULL ;
ALTER TABLE `hist_pieces` ADD INDEX ( `hp_technician` ) ;
INSERT INTO `msgconfig` (`msg_cod`, `msg_event`, `msg_fromname`, `msg_replyto`, `msg_subject`, `msg_body`, `msg_altbody`) VALUES (NULL, 'abertura-para-operador', 'SISTEMA OCOMON', 'ocomon@yourdomain.com', 'CHAMADO ABERTO PARA VOCร', '<span style="font-weight: bold;">SISTEMA OCOMON %versao%</span><br />Caro %operador%,<br />O chamado <span style="font-weight: bold;">%numero%</span> foi aberto e direcionado a você.<br /><span style="font-weight: bold;">Descrição: </span>%descricao%<br /><span style="font-weight: bold;">Contato: </span>%contato%<br /><span style="font-weight: bold;">Ramal:</span> %ramal%<br />Ocorrência aberta pelo operador: %aberto_por%<br />%site%', 'SISTEMA OCOMON %versao%\r\nCaro %operador%,\r\nO chamado %numero% foi aberto e direcionado a vocรช.\r\nDescriรงรฃo: %descricao%\r\nContato: %contato%\r\nRamal: %ramal%\r\nOcorrรชncia aberta pelo operador: %aberto_por%\r\n%site%');
CREATE TABLE `script_solution` (
`script_cod` INT( 4 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`script_desc` TEXT NOT NULL
) TYPE = MYISAM COMMENT = 'Tabela de scripts de solucoes';
ALTER TABLE `ocorrencias` ADD `oco_script_sol` INT( 4 ) NULL ;
ALTER TABLE `ocorrencias` ADD INDEX ( `oco_script_sol` ) ;
CREATE TABLE `mail_templates` (
`tpl_cod` INT( 4 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`tpl_sigla` VARCHAR( 10 ) NOT NULL ,
`tpl_desc` TEXT NOT NULL ,
`tpl_msg_html` TEXT NOT NULL ,
`tpl_msg_text` TEXT NOT NULL
) TYPE = MYISAM COMMENT = 'Tabela de templates de e-mails';
ALTER TABLE `mail_templates` CHANGE `tpl_desc` `tpl_subject` VARCHAR( 100 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL;
CREATE TABLE `mail_list` (
`ml_cod` INT( 4 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`ml_sigla` VARCHAR( 15 ) NOT NULL ,
`ml_desc` TEXT NOT NULL ,
`ml_address` TEXT NOT NULL
) TYPE = MYISAM COMMENT = 'Tabela de listas de distribuicao';
ALTER TABLE `mail_list` CHANGE `ml_address` `ml_addr_to` TEXT CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL;
ALTER TABLE `mail_list` ADD `ml_addr_cc` TEXT NULL ;
CREATE TABLE `mail_hist` (
`mhist_cod` INT( 6 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`mhist_listname` VARCHAR( 150 ) NOT NULL ,
`mhist_address` TEXT NOT NULL ,
`mhist_body` TEXT NOT NULL ,
`mhist_date` DATETIME NOT NULL ,
`mhist_technician` INT( 4 ) NOT NULL ,
INDEX ( `mhist_technician` )
) TYPE = MYISAM COMMENT = 'Tabela de histรณrico de emails enviados';
ALTER TABLE `mail_hist` ADD `mhist_subject` VARCHAR( 40 ) NOT NULL AFTER `mhist_address` ;
ALTER TABLE `mail_hist` ADD `mhist_address_cc` TEXT NULL AFTER `mhist_address` ;
ALTER TABLE `mail_hist` ADD `mhist_oco` INT( 6 ) NOT NULL AFTER `mhist_cod` ;
ALTER TABLE `mail_hist` ADD INDEX ( `mhist_oco` ) ;
ALTER TABLE `mailconfig` ADD `mail_from_name` VARCHAR( 30 ) NOT NULL DEFAULT 'SISTEMA_OCOMON';
-- FIM DA VERSรO 2.0RC3--------
-- INรCIO VERSรO 2.0RC4.1 -----
ALTER TABLE `assentamentos` CHANGE `responsavelbkp` `asset_privated` TINYINT( 1 ) NOT NULL DEFAULT '0';
ALTER TABLE `configusercall` ADD `conf_ownarea_2` VARCHAR( 200 ) NULL AFTER `conf_ownarea` ;
update configusercall set conf_ownarea_2 = conf_ownarea;
ALTER TABLE `configusercall` ADD `conf_name` VARCHAR( 50 ) NULL DEFAULT 'Default' AFTER `conf_cod` ;
ALTER TABLE `sistemas` ADD `sis_screen` INT( 2 ) NULL ;
ALTER TABLE `sistemas` ADD INDEX ( `sis_screen` ) ;
CREATE TABLE `uprefs` (
`upref_uid` INT( 4 ) NOT NULL ,
`upref_lang` VARCHAR( 50 ) NULL ,
PRIMARY KEY ( `upref_uid` ) ,
INDEX ( `upref_lang` )
) ENGINE = MYISAM COMMENT = 'Tabela de preferencias diversas dos usuarios';
CREATE TABLE `global_tickets` (
`gt_ticket` INT( 6 ) NOT NULL ,
`gt_id` VARCHAR( 200 ) NOT NULL ,
PRIMARY KEY ( `gt_ticket` ) ,
INDEX ( `gt_id` )
) ENGINE = MYISAM COMMENT = 'tabela para permitir acesso global as ocorrencias';
ALTER TABLE `utmp_usuarios` CHANGE `utmp_login` `utmp_login` VARCHAR( 100 ) NOT NULL;
ALTER TABLE `ocorrencias` ADD `date_first_queued` DATETIME NULL ;
-- FIM DA VERSรO 2.0RC4.1 -------------------
-- INรCIO DA VERSรO 2.0RC5 -------------------
CREATE TABLE `prior_nivel` (
`prn_cod` INT( 2 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`prn_level` INT( 2 ) NOT NULL ,
`prn_used` TINYINT( 1 ) NOT NULL DEFAULT '0',
INDEX ( `prn_level` )
) ENGINE = MYISAM COMMENT = 'Niveis sequenciais para ordem de atendimento';
INSERT INTO `prior_nivel` (`prn_cod`, `prn_level`, `prn_used`) VALUES(1, 1, 0);
INSERT INTO `prior_nivel` (`prn_cod`, `prn_level`, `prn_used`) VALUES(2, 2, 0);
INSERT INTO `prior_nivel` (`prn_cod`, `prn_level`, `prn_used`) VALUES(3, 3, 0);
INSERT INTO `prior_nivel` (`prn_cod`, `prn_level`, `prn_used`) VALUES(4, 4, 0);
INSERT INTO `prior_nivel` (`prn_cod`, `prn_level`, `prn_used`) VALUES(5, 5, 0);
INSERT INTO `prior_nivel` (`prn_cod`, `prn_level`, `prn_used`) VALUES(6, 6, 0);
INSERT INTO `prior_nivel` (`prn_cod`, `prn_level`, `prn_used`) VALUES(7, 7, 0);
INSERT INTO `prior_nivel` (`prn_cod`, `prn_level`, `prn_used`) VALUES(8, 8, 0);
INSERT INTO `prior_nivel` (`prn_cod`, `prn_level`, `prn_used`) VALUES(9, 9, 0);
INSERT INTO `prior_nivel` (`prn_cod`, `prn_level`, `prn_used`) VALUES(10, 10, 0);
CREATE TABLE `prior_atend` (
`pr_cod` INT( 2 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`pr_nivel` INT( 2 ) NOT NULL ,
`pr_default` TINYINT( 1 ) NOT NULL DEFAULT '0',
`pr_desc` VARCHAR( 50 ) NOT NULL DEFAULT '#CCCCCC',
`pr_color` VARCHAR( 7 ) NOT NULL ,
UNIQUE (
`pr_nivel`
)
) ENGINE = MYISAM COMMENT = 'Tabela de prioridades para atendimento dos chamados';
ALTER TABLE `ocorrencias` ADD `oco_prior` INT( 2 ) NULL;
ALTER TABLE `ocorrencias` ADD INDEX ( `oco_prior` ) ;
ALTER TABLE `configusercall` ADD `conf_scr_prior` TINYINT( 1 ) NOT NULL DEFAULT '1';
-- FIM DA VERSรO 2.0RC5 ---------------------
-- INICIO DA VERSAO 2.0RC6 ---------------
ALTER TABLE `assentamentos` ADD `tipo_assentamento` INT( 1 ) NOT NULL DEFAULT '0' COMMENT 'Tipo do assentamento';
-- Tipo de asssentamentos:
-- 0: comentรกrio
-- 1: descriรงรฃo tรฉcnica
-- 2: soluรงรฃo
-- 3: justificativa em caso de estouro do SLA
ALTER TABLE `assentamentos` ADD INDEX ( `tipo_assentamento` ) ;
CREATE TABLE `sla_out` (
`out_numero` INT( 5 ) NOT NULL COMMENT 'ocorrencias',
`out_sla` INT( 1 ) NOT NULL DEFAULT '0' COMMENT 'se o sla estourou',
INDEX ( `out_numero` )
) ENGINE = MYISAM COMMENT = 'Tabela temporaria para controle do sla';
ALTER TABLE `config` ADD `conf_desc_sla_out` INT( 1 ) NOT NULL DEFAULT '0';
CREATE TABLE `areaXarea_abrechamado` (
`area` int(4) unsigned NOT NULL COMMENT 'รrea para a qual se quer abrir o chamado.',
`area_abrechamado` int(4) unsigned NOT NULL COMMENT 'รrea que pode abrir chamado.',
PRIMARY KEY (`area`,`area_abrechamado`),
KEY `fk_area_abrechamado` (`area_abrechamado`)
) ENGINE=MyISAM;
INSERT INTO areaXarea_abrechamado (area, area_abrechamado) VALUES (1, 1);
ALTER TABLE `problemas` ADD `prob_alimenta_banco_solucao` INT( 1 ) NOT NULL DEFAULT '1' COMMENT 'Flag para gravar a solucao ou nao';
ALTER TABLE `problemas` ADD `prob_descricao` TEXT NULL COMMENT 'Descricao do tipo de problema';
CREATE TABLE `scripts` (
`scpt_id` INT( 4 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`scpt_nome` VARCHAR( 35 ) NOT NULL ,
`scpt_desc` VARCHAR( 100 ) NOT NULL ,
`scpt_script` TEXT NOT NULL ,
`scpt_enduser` TINYINT( 1 ) NOT NULL DEFAULT '1'
) ENGINE = MYISAM COMMENT = 'Tabela de scripts para solucoes';
CREATE TABLE `prob_x_script` (
`prscpt_id` INT( 4 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`prscpt_prob_id` INT( 4 ) NOT NULL ,
`prscpt_scpt_id` INT( 4 ) NOT NULL ,
INDEX ( `prscpt_prob_id` , `prscpt_scpt_id` )
) ENGINE = MYISAM COMMENT = 'Scripts por problemas';
ALTER TABLE `config` ADD COLUMN `conf_qtd_max_anexos` INT(2) NOT NULL DEFAULT 5 AFTER `conf_desc_sla_out`;
-- FINAL DA VERSAO 2.0RC6 ---------------
-- LGAMITO
--
-- Estrutura da tabela `config_preventiva`
--
CREATE TABLE IF NOT EXISTS `config_preventiva` (
`id` int(4) NOT NULL auto_increment,
`conf_num_chamado` int(4) NOT NULL,
`conf_tempo_min` int(4) NOT NULL,
`conf_tempo_max` int(4) NOT NULL,
`conf_maq_nova` int(4) NOT NULL,
`conf_data_inic` date NOT NULL,
`conf_tipo_equip` varchar(20) default NULL,
`conf_equip_situac` varchar(20) default NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Configuraรงรฃo de Preventivas' AUTO_INCREMENT=2 ;
--
-- Extraindo dados da tabela `config_preventiva`
--
INSERT INTO `config_preventiva` (`id`, `conf_num_chamado`, `conf_tempo_min`, `conf_tempo_max`, `conf_maq_nova`, `conf_data_inic`, `conf_tipo_equip`, `conf_equip_situac`) VALUES
(1, 50, 90, 120, 120, '2012-01-01', '1,2,3', '1,3,8,10,11');
-- styles
INSERT INTO `styles` (`tm_id`, `tm_color_destaca`, `tm_color_marca`, `tm_color_lin_par`, `tm_color_lin_impar`, `tm_color_body`, `tm_color_td`, `tm_borda_width`, `tm_borda_color`, `tm_tr_header`, `tm_color_topo`, `tm_color_topo_font`, `tm_color_barra`, `tm_color_menu`, `tm_color_barra_font`, `tm_color_barra_hover`, `tm_barra_fundo_destaque`, `tm_barra_fonte_destaque`, `tm_color_font_tr_header`, `tm_color_borda_header_centro`) VALUES
(1, '#99CCFF', '#CCFFFF', '#E3E1E1', '#F6F6F6', '#FFFFFF', '#92AECC', 2, '#FFFFFF', 'IMG_DEFAULT', 'IMG_DEFAULT_2', '#FFFFFF', '#6177a2', 'IMG_DEFAULT', '#FFFFFF', '#FFFFFF', '#666666', '#FFFFFF', '#000000', '#92AECC');
INSERT INTO `configusercall` (`conf_cod`, `conf_name`, `conf_user_opencall`, `conf_custom_areas`, `conf_ownarea`, `conf_ownarea_2`, `conf_opentoarea`, `conf_scr_area`, `conf_scr_prob`, `conf_scr_desc`, `conf_scr_unit`, `conf_scr_tag`, `conf_scr_chktag`, `conf_scr_chkhist`, `conf_scr_contact`, `conf_scr_fone`, `conf_scr_local`, `conf_scr_btloadlocal`, `conf_scr_searchbylocal`, `conf_scr_operator`, `conf_scr_date`, `conf_scr_status`, `conf_scr_replicate`, `conf_scr_mail`, `conf_scr_msg`, `conf_scr_upload`, `conf_scr_schedule`, `conf_scr_foward`, `conf_scr_prior`) VALUES
(1, 'Default', 1, '', 1, NULL, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 'Seu chamado foi aberto com sucesso no sistema de ocorrรชncias! O nรบmero รฉ %numero%. Aguarde o atendimento pela equipe de suporte.', 1, 1, 1, 1),
(2, 'Completa', 1, '', 1, NULL, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 'Seu chamado foi aberto com sucesso no sistema de ocorrรชncias! O nรบmero รฉ %numero%. Aguarde o atendimento pela equipe de suporte.', 1, 1, 1, 1);
--
-- Extraindo dados da tabela `sistemas`
--
INSERT INTO `sistemas` VALUES (1, 'DEFAULT', 1, 'default@yourdomain.com', 1, 2);
INSERT INTO `sistemas` VALUES (2, 'USUรRIOS', 1, 'default@yourdomain.com', 0, 2);
/*
Script de Alteraรงรฃo de Tabela
Essa รฉ a inclusรฃo dos Campos a mais da versรฃo lrgamito
*/
ALTER TABLE `equipamentos`
ADD(
`comp_leitor` int(5) unsigned default NULL,
`comp_os` int(5) unsigned default NULL,
`comp_sn_os` varchar(50) default NULL
);
/*
Descomente as linhas de baixo se quizer um cรณdigo de etiqueta que usa ALFANUMรRICOS
*/
/*
ALTER TABLE `equipamentos`
CHANGE comp_inv comp_inv varchar(20);
*/ |
-- -----------------------------------------------------------------------------
CREATE TABLE AusOpen_men (
player1 VARCHAR(255),
player2 VARCHAR(255),
round INT,
result INT,
fnl1 DOUBLE PRECISION,
fnl2 DOUBLE PRECISION,
fsp_1 DOUBLE PRECISION,
fsw_1 DOUBLE PRECISION,
ssp_1 DOUBLE PRECISION,
ssw_1 DOUBLE PRECISION,
ace_1 INT,
dbf_1 INT,
wnr_1 INT,
ufe_1 INT,
bpc_1 INT,
bpw_1 INT,
npa_1 INT,
npw_1 INT,
tpw_1 INT,
st1_1 INT,
st2_1 INT,
st3_1 INT,
st4_1 INT,
st5_1 INT,
fsp_2 DOUBLE PRECISION,
fsw_2 DOUBLE PRECISION,
ssp_2 DOUBLE PRECISION,
ssw_2 DOUBLE PRECISION,
ace_2 INT,
dbf_2 INT,
wnr_2 INT,
ufe_2 INT,
bpc_2 INT,
bpw_2 INT,
npa_2 INT,
npw_2 INT,
tpw_2 INT,
st1_2 INT,
st2_2 INT,
st3_2 INT,
st4_2 INT,
st5_2 INT
);
CREATE TABLE AusOpen_women
(LIKE AusOpen_men);
CREATE TABLE FrenchOpen_men
(LIKE AusOpen_men);
CREATE TABLE FrenchOpen_women
(LIKE AusOpen_men);
CREATE TABLE USOpen_men
(LIKE AusOpen_men);
CREATE TABLE USOpen_women
(LIKE AusOpen_men);
CREATE TABLE Wimbledon_men
(LIKE AusOpen_men);
CREATE TABLE Wimbledon_women
(LIKE AusOpen_men);
-- -----------------------------------------------------------------------------
COPY AusOpen_men
FROM '/path/AusOpen-men-2013.csv'
WITH (FORMAT CSV, HEADER, DELIMITER ',');
COPY AusOpen_women
FROM '/path/AusOpen-women-2013.csv'
WITH (FORMAT CSV, HEADER, DELIMITER ',');
COPY FrenchOpen_men
FROM '/path/FrenchOpen-men-2013.csv'
WITH (FORMAT CSV, HEADER, DELIMITER ',');
COPY FrenchOpen_women
FROM '/path/FrenchOpen-women-2013.csv'
WITH (FORMAT CSV, HEADER, DELIMITER ',');
COPY USOpen_men
FROM '/path/USOpen-men-2013.csv'
WITH (FORMAT CSV, HEADER, DELIMITER ',');
COPY USOpen_women
FROM '/path/USOpen-women-2013.csv'
WITH (FORMAT CSV, HEADER, DELIMITER ',');
COPY Wimbledon_men
FROM '/path/Wimbledon-men-2013.csv'
WITH (FORMAT CSV, HEADER, DELIMITER ',');
COPY Wimbledon_women
FROM '/path/Wimbledon-women-2013.csv'
WITH (FORMAT CSV, HEADER, DELIMITER ',');
-- -----------------------------------------------------------------------------
|
CREATE TABLE courses (
id BIGINT(20) NOT NULL AUTO_INCREMENT,
name VARCHAR(254) NOT NULL,
token MEDIUMTEXT NOT NULL,
created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
); |
SELECT * FROM PARTICIPANTS
ORDER BY INSERT_DATETIME %s
LIMIT ? OFFSET ?;
|
drop function if exists LevelToGrade;
DELIMITER $$
CREATE FUNCTION LevelToGrade(Level varchar(2)) RETURNS integer
begin
if Level='A+' Then
return 100;
elseif Level='A ' THEN
return 95;
elseif Level='A-' THEN
return 90;
elseif Level='B+' THEN
return 85;
elseif Level='B ' THEN
return 80;
elseif Level='B-' THEN
return 75;
elseif Level='C+' THEN
return 70;
elseif Level='C ' THEN
return 65;
elseif Level='C-' THEN
return 60;
else RETURN 0;
end if;
end$$
DELIMITER ;
select distinct student.name,course.title,leveltograde(takes.grade)
from student,teaches,takes,course,advisor
where student.ID = advisor.s_ID and
teaches.ID = advisor.i_ID and
takes.ID = student.ID and
takes.course_id = teaches.course_id and
takes.course_id = course.course_id and
(takes.grade = "C " or takes.grade = "C-") and
takes.sec_id = teaches.sec_id and
takes.semester = teaches.semester and
takes.year = teaches.year; |
/*Query1*/
SELECT Text
FROM Message
WHERE Message_ID IN (SELECT Message_ID
FROM Channel_Messages
WHERE Channel_ID = 'emoji')
ORDER BY Send_Time; |
#ไปปๅก้
็ฝฎ
drop table if exists `questconfig`;
create table `questconfig` (
`questid` bigint(20) unsigned not null default 0, #id
`version` int(10) unsigned not null default 0, #็ๆฌๅท
`txt` blob, #ๅ
ๅฎนๅญ็ฌฆไธฒ
primary key (`questid`)
) engine=InnoDB default charset=utf8mb4 COLLATE utf8mb4_bin ;
#ๅ
ฌไผ็ๅฃฐๆบ
drop table if exists `guildmusic`;
create table `guildmusic` (
`guildid` bigint(20) unsigned not null default 0, # ๅ
ฌไผid
`charid` bigint(20) unsigned not null default 0, # ็ฉๅฎถguid
`demandtime` int(10) unsigned not null default 0, # ็นๆญๆถ้ด
`status` int(10) unsigned not null default 0, # ็ถๆ
`mapid` int(10) unsigned not null default 0, # mapid
`npcid` int(10) unsigned not null default 0, # npcid
`musicid` int(10) unsigned not null default 0, # ้ณไนid
`starttime` int(10) unsigned not null default 0, # ๆญๆพๆถ้ด
`endtime` int(10) unsigned not null default 0, # ็ปๆๆถ้ด
`name` varchar(64) character set utf8mb4 COLLATE utf8mb4_bin not null, # ่ง่ฒๅ
primary key (`guildid`,`charid`,`demandtime`),
key `guildid_status_index` (`guildid`,`status`)
) engine=InnoDB default charset=utf8mb4 COLLATE utf8mb4_bin ;
CREATE TABLE `quest_patch_2` (
`accid` bigint(20) unsigned NOT NULL DEFAULT '0',
`quest_39300` int(10) unsigned NOT NULL DEFAULT '0',
`quest_39301` int(10) unsigned NOT NULL DEFAULT '0',
`quest_39309` int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`accid`),
KEY `id_index` (`accid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
Rem Copyright (c) 1990 by Oracle Corporation
Rem NAME
Rem <name>
Rem FUNCTION
Rem NOTES
Rem MODIFIED
Rem ksudarsh 03/11/93 - comment out vms specific host command
Rem ksudarsh 12/29/92 - Creation
Rem cheigham 08/28/91 - Creation
Rem Heigham 11/21/90 - create UNIQUE index
Rem
rem
rem $Header: ulcase4.sql,v 1.2 1993/03/11 10:49:09 KSUDARSH Exp $
rem
set termout off
rem host write sys$output "Adding unique index on emp(empno). Please wait..."
set feedback off
create unique index empix on emp(empno);
exit
|
USE employees;
Select * FROM employees WHERE gender='M'AND (first_name ='Irena'OR first_name='Vidya'OR first_name='Maya');
Select * FROM employees where last_name like 'e%';
# Find all employees hired in the 90s โ 135,214 rows.
Select * FROM employees WHERE hire_date like '199%';
# Find all employees born on Christmas โ 842 rows.
Select * FROM employees WHERE birth_date LIKE '%12-25';
# Find all employees with a 'q' in their last name โ 1,873 rows.
Select * FROM employees WHERE last_name LIKE '%q%';
Select * FROM employees WHERE last_name LIKE 'e%e';
Select * FROM employees WHERE hire_date BETWEEN '1990-01-01'AND '1999-12-31' AND(birth_date like '%12-25');
Select * FROM employees WHERE last_name not like '%qu%' AND last_name like '%q%';
|
use LPI
ALTER TABLE CAMPAIGN add BUDGET DECIMAL(11,2) not null default 0;
|
SELECT * FROM movies$
ORDER BY score,name;
-- DATA Cleaning and Preparation
--SPLIT RELEASED INTO RELEASED DATE AND PLACE and drop released column
SELECT *,SUBSTRING(released,1,CHARINDEX('(',released)-1) released_date ,
SUBSTRING(released,CHARINDEX('(',released),len(released)) released_country
FROM movies$;
ALTER TABLE movies$
ADD released_date NVARCHAR(550);
UPDATE movies$
set released_date=
SUBSTRING(released,1,CHARINDEX('(',released)-1)
FROM movies$
ALTER TABLE movies$
ADD released_country NVARCHAR(550);
UPDATE movies$
set released_country=
SUBSTRING(released,CHARINDEX('(',released),len(released)-2)
FROM movies$;
UPDATE movies$
set released_country=
SUBSTRING(released_country,2,len(released_country)-2)
FROM movies$;
ALTER TABLE movies$
DROP COLUMN released;
--CHECK wether the released_country values and country values are different
SELECT year,released,country,released_country FROM movies$
where released_country<>country;
UPDATE movies$
SET released_country=country
FROM movies$
WHERE released_country<>country;
--SELECT ROWS WITH UNMATCHED RELEASED_DATE AND YEAR and update the column
SELECT name,year,released_date FROM movies$
WHERE CONVERT(FLOAT,YEAR(released_date))<>year;
SELECT name,year,released_date,year-CONVERT(FLOAT,YEAR(released_date)),DATEADD(YEAR,year-CONVERT(FLOAT,YEAR(released_date)),released_date)
FROM movies$
WHERE CONVERT(FLOAT,YEAR(released_date))<>year;
UPDATE movies$
SET released_date=
DATEADD(YEAR,year-CONVERT(FLOAT,YEAR(released_date)),released_date)
FROM movies$
WHERE CONVERT(FLOAT,YEAR(released_date))<>year;
--DROP UNNESSARY COLUMNS
ALTER TABLE movies$
DROp COLUMN year;
ALTER TABLE movies$
DROp COLUMN country;
--CHECK any duplicates
WITH duplicate_CTE AS
(select *,ROW_NUMBER() OVER(
Partition by name,
rating,
genre,
score,
director,
star,
company
ORDER BY name
) times FROM movies$
) SELECT * FROM duplicate_CTE WHERE times>1;
-----------no duplicates
--HANDLING MISSING VALUES in budget AND gross COLUMN
---ACCORDING TO GENRE
SELECT genre,AVG(budget),AVG(gross) from movies$
GROUP BY genre
ORDER BY 1;
-----THIS THREE GENRES HAVE BUDGE AS NULL SO THEY BETTER SHOULD BE DELETED
SELECT * FROM movies$
WHERE genre in ('Music','Musical','Sport');
DELETE FROM movies$
WHERE genre in ('Music','Musical','Sport');
--ACCORDING TO IMBs SCORE
SELECT score,AVG(budget),AVG(gross) from movies$
GROUP BY score
ORDER BY 1;
--CREATE CET to replace the null values
With cte As
(
SELECT name,m.score,budget,isnull(budget,avg(budget) OVER(PARTITION BY score)) replaced_budget
,gross, isnull(gross,avg(gross) OVER(PARTITION BY score)) replaced_gross
FROM movies$ m
)
UPDATE cte SET budget=replaced_budget;
With cte As
(
SELECT name,m.score,budget,isnull(budget,avg(budget) OVER(PARTITION BY score)) replaced_budget
,gross, isnull(gross,avg(gross) OVER(PARTITION BY score)) replaced_gross
FROM movies$ m
)
UPDATE cte SET gross=replaced_gross;
----CHECKING FOR NULL---
SELECT * FROM movies$
WHERE budget is null or gross is null;
|
๏ปฟ/*Config
Retorno
-UsuarioGrupoEntidade
Parametros
-USR_CODIGO:int
*/
SELECT * FROM FR_USUARIO_GRUPO
WHERE USR_CODIGO = @USR_CODIGO
|
/* Formatted on 27/12/2013 10:06:18 a.m. (QP5 v5.163.1008.3004) */
DECLARE
CURSOR CUR
IS
SELECT DISTINCT UN.*,
RC.FE_EFECTIVA,
RC.SUMAASEGURADA,
RC.RECIBO
FROM AF_RIESGOS_CUBIERTOS RC,
(SELECT CODPOL,
NUMPOL,
P.IDEPOL,
STSPOL,
FECINIVIG,
FECFINVIG,
CODOFIEMI,
NUMCERT,
CODRAMOCERT,
SUMAASEGMONEDA
FROM POLIZA P, COBERT_CERT CC
WHERE P.IDEPOL = CC.IDEPOL
AND CC.CODRAMOCERT IN ('0104', '0115')) UN
WHERE RC.CD_SUCURSAL = UN.CODOFIEMI
AND RC.NU_POLIZA = UN.NUMPOL
AND RC.NU_CERTIFICADO = UN.NUMCERT
AND RC.CD_RAMO = UN.CODRAMOCERT
AND RC.COD_PRODUCTO = UN.CODPOL
AND RC.FE_EFECTIVA = UN.FECINIVIG
AND UN.SUMAASEGMONEDA <> RC.SUMAASEGURADA
AND UN.SUMAASEGMONEDA = 1000
--AND RC.SUMAASEGURADA < UN.SUMAASEGMONEDA
--AND RC.COD_PRODUCTO = 'AUTC'
AND UN.STSPOL NOT IN ('ANU')
/*ORDER BY 2*/;
BEGIN
FOR I IN CUR
LOOP
NULL;
UPDATE AF_RIESGOS_CUBIERTOS
SET SUMAASEGURADA = I.SUMAASEGMONEDA
WHERE COD_PRODUCTO = I.CODPOL
AND NU_POLIZA = I.NUMPOL
AND CD_SUCURSAL = I.CODOFIEMI
AND NU_CERTIFICADO = I.NUMCERT
AND CD_RAMO = I.CODRAMOCERT
AND FE_EFECTIVA = I.FE_EFECTIVA;
END LOOP;
END;
/**/
SELECT *
FROM RECIBO R, COBERT_CERT CC
WHERE R.IDEPOL = CC.IDEPOL
AND R.CODRAMOCERT = CC.CODRAMOCERT
AND R.IDEPOL IN (11772)
AND CC.CODRAMOCERT IN ('0104', '0115'); |
DROP TABLE IF EXISTS users;
DROP TABLE IF EXISTS friend_requests;
CREATE TABLE users(
id SERIAL PRIMARY KEY,
first VARCHAR(200) NOT NULL,
last VARCHAR(200) NOT NULL,
email VARCHAR(200) UNIQUE NOT NULL,
password TEXT NOT NULL,
profile_pic VARCHAR(300),
bio TEXT,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE friend_requests(
id SERIAL PRIMARY KEY,
sender_id INTEGER NOT NULL,
recipient_id INTEGER NOT NULL,
status INTEGER NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP
);
|
--Checklist 51
Declare
Pesado equipamento.peso%type := 10;
Begin
if(Pesado > 5) then
Update equipamento
Set peso = Pesado;
dbms_output.put_line('Todos os equipamento sao do mesmo peso e sรฃo pesados');
elsif (Pesado < 5) then
dbms_output.put_line('Equipamentos leves');
else
dbms_output.put_line('Equipamentos de peso mediano');
end if;
end;
/ |
-- ENV "ๅธฆ็ฉบๆ ผ็ ๆถ้ด" '2018-00-00 00:00:00'
-- ENV DATE_FROM '2018-11-23 12:34:56'
-- ENV ``SELECT YEAR(NOW())`` '2018-00-01 00:00:00'
-- STR USER built_env_user # ็ดๆฅๅฎไน
-- STR HOST built_env_host # ็ดๆฅๅฎไน
-- STR DATE built_env_date # ็ดๆฅๅฎไน
-- STR '2018-00-01 00:00:00' $y4_table #้ๆฐๅฎไน๏ผไปฅไฝฟSQL่ฏญๆณๆญฃ็กฎใ้ๅ ๅผๅท่งๅ
DROP TABLE IF EXISTS `tx_parcel_$y4_table`;
CREATE TABLE `tx_parcel_$y4_table` LIKE tx_parcel;
-- ๆฟๆขๅ
-- CREATE TABLE tx_parcel_2018 LIKE tx_parcel;
-- STR VAL[1] 990001 #็ดๆฅๅฎไนใ
-- STR "`COL[]` = VAL[]" "logno = -99009" #็ดๆฅๅฎไน๏ผ่ฑๅฃณ๏ผๅ ๅผๅท๏ผๆจกๅผๅฑๅผใ
-- REF VAL[,\t] 'ๅคๅผๅ ไฝๅผ'
-- STR `COL[]` $COLX
SELECT * FROM tx_parcel WHERE create_time > '2018-11-23 12:34:56' LIMIT 2;
-- OUT FOR 990001
REPLACE INTO tx_parcel ($COLX) VALUES ('ๅคๅผๅ ไฝๅผ');
-- ๆฟๆขๅ
-- REPLACE INTO tx_parcel (`id`) VALUES ('ๅคๅผๅ ไฝๅผ');
UPDATE tx_parcel SET logno = -99009 WHERE id = 990001;
-- ๆฟๆขๅ
-- UPDATE tx_parcel SET `id` = VAL[1] ,`create_time` = VAL[2] /*ๅพช็ฏๅ ไธๅป๏ผ้ๅทๅๅฒ*/ WHERE id=990001;
-- RUN END 990001 # ๅจsrcไธๆง่ก
-- OUT END 990001 # ไนๅจ dstไธๆง่ก
INSERT IGNORE INTO sys_hot_separation VALUES ('tx_parcel', 990001, NOW());
-- REF max_id 'tx_item_no.max_id'
select null as max_id;
-- RUN FOR 'tx_item_no.max_id'
replace into sys_hot_separation values ('tx_item_no', 'tx_item_no.max_id', now()); |
-- create the table id_not_null with values
CREATE TABLE IF NOT EXISTS id_not_null (id INT DEFAULT 1, name VARCHAR(256));
|
create table books(
ISBN varchar(10),
title varchar(10),
author varchar(10),
publisher varchar(10),
primary key(ISBN));
create table student
(
usn varchar(10) PRIMARY KEY,
name varchar(10),
sem int,
dept varchar(3)
);
create table borrow
(
ISBN varchar(10),
usn varchar(10),
dates date,
foreign key(ISBN) references books(ISBN) on delete cascade,
foreign key(usn) references student(usn) on delete cascade
);
Insert into books values('10','CN','ABC','XYZ');
Insert into books values('20','DBMS','DEF','XYZ');
Insert into books values('30','IPR','PQR','MNO');
Insert into student values('1','GAN',5,'ISE');
Insert into student values('2','CHE',5,'CSE');
Insert into student values('3','SHO',5,'CSE');
Insert into borrow values('10','1','2019-10-23');
Insert into borrow values('20','2','2019-11-05');
Insert into borrow values('30','3','2019-05-24');
select NAME from student where USN=(select USN from borrow where ISBN='10');
select NAME from student where USN=(select USN from borrow where ISBN=(select ISBN from books where TITLE='CN'));
select count(ISBN),USN from borrow group by USN;
//MONGO
db.createCollection("LIBRARY")
db.LIBRARY.insert({"ISBN":1122,"TITLE":'datbase',"AUTHOR":'ABC',"PUBLISHER":'selina',"SSN":2015,"date":'2017-05-29'})
db.LIBRARY.insert({"ISBN":2233,"TITLE":'datbase',"AUTHOR":'DEF',"PUBLISHER":'mcgraw',"SSN":2016,"date":'2017-06-29' })
db.LIBRARY.insert({"ISBN":3344,"TITLE":'dip',"AUTHOR":'GHI',"PUBLISHER":'gonzalez',"SSN":2017,"date":'2016-06-29' })
db.LIBRARY.insert({"ISBN":3355,"TITLE":'os',"AUTHOR":'LKB',"PUBLISHER":'pearson',"SSN":2018,"date":'2016-06-01' })
db.LIBRARY.find().pretty()
db.LIBRARY.find({"ISBN":1122},{"SSN":1,_id:0}).pretty()
db.LIBRARY.find({"TITLE":'datbase'},{"SSN":1,_id:0}).pretty()
//PLSQL
//FIBO PROG
DECLARE
a number;
b number;
c number;
n number;
i number;
BEGIN
n:=8;
a:=0;
b:=1;
dbms_output.put_line(FIBO NUMBERS:);
dbms_output.put_line(a);
dbms_output.put_line(b);
for i in 1..n-2
loop
c:=a+b;
dbms_output.put_line(c);
a:=b;
b:=c;
end loop;
END;
/
|
-- subselects are nested queries
-- in SQL, the result of a select statement is effectively a table and can always be used as you would use a table
-- creating table for example
CREATE TABLE t ( a TEXT, b TEXT);
INSERT INTO t VALUES ('NY0123', 'US4567');
-- subselect statement
SELECT
SUBSTR(a, 1, 2) AS State,
SUBSTR(a, 3) AS SCode,
SUBSTR(b, 1, 2) AS Country,
SUBSTR(b, 3) AS CCode
FROM t;
-- this simple string slicing takes 'NY0123' and 'US4567' which are 2 columns in 1 row
-- and returns a table with the columns State, SCode, Country and CCode
-- which have the values State - NY, SCode - 0123, Country - US, and CCode - 4567
-- we can actually use this statement in a join
-- to take the country codes in CCode and turn them inot the names of the countries in the country table in the world database
SELECT co.Name, ss.CCode FROM (
SELECT SUBSTR(a, 1, 2) AS State, SUBSTR(a, 3) AS SCode,
SUBSTR(b, 1, 2) AS Country, SUBSTR(b, 3) AS CCode FROM t
) AS ss
JOIN Country AS co
ON co.Code2 = ss.Country
;
--
-- example: query a list of albums that have tracks with a duration of 90 seconds or less
SELECT DISTINCT album_id FROM track WHERE duration <= 90;
-- with this query, we don't know what the album names are
-- so we can use this select statement as a subselect
SELECT * FROM album
WHERE id IN (SELECT DISTINCT album_id FROM track WHERE duration <= 90)
;
-- this query returns a table with the album id, title, artist, label and date released
-- now we can use this subselect in a joint query to get the individual track information for these albums
SELECT a.title AS album, a.artist, t.track_number AS seq, t.title, t.duration AS secs
FROM album AS a
JOIN track AS t ON t.album_id = a.id
WHERE a.id IN (SELECT DISTINCT album_id FROM track WHERE duration <= 90)
ORDER BY a.title, t.track_number;
-- this query returns a table with the album name, artist, track number, track title and duration in seconds
-- to modify the query to get songs off the 2 albums that are 90 seconds or less, we simply move the subslect to the JOIN statement
SELECT a.title AS album, a.artist, t.track_number AS seq, t.title, t.duration AS secs
FROM album AS a
JOIN (
SELECT DISTINCT album_id, track_number, duration, title
FROM track
WHERE duration <= 90
) AS t
ON t.album_id = a.id
ORDER BY a.title, t.track_number;
-- the right side of our join is now the subselect, aka the source of the data on the right side
-- other than that, the query is the same |
-- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- https://www.phpmyadmin.net/
--
-- Client : localhost:3306
-- Gรฉnรฉrรฉ le : Mar 24 Octobre 2017 ร 14:48
-- Version du serveur : 10.1.24-MariaDB-6
-- Version de PHP : 7.0.22-3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!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 */;
--
-- Base de donnรฉes : `Projet`
--
-- --------------------------------------------------------
--
-- Structure de la table `Amulette`
--
CREATE TABLE `Amulette` (
`Nom` varchar(25) NOT NULL,
`inteligence` int(25) NOT NULL,
`force` int(25) NOT NULL,
`endurance` int(25) NOT NULL,
`chance` int(25) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Contenu de la table `Amulette`
--
INSERT INTO `Amulette` (`Nom`, `inteligence`, `force`, `endurance`, `chance`) VALUES
('amulette nul', 0, 0, 0, 0);
-- --------------------------------------------------------
--
-- Structure de la table `bottes`
--
CREATE TABLE `bottes` (
`Nom` varchar(25) NOT NULL,
`inteligence` int(25) NOT NULL,
`force` int(25) NOT NULL,
`endurance` int(25) NOT NULL,
`chance` int(25) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Contenu de la table `bottes`
--
INSERT INTO `bottes` (`Nom`, `inteligence`, `force`, `endurance`, `chance`) VALUES
('bottes nul', 0, 0, 0, 0);
-- --------------------------------------------------------
--
-- Structure de la table `Classe`
--
CREATE TABLE `Classe` (
`Nom` varchar(25) NOT NULL,
`inteligence` int(64) NOT NULL,
`force` int(64) NOT NULL,
`endurance` int(64) NOT NULL,
`chance` int(64) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Contenu de la table `Classe`
--
INSERT INTO `Classe` (`Nom`, `inteligence`, `force`, `endurance`, `chance`) VALUES
('benjamin', 0, 10, 10, 3);
-- --------------------------------------------------------
--
-- Structure de la table `Coiffe`
--
CREATE TABLE `Coiffe` (
`Nom` varchar(25) NOT NULL,
`inteligence` int(25) NOT NULL,
`force` int(25) NOT NULL,
`endurance` int(25) NOT NULL,
`chance` int(25) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Contenu de la table `Coiffe`
--
INSERT INTO `Coiffe` (`Nom`, `inteligence`, `force`, `endurance`, `chance`) VALUES
('coiffe nul', 0, 0, 0, 0);
-- --------------------------------------------------------
--
-- Structure de la table `Gants`
--
CREATE TABLE `Gants` (
`Nom` varchar(25) NOT NULL,
`inteligence` int(25) NOT NULL,
`force` int(25) NOT NULL,
`endurance` int(25) NOT NULL,
`chance` int(25) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Contenu de la table `Gants`
--
INSERT INTO `Gants` (`Nom`, `inteligence`, `force`, `endurance`, `chance`) VALUES
('gants nul', 0, 0, 0, 0);
-- --------------------------------------------------------
--
-- Structure de la table `Jambiere`
--
CREATE TABLE `Jambiere` (
`Nom` varchar(25) NOT NULL,
`inteligence` int(25) NOT NULL,
`force` int(25) NOT NULL,
`endurance` int(25) NOT NULL,
`chance` int(25) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Contenu de la table `Jambiere`
--
INSERT INTO `Jambiere` (`Nom`, `inteligence`, `force`, `endurance`, `chance`) VALUES
('jambiere benjamin', 0, 5, 5, 1);
-- --------------------------------------------------------
--
-- Structure de la table `Niveau`
--
CREATE TABLE `Niveau` (
`Niveau` int(25) NOT NULL,
`inteligence` int(25) NOT NULL,
`force` int(25) NOT NULL,
`endurance` int(25) NOT NULL,
`chance` int(25) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Contenu de la table `Niveau`
--
INSERT INTO `Niveau` (`Niveau`, `inteligence`, `force`, `endurance`, `chance`) VALUES
(1, 1, 1, 1, 1),
(2, 2, 3, 3, 2);
-- --------------------------------------------------------
--
-- Structure de la table `Personnage`
--
CREATE TABLE `Personnage` (
`Nom` varchar(25) NOT NULL,
`Classe` varchar(25) NOT NULL,
`Niveau` int(25) NOT NULL,
`coiffe` varchar(25) NOT NULL,
`bottes` varchar(25) NOT NULL,
`jambiere` varchar(25) NOT NULL,
`gants` varchar(25) NOT NULL,
`torse` varchar(25) NOT NULL,
`amulette` varchar(25) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Contenu de la table `Personnage`
--
INSERT INTO `Personnage` (`Nom`, `Classe`, `Niveau`, `coiffe`, `bottes`, `jambiere`, `gants`, `torse`, `amulette`) VALUES
('benjamin', 'benjamin', 1, 'coiffe nul', 'bottes nul', 'jambiere benjamin', 'gants nul', 'torse nul', 'amulette nul');
-- --------------------------------------------------------
--
-- Structure de la table `Torses`
--
CREATE TABLE `Torses` (
`Nom` varchar(25) NOT NULL,
`inteligence` int(25) NOT NULL,
`force` int(25) NOT NULL,
`endurance` int(25) NOT NULL,
`chance` int(25) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Contenu de la table `Torses`
--
INSERT INTO `Torses` (`Nom`, `inteligence`, `force`, `endurance`, `chance`) VALUES
('Torse nul', 0, 1, 0, 0);
--
-- Index pour les tables exportรฉes
--
--
-- Index pour la table `Amulette`
--
ALTER TABLE `Amulette`
ADD PRIMARY KEY (`Nom`);
--
-- Index pour la table `bottes`
--
ALTER TABLE `bottes`
ADD PRIMARY KEY (`Nom`);
--
-- Index pour la table `Classe`
--
ALTER TABLE `Classe`
ADD PRIMARY KEY (`Nom`);
--
-- Index pour la table `Coiffe`
--
ALTER TABLE `Coiffe`
ADD PRIMARY KEY (`Nom`);
--
-- Index pour la table `Gants`
--
ALTER TABLE `Gants`
ADD PRIMARY KEY (`Nom`);
--
-- Index pour la table `Jambiere`
--
ALTER TABLE `Jambiere`
ADD PRIMARY KEY (`Nom`);
--
-- Index pour la table `Niveau`
--
ALTER TABLE `Niveau`
ADD PRIMARY KEY (`Niveau`);
--
-- Index pour la table `Torses`
--
ALTER TABLE `Torses`
ADD PRIMARY KEY (`Nom`);
/*!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 */;
|
-- SCRIPT BD_LATAMDSO_SGV
DELIMITER $$
USE `latamdso_sgv`$$
DROP PROCEDURE IF EXISTS `LOGIN_USUARIO`$$
CREATE PROCEDURE `LOGIN_USUARIO`(
IN XUSUARIO VARCHAR(100),
IN XCLAVE VARCHAR(100)
)
BEGIN
SELECT U.IdUsuario,R.IdRol,R.Descripcion AS 'Rol',U.Usuario,U.Clave,EM.IdEmpresa,EM.Descripcion AS 'Empresa' FROM usuarios U
INNER JOIN roles R ON (U.IdRol=R.IdRol)
INNER JOIN empresas EM ON (U.IdEmpresa=EM.IdEmpresa)
WHERE U.Usuario = XUSUARIO AND U.Clave = XCLAVE AND U.IdEstado=1;
END $$
DELIMITER ;
DELIMITER $$
USE `latamdso_sgv`$$
DROP PROCEDURE IF EXISTS `REGISTRO_USUARIO`$$
CREATE PROCEDURE `REGISTRO_USUARIO`(
IN XIDEMPRESA INT(11),
IN XIDROL INT(11),
IN XUSUARIO VARCHAR(100),
IN XCLAVE VARCHAR (100)
)
BEGIN
INSERT INTO usuarios (IdEmpresa,IdRol,Usuario,Clave)VALUES(XIDEMPRESA,XIDROL,XUSUARIO,XCLAVE);
COMMIT;
END $$
DELIMITER ;
DELIMITER $$
USE `latamdso_sgv`$$
DROP PROCEDURE IF EXISTS `ACTUALIZA_USUARIO`$$
CREATE PROCEDURE `ACTUALIZA_USUARIO`(
IN XIDUSUARIO INT(11),
IN XIDEMPRESA INT(11),
IN XIDROL INT(11),
IN XUSUARIO VARCHAR(100),
IN XCLAVE VARCHAR (100),
IN XIDESTADO INT(11)
)
BEGIN
UPDATE usuarios SET IdEmpresa = XIDEMPRESA,IdRol = XIDROL,Usuario = XUSUARIO,Clave = XCLAVE,IdEstado = XIDESTADO
WHERE IdUsuario = XIDUSUARIO;
COMMIT;
END $$
DELIMITER ;
DELIMITER $$
USE `latamdso_sgv`$$
DROP PROCEDURE IF EXISTS `CONSULTA_USUARIO`$$
CREATE PROCEDURE `CONSULTA_USUARIO`(
)
BEGIN
SELECT U.IdUsuario,EM.Descripcion AS 'Empresa',R.Descripcion AS 'Rol',U.Usuario,U.Clave,ES.Estado
FROM usuarios U
INNER JOIN empresas EM ON (U.IdEmpresa=EM.IdEmpresa)
INNER JOIN roles R ON (U.IdRol=R.IdRol)
INNER JOIN estados ES ON (U.IdEstado=ES.IdEstado);
END $$
DELIMITER ;
DELIMITER $$
USE `latamdso_sgv`$$
DROP PROCEDURE IF EXISTS `LLENA_COMBO_ESTADO`$$
CREATE PROCEDURE `LLENA_COMBO_ESTADO`(
)
BEGIN
SELECT IdEstado,Estado
FROM estados;
END $$
DELIMITER ;
DELIMITER $$
USE `latamdso_sgv`$$
DROP PROCEDURE IF EXISTS `LLENA_COMBO_ROL`$$
CREATE PROCEDURE `LLENA_COMBO_ROL`()
BEGIN
SELECT IdRol,Descripcion FROM roles;
END $$
DELIMITER ;
DELIMITER $$
USE `latamdso_sgv`$$
DROP PROCEDURE IF EXISTS `REGISTRO_EMPRESA`$$
CREATE PROCEDURE `REGISTRO_EMPRESA`(
IN XDESCRIPCION VARCHAR(100),
IN XRUC VARCHAR(100),
IN XDIRECCION VARCHAR(100),
IN XTELEFONO VARCHAR(100),
IN XEMAIL VARCHAR(100)
)
BEGIN
INSERT INTO empresas (Descripcion,Ruc,Direccion,Telefono,Email)
VALUES(XDESCRIPCION,XRUC,XDIRECCION,XTELEFONO,XEMAIL);
COMMIT;
END$$
DELIMITER ;
DELIMITER $$
USE `latamdso_sgv`$$
DROP PROCEDURE IF EXISTS `CONSULTA_EMPRESAS`$$
CREATE PROCEDURE `CONSULTA_EMPRESAS`(
)
BEGIN
SELECT IdEmpresa,Descripcion,Ruc,Direccion,Telefono,Email FROM empresas;
END $$
DELIMITER ;
DELIMITER $$
USE `latamdso_sgv`$$
DROP PROCEDURE IF EXISTS `ACTUALIZA_EMPRESA`$$
CREATE PROCEDURE `ACTUALIZA_EMPRESA`(
IN XIDEMPRESA INT(11),
IN XDESCRIPCION VARCHAR(100),
IN XRUC VARCHAR(100),
IN XDIRECCION VARCHAR(100),
IN XTELEFONO VARCHAR(100),
IN XEMAIL VARCHAR(100)
)
BEGIN
UPDATE empresas SET Descripcion = XDESCRIPCION,Ruc = XRUC,Direccion = XDIRECCION,Telefono = XTELEFONO,Email = XEMAIL
WHERE IdEmpresa = XIDEMPRESA;
COMMIT;
END$$
DELIMITER ;
DELIMITER $$
USE `latamdso_sgv`$$
DROP PROCEDURE IF EXISTS `LLENA_COMBO_EMPRESA`$$
CREATE PROCEDURE `LLENA_COMBO_EMPRESA`(
)
BEGIN
SELECT IdEmpresa,Descripcion FROM empresas;
END $$
DELIMITER ;
-- LISTO
DELIMITER $$
USE `latamdso_sgv`$$
DROP PROCEDURE IF EXISTS `REGISTRO_TERCERO`$$
CREATE PROCEDURE `REGISTRO_TERCERO`
(
IN XIDTIPO INT(11),
IN XNOMBRES VARCHAR(100),
IN XAPELLIDOS VARCHAR(100),
IN XIDENTIFICACION VARCHAR(100),
IN XDIRECCION VARCHAR(100),
IN XTELEFONO VARCHAR(100),
IN XEMAIL VARCHAR(100)
)
BEGIN
INSERT INTO terceros (IdTipo,Nombres,Apellidos,Identificacion,Direccion,Telefono,Email)
VALUES(XIDTIPO,XNOMBRES,XAPELLIDOS,XIDENTIFICACION,XDIRECCION,XTELEFONO,XEMAIL);
COMMIT;
END $$
DELIMITER ;
-- LISTO
DELIMITER $$
USE `latamdso_sgv`$$
DROP PROCEDURE IF EXISTS `ACTUALIZA_TERCERO`$$
CREATE PROCEDURE `ACTUALIZA_TERCERO`
(
IN XIDTERCERO INT(11),
IN XIDTIPO INT(11),
IN XNOMBRES VARCHAR(100),
IN XAPELLIDOS VARCHAR(100),
IN XIDENTIFICACION VARCHAR(100),
IN XDIRECCION VARCHAR(100),
IN XTELEFONO VARCHAR(100),
IN XEMAIL VARCHAR(100)
)
BEGIN
UPDATE terceros SET IdTipo = XIDTIPO,Nombres = XNOMBRES,Apellidos = XAPELLIDOS,Identificacion = XIDENTIFICACION,
Direccion = XDIRECCION,Telefono = XTELEFONO,Email = XEMAIL
WHERE IdTercero = XIDTERCERO;
COMMIT;
END $$
DELIMITER ;
-- LISTO
DELIMITER $$
USE `latamdso_sgv`$$
DROP PROCEDURE IF EXISTS `CONSULTA_TERCERO`$$
CREATE PROCEDURE `CONSULTA_TERCERO`()
BEGIN
SELECT T.IdTercero,TT.Tercero,T.Nombres,T.Apellidos,T.Identificacion,T.Direccion,T.Telefono,T.Email
FROM terceros T
INNER JOIN tipo_tro TT ON (T.IdTipo=TT.IdTipo);
END $$
DELIMITER ;
-- listo
DELIMITER $$
USE `latamdso_sgv`$$
DROP PROCEDURE IF EXISTS `LLENA_COMBO_TERCERO`$$
CREATE PROCEDURE `LLENA_COMBO_TERCERO`(
)
BEGIN
SELECT IdTercero,CONCAT(Nombres,' ',Apellidos) AS 'Tercero' FROM terceros;
END $$
DELIMITER ;
-- listo
DELIMITER $$
USE `latamdso_sgv`$$
DROP PROCEDURE IF EXISTS `LLENA_COMBO_TIPO_TERCERO`$$
CREATE PROCEDURE `LLENA_COMBO_TIPO_TERCERO`(
)
BEGIN
SELECT IdTipo,Tercero FROM tipo_tro;
END $$
DELIMITER ;
-- LISTO-up
DELIMITER $$
USE `latamdso_sgv`$$
DROP PROCEDURE IF EXISTS `REGISTRO_CATEGORIA`$$
CREATE PROCEDURE `REGISTRO_CATEGORIA`
(
IN XIDEMPRESA INT(11),
IN XDESCRIPCION VARCHAR(100)
)
BEGIN
INSERT INTO categorias (IdEmpresa,Descripcion)
VALUES(XIDEMPRESA,XDESCRIPCION);
COMMIT;
END $$
DELIMITER ;
-- LISTO-up
DELIMITER $$
USE `latamdso_sgv`$$
DROP PROCEDURE IF EXISTS `CONSULTA_CATEGORIA_ADMINISTRADOR`$$
CREATE PROCEDURE `CONSULTA_CATEGORIA_ADMINISTRADOR`
()
BEGIN
SELECT C.IdCategoria,E.Descripcion AS 'Empresa',C.Descripcion
FROM categorias C
INNER JOIN empresas E ON (C.IdEmpresa=E.IdEmpresa);
END $$
DELIMITER ;
-- LISTO-up
DELIMITER $$
USE `latamdso_sgv`$$
DROP PROCEDURE IF EXISTS `CONSULTA_CATEGORIA_USUARIO`$$
CREATE PROCEDURE `CONSULTA_CATEGORIA_USUARIO`
(
IN XIDEMPRESA INT(11)
)
BEGIN
SELECT IdCategoria,Descripcion FROM categorias
WHERE IdEmpresa=XIDEMPRESA;
END $$
DELIMITER ;
-- LISTO-up
DELIMITER $$
USE `latamdso_sgv`$$
DROP PROCEDURE IF EXISTS `ACTUALIZA_CATEGORIA`$$
CREATE PROCEDURE `ACTUALIZA_CATEGORIA`
(
IN XIDCATEGORIA INT(11),
IN XIDEMPRESA INT(11),
IN XDESCRIPCION VARCHAR(100)
)
BEGIN
UPDATE categorias SET IdEmpresa = XIDEMPRESA,Descripcion = XDESCRIPCION
WHERE IdCategoria = XIDCATEGORIA;
COMMIT;
END $$
DELIMITER ;
-- Listo
DELIMITER $$
USE `latamdso_sgv`$$
DROP PROCEDURE IF EXISTS `REGISTRO_DIARIO`$$
CREATE PROCEDURE `REGISTRO_DIARIO`(
IN XIDUSUARIO INT(11),
IN XIDEMPRESA INT(11),
IN XIDTIPO INT(11),
IN XIDCATEGORIA INT(11),
IN XIDTERCERO INT(11),
IN XFECHA DATE,
IN XDETALLE VARCHAR(1000),
IN XINGRESO DOUBLE(12,2),
IN XEGRESO DOUBLE(12,2)
)
BEGIN
DECLARE XFECHAREG DATETIME;
SELECT NOW() INTO XFECHAREG;
INSERT INTO diarios (IdUsuario,IdEmpresa,IdTipoDiario,IdCategoria,IdTercero,Fecha,Detalle,Ingreso,Egreso,FechaReg)
VALUES(XIDUSUARIO,XIDEMPRESA,XIDTIPO,XIDCATEGORIA,XIDTERCERO,XFECHA,XDETALLE,XINGRESO,XEGRESO,XFECHAREG);
COMMIT;
END$$
DELIMITER ;
-- Listo
DELIMITER $$
USE `latamdso_sgv`$$
DROP PROCEDURE IF EXISTS `ACTUALIZA_DIARIO`$$
CREATE PROCEDURE `ACTUALIZA_DIARIO`(
IN XIDDIARIO INT(11),
IN XIDUSUARIO INT(11),
IN XIDEMPRESA INT(11),
IN XIDTIPO INT(11),
IN XIDCATEGORIA INT(11),
IN XIDTERCERO INT(11),
IN XFECHA DATE,
IN XDETALLE VARCHAR(1000),
IN XINGRESO DOUBLE(12,2),
IN XEGRESO DOUBLE(12,2)
)
BEGIN
DECLARE XFECHA_AT DATETIME;
SELECT NOW() INTO XFECHA_AT;
UPDATE diarios SET IdUsuario = XIDUSUARIO,IdEmpresa = XIDEMPRESA,IdTipoDiario = XIDTIPO,IdCategoria = XIDCATEGORIA,
IdTercero = XIDTERCERO,Fecha = XFECHA,Detalle = XDETALLE,Ingreso = XINGRESO,Egreso = XEGRESO,FechaAt = XFECHA_AT
WHERE IdDiario = XIDDIARIO;
COMMIT;
END$$
DELIMITER ;
-- Listo
DELIMITER $$
USE `latamdso_sgv`$$
DROP PROCEDURE IF EXISTS `ELIMINA_DIARIO`$$
CREATE PROCEDURE `ELIMINA_DIARIO`(
IN XIDDIARIO INT(11)
)
BEGIN
DECLARE XFECHA_AT DATETIME;
SELECT NOW() INTO XFECHA_AT;
UPDATE diarios SET IdEstado = 0,FechaAt = XFECHA_AT
WHERE IdDiario = XIDDIARIO;
COMMIT;
END$$
DELIMITER ;
-- Listo
DELIMITER $$
USE `latamdso_sgv`$$
DROP PROCEDURE IF EXISTS `CONSULTA_DIARIO_ADMINISTRADOR`$$
CREATE PROCEDURE `CONSULTA_DIARIO_ADMINISTRADOR`(
)
BEGIN
SELECT D.IdDiario,T.Descripcion AS 'Tipo',C.Descripcion AS 'Motivo',D.Fecha,D.Detalle,D.Ingreso,D.Egreso,E.Estado FROM diarios D
INNER JOIN tipo_diario T ON (D.IdTipoDiario=T.IdTipoDiario)
INNER JOIN categorias C ON (D.IdCategoria=C.IdCategoria)
INNER JOIN estados E ON (D.IdEstado=E.IdEstado)
WHERE D.IdEstado = 1;
END$$
DELIMITER ;
-- Listo
DELIMITER $$
USE `latamdso_sgv`$$
DROP PROCEDURE IF EXISTS `CONSULTA_DIARIO_USUARIO`$$
CREATE PROCEDURE `CONSULTA_DIARIO_USUARIO`(
IN XIDEMPRESA INT(11)
)
BEGIN
SELECT D.IdDiario,T.Descripcion AS 'Tipo',C.Descripcion AS 'Motivo',D.Fecha,D.Detalle,D.Ingreso,D.Egreso,E.Estado FROM diarios D
INNER JOIN tipo_diario T ON (D.IdTipoDiario=T.IdTipoDiario)
INNER JOIN categorias C ON (D.IdCategoria=C.IdCategoria)
INNER JOIN estados E ON (D.IdEstado=E.IdEstado)
WHERE D.IdEmpresa = XIDEMPRESA AND D.IdEstado = 1;
END$$
DELIMITER ;
-- Listo
DELIMITER $$
USE `latamdso_sgv`$$
DROP PROCEDURE IF EXISTS `CONSULTA_REPORTE_DIARIO`$$
CREATE PROCEDURE `CONSULTA_REPORTE_DIARIO`(
)
BEGIN
SELECT D.IdDiario,U.Usuario,EM.Descripcion AS 'Empresa',T.Descripcion AS 'Tipo',C.Descripcion AS 'Motivo',CONCAT(TC.Nombres,' ',TC.Apellidos)AS 'Tercero',D.Fecha,D.Detalle,D.Ingreso,D.Egreso,D.FechaReg
FROM diarios D
INNER JOIN usuarios U ON (D.IdUsuario=U.IdUsuario)
INNER JOIN empresas EM ON (D.IdEmpresa=EM.IdEmpresa)
INNER JOIN tipo_diario T ON (D.IdTipoDiario=T.IdTipoDiario)
INNER JOIN categorias C ON (D.IdCategoria=C.IdCategoria)
INNER JOIN terceros TC ON (D.IdTercero=TC.IdTercero)
INNER JOIN estados E ON (D.IdEstado=E.IdEstado)
WHERE D.IdEstado=1 ORDER BY D.IdDiario ASC;
END$$
DELIMITER ;
-- Listo
DELIMITER $$
USE `latamdso_sgv`$$
DROP PROCEDURE IF EXISTS `REPORTE_DIARIO`$$
CREATE PROCEDURE `REPORTE_DIARIO`(
IN XIDEMPRESA INT(11),
IN XFDESDE DATE,
IN XFHASTA DATE
)
BEGIN
SELECT D.IdDiario,U.Usuario,EM.Descripcion AS 'Empresa',T.Descripcion AS 'Tipo',C.Descripcion AS 'Motivo',CONCAT(TC.Nombres,' ',TC.Apellidos)AS 'Tercero',D.Fecha,D.Detalle,D.Ingreso,D.Egreso,D.FechaReg
FROM latamdso_sgv D
INNER JOIN usuarios U ON (D.IdUsuario=U.IdUsuario)
INNER JOIN empresas EM ON (D.IdEmpresa=EM.IdEmpresa)
INNER JOIN tipo_diario T ON (D.IdTipoDiario=T.IdTipoDiario)
INNER JOIN categorias C ON (D.IdCategoria=C.IdCategoria)
INNER JOIN terceros TC ON (D.IdTercero=TC.IdTercero)
INNER JOIN estados E ON (D.IdEstado=E.IdEstado)
WHERE EM.IdEmpresa = XIDEMPRESA AND D.Fecha BETWEEN XFDESDE AND XFHASTA AND D.IdEstado=1 ORDER BY D.IdDiario ASC;
END$$
DELIMITER ;
-- listo
DELIMITER $$
USE `latamdso_sgv`$$
DROP PROCEDURE IF EXISTS `LLENA_COMBO_TIPO`$$
CREATE PROCEDURE `LLENA_COMBO_TIPO`(
)
BEGIN
SELECT IdTipoDiario,Descripcion FROM tipo_diario;
END $$
DELIMITER ;
|
--Das tabelas de extraรงรฃo (tabelรตes)
--empresas - 12GB
CREATE TABLESPACE extracao_empresas
LOGGING DATAFILE 'extracao_empresas.dbf'
SIZE 13000m AUTOEXTEND ON NEXT 1300m EXTENT MANAGEMENT LOCAL;
--cnaes_secundarios - 3482MB
CREATE TABLESPACE extracao_cnae_sec
LOGGING DATAFILE 'extracao_cnae_sec.dbf'
SIZE 4000m AUTOEXTEND ON NEXT 400m EXTENT MANAGEMENT LOCAL;
--socios - 3034MB
CREATE TABLESPACE extracao_socios
LOGGING DATAFILE 'extracao_socios.dbf'
SIZE 4000m AUTOEXTEND ON NEXT 400m EXTENT MANAGEMENT LOCAL;
--natureza_juridica - 12KB, motivos_situacao e qualificacao_socio - 8192 bytes cada
CREATE TABLESPACE extracao_tb_fixas
LOGGING DATAFILE 'extracao_tb_fixas.dbf'
SIZE 100m AUTOEXTEND ON NEXT 10m EXTENT MANAGEMENT LOCAL;
--Das tabelas normalizadas
--Empresa - 8929 MB
CREATE TABLESPACE norm_empresa
LOGGING DATAFILE 'norm_empresa.dbf'
SIZE 9000m AUTOEXTEND ON NEXT 900m EXTENT MANAGEMENT LOCAL;
--Estabelecimento - 11GB
CREATE TABLESPACE norm_estabelecimento
LOGGING DATAFILE 'norm_estabelecimento.dbf'
SIZE 12000m AUTOEXTEND ON NEXT 1200m EXTENT MANAGEMENT LOCAL;
--demais tabelas normalizadas - 31GB
CREATE TABLESPACE norm_demais_tb
LOGGING DATAFILE 'norm_demais_tb.dbf'
SIZE 32000m AUTOEXTEND ON NEXT 3200m EXTENT MANAGEMENT LOCAL;
--Empresa_old - 8929 MB
CREATE TABLESPACE norm_empresa_old
LOGGING DATAFILE 'norm_empresa_old.dbf'
SIZE 9000m AUTOEXTEND ON NEXT 900m EXTENT MANAGEMENT LOCAL;
--Estabelecimento_old - 11GB
CREATE TABLESPACE norm_estabelecimento_old
LOGGING DATAFILE 'norm_estabelecimento_old.dbf'
SIZE 12000m AUTOEXTEND ON NEXT 1200m EXTENT MANAGEMENT LOCAL;
--demais tabelas normalizadas _old - 31GB
CREATE TABLESPACE norm_demais_tb_old
LOGGING DATAFILE 'norm_demais_tb_old.dbf'
SIZE 32000m AUTOEXTEND ON NEXT 3200m EXTENT MANAGEMENT LOCAL;
--Tablespaces: ts_extracao_empresas, ts_extracao_cnae_sec, ts_extracao_socios, ts_extracao_tb_fixas, ts_norm_empresa, ts_norm_estabelecimento, ts_norm_demais_tb, ts_norm_empresa_old, ts_norm_estabelecimento_old e ts_norm_demais_tb_old |
INSERT INTO burgers (burger_name) VALUES ('Bacon Egg and Cheese Burger');
INSERT INTO burgers (burger_name) VALUES ('Baconator Burger');
INSERT INTO burgers (burger_name) VALUES ('Grilled Cheese Burger');
|
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 29 ัะตะฒ 2020 ะฒ 15:18
-- ะะตััะธั ะฝะฐ ัััะฒััะฐ: 10.1.37-MariaDB
-- PHP Version: 7.2.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!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 */;
--
-- Database: `Homework BD Design Email`
--
-- --------------------------------------------------------
--
-- ะกัััะบัััะฐ ะฝะฐ ัะฐะฑะปะธัะฐ `Email DB Design`
--
CREATE TABLE `email db design` (
`Email_id` int(11) NOT NULL,
`Email_name` varchar(150) NOT NULL,
`User` varchar(100) NOT NULL,
`Messege` varchar(100) NOT NULL,
`Spam` varchar(100) NOT NULL,
`Sended` varchar(100) NOT NULL,
`Recieved` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `Email DB Design`
--
ALTER TABLE `Email DB Design`
ADD PRIMARY KEY (`Email_id`),
ADD KEY `Email_name` (`Email_name`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `Email DB Design`
--
ALTER TABLE `Email DB Design`
MODIFY `Email_id` int(11) NOT NULL AUTO_INCREMENT;
COMMIT;
/*!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 */;
|
-- รdev 12
-- Sorgu 1: film tablosunda film uzunluฤu length sรผtununda gรถsterilmektedir. Uzunluฤu ortalama film uzunluฤundan fazla kaรง tane film vardฤฑr?
SELECT title, length
FROM film
WHERE length > (
SELECT AVG(length) FROM film
);
-- Sorgu 2: film tablosunda en yรผksek rental_rate deฤerine sahip kaรง tane film vardฤฑr?
SELECT COUNT(*)
FROM film
WHERE rental_rate = ALL(
SELECT MAX(rental_rate)
FROM film
);
-- Sorgu 3: film tablosunda en dรผลรผk rental_rate ve en dรผลรผn replacement_cost deฤerlerine sahip filmleri sฤฑralayฤฑnฤฑz.
SELECT film_id, title, rental_rate, replacement_cost
FROM film
WHERE (
rental_rate = ALL(
SELECT MIN(rental_rate)
FROM film
)
AND
replacement_cost = ALL(
SELECT MIN(replacement_cost)
FROM film
)
);
-- Sorgu 4: payment tablosunda en fazla sayฤฑda alฤฑลveriล yapan mรผลterileri(customer) sฤฑralayฤฑnฤฑz.
SELECT payment.customer_id, customer.first_name, customer.last_name, payment.amount
FROM payment
INNER JOIN customer
ON customer.customer_id = payment.customer_id
WHERE payment.amount = (
SELECT MAX(payment.amount)
FROM payment
);
|
INSERT INTO CatalogoEstatus
VALUES( 1, 'ENVIADO'),(2,'AUTORIZADO'),(3,'RECHAZADO')
|
/* NUMERO DE ODT: 6103702
* CREADO POR: John Calderon
* FECHA CREACION: 07/11/2014
* MOTIVO: alter table to add 15 fields, change size, add comments
*/
spool c:\Script_sp_atmcredito.txt
PROMPT INICIO ACTUALIZACION
--select antes
select * from b2000.sp_atmcredito WHERE rownum < 1;
--alter table--
ALTER TABLE b2000.sp_atmcredito
ADD (Mto_xV1a5a number,
Mto_xV5a10a number,
Mto_xVm10a number,
DIAS_MORA number(5),
Provision_NIIF number,
Provision_complementaria number,
APLICA_FECI VARCHAR2(2),
GENERO VARCHAR2(2),
NUM_FACILIDAD_ANTERIOR VARCHAR2(10),
FECHA_PROXIMO_PAGO_CAPITAL DATE,
PERIODICIDAD_PAGO_CAPITAL VARCHAR2(2),
FECHA_PROXIMO_PAGO_INTERES DATE,
PERIODICIDAD_PAGO_INTERES VARCHAR2(2),
PERFIL_VENCIMIENTO VARCHAR2(2),
MONTO_CUOTA_PAGAR NUMBER);
--alter size--
ALTER TABLE b2000.sp_atmcredito MODIFY TIP_GAR_1 VARCHAR2(4);
ALTER TABLE b2000.sp_atmcredito MODIFY TIP_GAR_2 VARCHAR2(4);
ALTER TABLE b2000.sp_atmcredito MODIFY TIP_GAR_3 VARCHAR2(4);
ALTER TABLE b2000.sp_atmcredito MODIFY TIP_GAR_4 VARCHAR2(4);
ALTER TABLE b2000.sp_atmcredito MODIFY TIP_GAR_5 VARCHAR2(4);
-- add comments--
comment on column b2000.sp_atmcredito.APLICA_FECI
is 'Corresponde a si la facilidad le aplica FECI ';
comment on column b2000.sp_atmcredito.GENERO
is 'GENERO ';
comment on column b2000.sp_atmcredito.NUM_FACILIDAD_ANTERIOR
is 'numero de facilidad anterior ';
comment on column b2000.sp_atmcredito.FECHA_PROXIMO_PAGO_CAPITAL
is 'fecha de proximo pago capital ';
comment on column b2000.sp_atmcredito.PERIODICIDAD_PAGO_CAPITAL
is 'Periocidad de pago de capital ';
comment on column b2000.sp_atmcredito.FECHA_PROXIMO_PAGO_INTERES
is 'fecha de proximo pago de interes ';
comment on column b2000.sp_atmcredito.PERIODICIDAD_PAGO_INTERES
is 'periocidad de pago interes ';
comment on column b2000.sp_atmcredito.PERFIL_VENCIMIENTO
is 'Perfil de vencimiento ';
comment on column b2000.sp_atmcredito.MONTO_CUOTA_PAGAR
is 'Monto de cuota a paga';
comment on column b2000.sp_atmcredito.Mto_xV1a5a
is 'Monto por vencer de 1 a 5 years';
comment on column b2000.sp_atmcredito.Mto_xV5a10a
is 'Monto por vencer de 5 a 10 years';
comment on column b2000.sp_atmcredito.Mto_xVm10a
is 'Monto por vencer mas de 10 years';
comment on column b2000.sp_atmcredito.DIAS_MORA
is 'dias de mora';
comment on column b2000.sp_atmcredito.Provision_NIIF
is 'PROVISION NIIF';
comment on column b2000.sp_atmcredito.Provision_complementaria
is 'PROVISION COMPLEMENTARIA NO NIIF';
commit;
--select despues
select * from b2000.sp_atmcredito WHERE rownum < 1;
PROMPT FIN ACTUALIZACION
spool off;
show errors;
exit; |
INSERT INTO burgers (burger_name, devoured, ts)
VALUES ('Cheeseburger', true, CURRENT_TIMESTAMP),
('Bacon Cheeseburger', true, CURRENT_TIMESTAMP),
('Veggie Burger', false, CURRENT_TIMESTAMP);
|
SELECT
m.id AS mentor_id,
u.id AS user_id,
(
((u.first_name) :: text || ' ' :: text) || (u.last_name) :: text
) AS mentor_name,
m.is_active,
m.created_at,
date_trunc('month' :: text, m.created_at) AS created_month,
m.updated_at,
CASE
WHEN (m.background_check IS TRUE) THEN 1
ELSE 0
END AS background_check,
max(s.start_date) AS last_class_date,
min(s.start_date) AS first_class_date,
sum(
CASE
WHEN (s.start_date IS NOT NULL) THEN 1
ELSE 0
END
) AS num_classes,
COALESCE(
sum(
date_part('hour' :: text, (s.end_date - s.start_date))
),
(0) :: double precision
) AS hours_volunteered,
date_part(
'days' :: text,
(
(CURRENT_DATE) :: timestamp with time zone - max(s.start_date)
)
) AS days_since_last_class,
CASE
WHEN (
date_part(
'days' :: text,
(
(CURRENT_DATE) :: timestamp with time zone - max(s.start_date)
)
) <= (365) :: double precision
) THEN 1
ELSE 0
END AS active_mentor,
CASE
WHEN (
sum(
CASE
WHEN (s.start_date IS NOT NULL) THEN 1
ELSE 0
END
) > 0
) THEN 1
ELSE 0
END AS mentored
FROM
(
(
(
coderdojochi_mentor m
LEFT JOIN coderdojochi_cdcuser u ON ((m.user_id = u.id))
)
LEFT JOIN coderdojochi_mentororder mo ON (
(
(mo.mentor_id = m.id)
AND (mo.is_active = true)
)
)
)
LEFT JOIN view_coderdojochi_session s ON (
(
(mo.session_id = s.id)
AND (s.is_active = true)
)
)
)
WHERE
(m.is_active = true)
GROUP BY
m.id,
m.user_id,
u.id,
(
((u.first_name) :: text || ' ' :: text) || (u.last_name) :: text
),
m.is_active,
m.created_at,
m.updated_at,
m.background_check
ORDER BY
m.id;
|
/*
Navicat MySQL Data Transfer
Source Server : root
Source Server Version : 50536
Source Host : localhost:3306
Source Database : fts2
Target Server Type : MYSQL
Target Server Version : 50536
File Encoding : 65001
Date: 2017-09-13 19:31:19
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for message
-- ----------------------------
DROP TABLE IF EXISTS `message`;
CREATE TABLE `message` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`messageValue` varchar(255) DEFAULT NULL,
`name` varchar(255) DEFAULT NULL,
`person` varchar(255) DEFAULT NULL,
`productName` varchar(255) DEFAULT NULL,
`inNum` varchar(255) DEFAULT NULL,
`messageDate` datetime DEFAULT NULL,
`msg_user` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `FK38EB000796655CCA` (`msg_user`),
CONSTRAINT `FK38EB000796655CCA` FOREIGN KEY (`msg_user`) REFERENCES `t_user` (`Id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for t_bid
-- ----------------------------
DROP TABLE IF EXISTS `t_bid`;
CREATE TABLE `t_bid` (
`Id` int(11) NOT NULL AUTO_INCREMENT,
`bidCompany` varchar(255) DEFAULT NULL,
`bidNum` varchar(255) DEFAULT NULL,
`owner` varchar(255) DEFAULT NULL,
`openBidDate` datetime DEFAULT NULL,
`bidResultFile` varchar(255) DEFAULT NULL,
`bidTellFile` varchar(255) DEFAULT NULL,
`bidMoney` varchar(255) DEFAULT NULL,
`info` varchar(255) DEFAULT NULL,
PRIMARY KEY (`Id`),
KEY `FK68F52B26650193E` (`Id`),
CONSTRAINT `FK68F52B26650193E` FOREIGN KEY (`Id`) REFERENCES `t_project` (`Id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for t_brand
-- ----------------------------
DROP TABLE IF EXISTS `t_brand`;
CREATE TABLE `t_brand` (
`Id` int(11) NOT NULL AUTO_INCREMENT,
`info` varchar(255) DEFAULT NULL,
`name` varchar(255) DEFAULT NULL,
`projectNum` int(11) DEFAULT NULL,
`brand_user` int(11) DEFAULT NULL,
`brand_creat_user` int(11) DEFAULT NULL,
PRIMARY KEY (`Id`),
KEY `FKA00987FC34D04C84` (`brand_user`),
KEY `FKA00987FCE560587A` (`brand_creat_user`),
CONSTRAINT `FKA00987FCE560587A` FOREIGN KEY (`brand_creat_user`) REFERENCES `t_user` (`Id`),
CONSTRAINT `FKA00987FC34D04C84` FOREIGN KEY (`brand_user`) REFERENCES `t_user` (`Id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for t_brank
-- ----------------------------
DROP TABLE IF EXISTS `t_brank`;
CREATE TABLE `t_brank` (
`Id` int(11) NOT NULL AUTO_INCREMENT,
`TTFiles` varchar(255) DEFAULT NULL,
`LCFiles` varchar(255) DEFAULT NULL,
`RCFiles` varchar(255) DEFAULT NULL,
`CMoney` varchar(255) DEFAULT NULL,
`TTMoney1` varchar(255) DEFAULT NULL,
`TTMoney2` varchar(255) DEFAULT NULL,
`TTMoney3` varchar(255) DEFAULT NULL,
`TTMoney4` varchar(255) DEFAULT NULL,
`TTMoney5` varchar(255) DEFAULT NULL,
`TTTime1` datetime DEFAULT NULL,
`TTBrank1` varchar(255) DEFAULT NULL,
`outMoney1` varchar(255) DEFAULT NULL,
`TTRloe1` varchar(255) DEFAULT NULL,
`RMBMoney1` varchar(255) DEFAULT NULL,
`TTTime2` datetime DEFAULT NULL,
`TTBrank2` varchar(255) DEFAULT NULL,
`outMoney2` varchar(255) DEFAULT NULL,
`TTRloe2` varchar(255) DEFAULT NULL,
`RMBMoney2` varchar(255) DEFAULT NULL,
`TTTime3` datetime DEFAULT NULL,
`TTBrank3` varchar(255) DEFAULT NULL,
`outMoney3` varchar(255) DEFAULT NULL,
`TTRloe3` varchar(255) DEFAULT NULL,
`RMBMoney3` varchar(255) DEFAULT NULL,
`TTTime4` datetime DEFAULT NULL,
`TTBrank4` varchar(255) DEFAULT NULL,
`outMoney4` varchar(255) DEFAULT NULL,
`TTRloe4` varchar(255) DEFAULT NULL,
`RMBMoney4` varchar(255) DEFAULT NULL,
`TTTime5` datetime DEFAULT NULL,
`TTBrank5` varchar(255) DEFAULT NULL,
`outMoney5` varchar(255) DEFAULT NULL,
`TTRloe5` varchar(255) DEFAULT NULL,
`RMBMoney5` varchar(255) DEFAULT NULL,
`AllRMBMoney` varchar(255) DEFAULT NULL,
`LCTime` datetime DEFAULT NULL,
`LCBrank` varchar(255) DEFAULT NULL,
`LCNum` varchar(255) DEFAULT NULL,
`LCMoneyStyle` varchar(255) DEFAULT NULL,
`CChangeTime` datetime DEFAULT NULL,
`outTime` datetime DEFAULT NULL,
`outRole` varchar(255) DEFAULT NULL,
`outMoney` varchar(255) DEFAULT NULL,
`outRMBMoney` varchar(255) DEFAULT NULL,
`LCinfo` varchar(255) DEFAULT NULL,
`info` varchar(255) DEFAULT NULL,
PRIMARY KEY (`Id`),
KEY `FKA00988036650193E` (`Id`),
CONSTRAINT `FKA00988036650193E` FOREIGN KEY (`Id`) REFERENCES `t_project` (`Id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for t_busines
-- ----------------------------
DROP TABLE IF EXISTS `t_busines`;
CREATE TABLE `t_busines` (
`Id` int(11) NOT NULL AUTO_INCREMENT,
`inCanNum` varchar(255) DEFAULT NULL,
`inCanFile` varchar(255) DEFAULT NULL,
`inAutoNum` varchar(255) DEFAULT NULL,
`inAutoFile` varchar(255) DEFAULT NULL,
`info` varchar(255) DEFAULT NULL,
PRIMARY KEY (`Id`),
KEY `FKC9E196486650193E` (`Id`),
CONSTRAINT `FKC9E196486650193E` FOREIGN KEY (`Id`) REFERENCES `t_project` (`Id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for t_clear
-- ----------------------------
DROP TABLE IF EXISTS `t_clear`;
CREATE TABLE `t_clear` (
`Id` int(11) NOT NULL AUTO_INCREMENT,
`clearPort` varchar(255) DEFAULT NULL,
`inGoodDate` datetime DEFAULT NULL,
`transportStyle` varchar(255) DEFAULT NULL,
`tradeTerm` varchar(255) DEFAULT NULL,
`tradingNation` varchar(255) DEFAULT NULL,
`originNation` varchar(255) DEFAULT NULL,
`wagyBillNum` varchar(255) DEFAULT NULL,
`taxesDate` datetime DEFAULT NULL,
`tariff` varchar(255) DEFAULT NULL,
`valueAdded` varchar(255) DEFAULT NULL,
`exciseTax` varchar(255) DEFAULT NULL,
`allTax` varchar(255) DEFAULT NULL,
`comPortDate` datetime DEFAULT NULL,
`tariffFile` varchar(255) DEFAULT NULL,
`valueAddedFile` varchar(255) DEFAULT NULL,
`exciseTaxFile` varchar(255) DEFAULT NULL,
`portDate` datetime DEFAULT NULL,
`inPortNum` varchar(255) DEFAULT NULL,
`portNum` varchar(255) DEFAULT NULL,
`inPortDoubleHead` varchar(255) DEFAULT NULL,
`inPortFile` varchar(255) DEFAULT NULL,
`clearMoney` varchar(255) DEFAULT NULL,
`warehouseMoney` varchar(255) DEFAULT NULL,
`info` varchar(255) DEFAULT NULL,
`reurnDate` datetime DEFAULT NULL,
PRIMARY KEY (`Id`),
KEY `FKA014F2C26650193E` (`Id`),
CONSTRAINT `FKA014F2C26650193E` FOREIGN KEY (`Id`) REFERENCES `t_project` (`Id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for t_insp
-- ----------------------------
DROP TABLE IF EXISTS `t_insp`;
CREATE TABLE `t_insp` (
`Id` int(11) NOT NULL AUTO_INCREMENT,
`inspectionNum` varchar(255) DEFAULT NULL,
`inspDate` datetime DEFAULT NULL,
`inspMech` varchar(255) DEFAULT NULL,
`inspStyle` varchar(255) DEFAULT NULL,
`inspFile` varchar(255) DEFAULT NULL,
`overInsp` varchar(255) DEFAULT NULL,
`inspCertFile` varchar(255) DEFAULT NULL,
`inspMoney` varchar(255) DEFAULT NULL,
`installPhone` varchar(255) DEFAULT NULL,
`installName` varchar(255) DEFAULT NULL,
`info` varchar(255) DEFAULT NULL,
PRIMARY KEY (`Id`),
KEY `FKCB5E472D6650193E` (`Id`),
CONSTRAINT `FKCB5E472D6650193E` FOREIGN KEY (`Id`) REFERENCES `t_project` (`Id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for t_insu
-- ----------------------------
DROP TABLE IF EXISTS `t_insu`;
CREATE TABLE `t_insu` (
`Id` int(11) NOT NULL AUTO_INCREMENT,
`insuPerson` varchar(255) DEFAULT NULL,
`insuFile` varchar(255) DEFAULT NULL,
`insuMoney` varchar(255) DEFAULT NULL,
`info` varchar(255) DEFAULT NULL,
PRIMARY KEY (`Id`),
KEY `FKCB5E47326650193E` (`Id`),
CONSTRAINT `FKCB5E47326650193E` FOREIGN KEY (`Id`) REFERENCES `t_project` (`Id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for t_logis
-- ----------------------------
DROP TABLE IF EXISTS `t_logis`;
CREATE TABLE `t_logis` (
`Id` int(11) NOT NULL AUTO_INCREMENT,
`outGoodsTime` datetime DEFAULT NULL,
`outGoodsName` varchar(255) DEFAULT NULL,
`outGoodsPhone` varchar(255) DEFAULT NULL,
`outGoodsCarId` varchar(255) DEFAULT NULL,
`outGoodsIDCard` varchar(255) DEFAULT NULL,
`logisName` varchar(255) DEFAULT NULL,
`logisPhone` varchar(255) DEFAULT NULL,
`logisCarId` varchar(255) DEFAULT NULL,
`logisIDCard` varchar(255) DEFAULT NULL,
`logisPartName` varchar(255) DEFAULT NULL,
`logisPartAdress` varchar(255) DEFAULT NULL,
`logisPartPersonName` varchar(255) DEFAULT NULL,
`logisPartPhone` varchar(255) DEFAULT NULL,
`inGoodsName` varchar(255) DEFAULT NULL,
`inGoodsPhone` varchar(255) DEFAULT NULL,
`inGoodsPartName` varchar(255) DEFAULT NULL,
`inGoodsAdress` varchar(255) DEFAULT NULL,
`inLogisFile` varchar(255) DEFAULT NULL,
`inGoodsFile` varchar(255) DEFAULT NULL,
`inGoodsTime` datetime DEFAULT NULL,
`warehouseName` varchar(255) DEFAULT NULL,
`warehousePhone` varchar(255) DEFAULT NULL,
`outGoodsFile` varchar(255) DEFAULT NULL,
`warehouseAdress` varchar(255) DEFAULT NULL,
`phone` varchar(255) DEFAULT NULL,
`inWarehouseMoney` varchar(255) DEFAULT NULL,
`outWareNum1` varchar(255) DEFAULT NULL,
`outWareTime1` datetime DEFAULT NULL,
`outWareNum2` varchar(255) DEFAULT NULL,
`outWareTime2` datetime DEFAULT NULL,
`outWareNum3` varchar(255) DEFAULT NULL,
`outWareTime3` datetime DEFAULT NULL,
`outWareNum4` varchar(255) DEFAULT NULL,
`outWareTime4` datetime DEFAULT NULL,
`outWareNum5` varchar(255) DEFAULT NULL,
`outWareTime5` datetime DEFAULT NULL,
`info` varchar(255) DEFAULT NULL,
PRIMARY KEY (`Id`),
KEY `FKA0952BE36650193E` (`Id`),
CONSTRAINT `FKA0952BE36650193E` FOREIGN KEY (`Id`) REFERENCES `t_project` (`Id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for t_project
-- ----------------------------
DROP TABLE IF EXISTS `t_project`;
CREATE TABLE `t_project` (
`Id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`inNum` varchar(255) DEFAULT NULL,
`outNum` varchar(255) DEFAULT NULL,
`supplier` varchar(255) DEFAULT NULL,
`finalUser` varchar(255) DEFAULT NULL,
`payStyle` varchar(255) DEFAULT NULL,
`projectNum` varchar(255) DEFAULT NULL,
`models` varchar(255) DEFAULT NULL,
`agent` varchar(255) DEFAULT NULL,
`productName` varchar(255) DEFAULT NULL,
`outMoney` varchar(255) DEFAULT NULL,
`agentMoney` varchar(255) DEFAULT NULL,
`sellMoney` varchar(255) DEFAULT NULL,
`exRatio` varchar(255) DEFAULT NULL,
`rate` varchar(255) DEFAULT NULL,
`info` varchar(255) DEFAULT NULL,
`otherMoney` varchar(255) DEFAULT NULL,
`intMoney` varchar(255) DEFAULT NULL,
`outFiles` varchar(255) DEFAULT NULL,
`inFiles` varchar(255) DEFAULT NULL,
`creatTime` datetime DEFAULT NULL,
`isOver` int(11) DEFAULT NULL,
`isBank` int(11) DEFAULT NULL,
`isClear` int(11) DEFAULT NULL,
`isBid` int(11) DEFAULT NULL,
`isBusines` int(11) DEFAULT NULL,
`isInsu` int(11) DEFAULT NULL,
`isLogis` int(11) DEFAULT NULL,
`isInsp` int(11) DEFAULT NULL,
`canHaveMoney` varchar(255) DEFAULT NULL,
`allCanHaveMoney` varchar(255) DEFAULT NULL,
`noPayMoney` varchar(255) DEFAULT NULL,
`haveDate1` datetime DEFAULT NULL,
`haveMoney1` varchar(255) DEFAULT NULL,
`haveDate2` datetime DEFAULT NULL,
`haveMoney2` varchar(255) DEFAULT NULL,
`haveDate3` datetime DEFAULT NULL,
`haveMoney3` varchar(255) DEFAULT NULL,
`haveDate4` datetime DEFAULT NULL,
`haveMoney4` varchar(255) DEFAULT NULL,
`haveDate5` datetime DEFAULT NULL,
`haveMoney5` varchar(255) DEFAULT NULL,
`haveDate6` datetime DEFAULT NULL,
`haveMoney6` varchar(255) DEFAULT NULL,
`haveDate7` datetime DEFAULT NULL,
`haveMoney7` varchar(255) DEFAULT NULL,
`haveDate8` datetime DEFAULT NULL,
`haveMoney8` varchar(255) DEFAULT NULL,
`haveDate9` datetime DEFAULT NULL,
`haveMoney9` varchar(255) DEFAULT NULL,
`haveDate10` datetime DEFAULT NULL,
`haveMoney10` varchar(255) DEFAULT NULL,
`inDate1` datetime DEFAULT NULL,
`inMoney1` varchar(255) DEFAULT NULL,
`inDate2` datetime DEFAULT NULL,
`inMoney2` varchar(255) DEFAULT NULL,
`inDate3` datetime DEFAULT NULL,
`inMoney3` varchar(255) DEFAULT NULL,
`inDate4` datetime DEFAULT NULL,
`inMoney4` varchar(255) DEFAULT NULL,
`inDate5` datetime DEFAULT NULL,
`inMoney5` varchar(255) DEFAULT NULL,
`inDate6` datetime DEFAULT NULL,
`inMoney6` varchar(255) DEFAULT NULL,
`inDate7` datetime DEFAULT NULL,
`inMoney7` varchar(255) DEFAULT NULL,
`inDate8` datetime DEFAULT NULL,
`inMoney8` varchar(255) DEFAULT NULL,
`inDate9` datetime DEFAULT NULL,
`inMoney9` varchar(255) DEFAULT NULL,
`inDate10` datetime DEFAULT NULL,
`inMoney10` varchar(255) DEFAULT NULL,
`totalMoney` varchar(255) DEFAULT NULL,
`monkeyInfo` varchar(255) DEFAULT NULL,
`brank` int(11) DEFAULT NULL,
`project_user` int(11) DEFAULT NULL,
`creat_user` int(11) DEFAULT NULL,
`brank_user` int(11) DEFAULT NULL,
`clear_user` int(11) DEFAULT NULL,
`bid_user` int(11) DEFAULT NULL,
`busines_user` int(11) DEFAULT NULL,
`insu_user` int(11) DEFAULT NULL,
`logis_user` int(11) DEFAULT NULL,
`insp_user` int(11) DEFAULT NULL,
`brand_user` int(11) DEFAULT NULL,
PRIMARY KEY (`Id`),
KEY `FKA9223E4E34D04C84` (`brand_user`),
KEY `FKA9223E4E7E25129F` (`brank`),
KEY `FKA9223E4EB736AD7E` (`clear_user`),
KEY `FKA9223E4E40C238DD` (`brank_user`),
KEY `FKA9223E4EDDB3AEA9` (`insp_user`),
KEY `FKA9223E4EB9BFCC78` (`busines_user`),
KEY `FKA9223E4E99B94CE` (`bid_user`),
KEY `FKA9223E4EE63BE9C4` (`insu_user`),
KEY `FKA9223E4E343AF8C2` (`creat_user`),
KEY `FKA9223E4E1AE53832` (`project_user`),
KEY `FKA9223E4E834200FD` (`logis_user`),
CONSTRAINT `FKA9223E4E834200FD` FOREIGN KEY (`logis_user`) REFERENCES `t_user` (`Id`),
CONSTRAINT `FKA9223E4E1AE53832` FOREIGN KEY (`project_user`) REFERENCES `t_user` (`Id`),
CONSTRAINT `FKA9223E4E343AF8C2` FOREIGN KEY (`creat_user`) REFERENCES `t_user` (`Id`),
CONSTRAINT `FKA9223E4E34D04C84` FOREIGN KEY (`brand_user`) REFERENCES `t_user` (`Id`),
CONSTRAINT `FKA9223E4E40C238DD` FOREIGN KEY (`brank_user`) REFERENCES `t_user` (`Id`),
CONSTRAINT `FKA9223E4E7E25129F` FOREIGN KEY (`brank`) REFERENCES `t_brand` (`Id`),
CONSTRAINT `FKA9223E4E99B94CE` FOREIGN KEY (`bid_user`) REFERENCES `t_user` (`Id`),
CONSTRAINT `FKA9223E4EB736AD7E` FOREIGN KEY (`clear_user`) REFERENCES `t_user` (`Id`),
CONSTRAINT `FKA9223E4EB9BFCC78` FOREIGN KEY (`busines_user`) REFERENCES `t_user` (`Id`),
CONSTRAINT `FKA9223E4EDDB3AEA9` FOREIGN KEY (`insp_user`) REFERENCES `t_user` (`Id`),
CONSTRAINT `FKA9223E4EE63BE9C4` FOREIGN KEY (`insu_user`) REFERENCES `t_user` (`Id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for t_suppliers
-- ----------------------------
DROP TABLE IF EXISTS `t_suppliers`;
CREATE TABLE `t_suppliers` (
`Id` int(11) NOT NULL AUTO_INCREMENT,
`allInBuyMoney` varchar(255) DEFAULT NULL,
`insupplier1` varchar(255) DEFAULT NULL,
`goodsName1` varchar(255) DEFAULT NULL,
`goodsNum1` varchar(255) DEFAULT NULL,
`conMoney1` varchar(255) DEFAULT NULL,
`conPayMoney1` varchar(255) DEFAULT NULL,
`comBillInfo1` varchar(255) DEFAULT NULL,
`conPerson1` varchar(255) DEFAULT NULL,
`con1` varchar(255) DEFAULT NULL,
`insupplier2` varchar(255) DEFAULT NULL,
`goodsName2` varchar(255) DEFAULT NULL,
`goodsNum2` varchar(255) DEFAULT NULL,
`conMoney2` varchar(255) DEFAULT NULL,
`conPayMoney2` varchar(255) DEFAULT NULL,
`comBillInfo2` varchar(255) DEFAULT NULL,
`conPerson2` varchar(255) DEFAULT NULL,
`con2` varchar(255) DEFAULT NULL,
`insupplier3` varchar(255) DEFAULT NULL,
`goodsName3` varchar(255) DEFAULT NULL,
`goodsNum3` varchar(255) DEFAULT NULL,
`conMoney3` varchar(255) DEFAULT NULL,
`conPayMoney3` varchar(255) DEFAULT NULL,
`comBillInfo3` varchar(255) DEFAULT NULL,
`conPerson3` varchar(255) DEFAULT NULL,
`con3` varchar(255) DEFAULT NULL,
`insupplier4` varchar(255) DEFAULT NULL,
`goodsName4` varchar(255) DEFAULT NULL,
`goodsNum4` varchar(255) DEFAULT NULL,
`conMoney4` varchar(255) DEFAULT NULL,
`conPayMoney4` varchar(255) DEFAULT NULL,
`comBillInfo4` varchar(255) DEFAULT NULL,
`conPerson4` varchar(255) DEFAULT NULL,
`con4` varchar(255) DEFAULT NULL,
`insupplier5` varchar(255) DEFAULT NULL,
`goodsName5` varchar(255) DEFAULT NULL,
`goodsNum5` varchar(255) DEFAULT NULL,
`conMoney5` varchar(255) DEFAULT NULL,
`conPayMoney5` varchar(255) DEFAULT NULL,
`comBillInfo5` varchar(255) DEFAULT NULL,
`conPerson5` varchar(255) DEFAULT NULL,
`con5` varchar(255) DEFAULT NULL,
`insupplier6` varchar(255) DEFAULT NULL,
`goodsName6` varchar(255) DEFAULT NULL,
`goodsNum6` varchar(255) DEFAULT NULL,
`conMoney6` varchar(255) DEFAULT NULL,
`conPayMoney6` varchar(255) DEFAULT NULL,
`comBillInfo6` varchar(255) DEFAULT NULL,
`conPerson6` varchar(255) DEFAULT NULL,
`con6` varchar(255) DEFAULT NULL,
`insupplier7` varchar(255) DEFAULT NULL,
`goodsName7` varchar(255) DEFAULT NULL,
`goodsNum7` varchar(255) DEFAULT NULL,
`conMoney7` varchar(255) DEFAULT NULL,
`conPayMoney7` varchar(255) DEFAULT NULL,
`comBillInfo7` varchar(255) DEFAULT NULL,
`conPerson7` varchar(255) DEFAULT NULL,
`con7` varchar(255) DEFAULT NULL,
`insupplier8` varchar(255) DEFAULT NULL,
`goodsName8` varchar(255) DEFAULT NULL,
`goodsNum8` varchar(255) DEFAULT NULL,
`conMoney8` varchar(255) DEFAULT NULL,
`conPayMoney8` varchar(255) DEFAULT NULL,
`comBillInfo8` varchar(255) DEFAULT NULL,
`conPerson8` varchar(255) DEFAULT NULL,
`con8` varchar(255) DEFAULT NULL,
`insupplier9` varchar(255) DEFAULT NULL,
`goodsName9` varchar(255) DEFAULT NULL,
`goodsNum9` varchar(255) DEFAULT NULL,
`conMoney9` varchar(255) DEFAULT NULL,
`conPayMoney9` varchar(255) DEFAULT NULL,
`comBillInfo9` varchar(255) DEFAULT NULL,
`conPerson9` varchar(255) DEFAULT NULL,
`con9` varchar(255) DEFAULT NULL,
`insupplier10` varchar(255) DEFAULT NULL,
`goodsName10` varchar(255) DEFAULT NULL,
`goodsNum10` varchar(255) DEFAULT NULL,
`conMoney10` varchar(255) DEFAULT NULL,
`conPayMoney10` varchar(255) DEFAULT NULL,
`comBillInfo10` varchar(255) DEFAULT NULL,
`conPerson10` varchar(255) DEFAULT NULL,
`con10` varchar(255) DEFAULT NULL,
PRIMARY KEY (`Id`),
KEY `FK1D853A1C6650193E` (`Id`),
CONSTRAINT `FK1D853A1C6650193E` FOREIGN KEY (`Id`) REFERENCES `t_project` (`Id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for t_user
-- ----------------------------
DROP TABLE IF EXISTS `t_user`;
CREATE TABLE `t_user` (
`Id` int(11) NOT NULL AUTO_INCREMENT,
`userName` varchar(255) DEFAULT NULL,
`password` varchar(255) DEFAULT NULL,
`phone` varchar(255) DEFAULT NULL,
`realName` varchar(255) DEFAULT NULL,
`loginTime` datetime DEFAULT NULL,
`LoginIP` varchar(255) DEFAULT NULL,
`role` int(11) DEFAULT NULL,
`canBid` int(11) DEFAULT NULL,
`canBrank` int(11) DEFAULT NULL,
`canBusines` int(11) DEFAULT NULL,
`canClear` int(11) DEFAULT NULL,
`canInsp` int(11) DEFAULT NULL,
`canInsu` int(11) DEFAULT NULL,
`canLogis` int(11) DEFAULT NULL,
PRIMARY KEY (`Id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;
|
๏ปฟCREATE TABLE [ADM].[C_PUESTO_ESCOLARIDAD] (
[ID_PUESTO_ESCOLARIDAD] INT IDENTITY (1, 1) NOT NULL,
[ID_PUESTO] INT NOT NULL,
[ID_ESCOLARIDAD] INT NOT NULL,
[FE_CREACION] DATETIME NOT NULL,
[FE_MODIFICACION] DATETIME NULL,
[CL_USUARIO_APP_CREA] NVARCHAR (50) NOT NULL,
[CL_USUARIO_APP_MODIFICA] NVARCHAR (50) NULL,
[NB_PROGRAMA_CREA] NVARCHAR (50) NOT NULL,
[NB_PROGRAMA_MODIFICA] NVARCHAR (50) NULL,
CONSTRAINT [PK_C_PUESTO_ESCOLARIDAD] PRIMARY KEY CLUSTERED ([ID_PUESTO_ESCOLARIDAD] ASC),
CONSTRAINT [FK_C_PUESTO_ESCOLARIDAD_C_ESCOLARIDAD] FOREIGN KEY ([ID_ESCOLARIDAD]) REFERENCES [ADM].[C_ESCOLARIDAD] ([ID_ESCOLARIDAD])
);
|
DROP PROCEDURE IF EXISTS report_UserLogs;
DELIMITER $$
# CALL report_UserLogs('WHERE user_role = 2');
CREATE DEFINER=`root`@`localhost` PROCEDURE `report_UserLogs`(IN querystring TEXT)
BEGIN
SET @queryString = querystring;
DROP TEMPORARY TABLE IF EXISTS _userLogs;
CREATE TEMPORARY TABLE IF NOT EXISTS _userLogs AS
(SELECT u.user_id, u.username, u.user_role, r.description AS role_desc, l.ip_address, l.action, l.datetime FROM user_login_logs l
LEFT JOIN users_tbl u ON u.user_id = l.user_id
LEFT JOIN lk_user_roles r ON r.id = u.user_role
WHERE u.user_role <> 1 ORDER BY l.datetime ASC);
SET @query = CONCAT('SELECT * FROM _userLogs ', @queryString);
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END$$
DELIMITER ;
|
CREATE DATABASE `hotel_locations` /*!40100 DEFAULT CHARACTER SET utf8 */;
use hotel_locations;
CREATE TABLE `markers` (
`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`name` VARCHAR( 60 ) NOT NULL ,
`address` VARCHAR( 80 ) NOT NULL ,
`lat` FLOAT( 10, 6 ) NOT NULL ,
`lng` FLOAT( 10, 6 ) NOT NULL
) ENGINE = MYISAM ;
INSERT INTO `markers` (`id`, `name`, `address`, `lat`, `lng`) VALUES ('1','Hotel Ellora park','Dhankawadi','18.465853','73.858193');
INSERT INTO `markers` (`id`, `name`, `address`, `lat`, `lng`) VALUES ('2','Hotel Krushna','Dhankawadi','18.4681503','73.8538022');
INSERT INTO `markers` (`id`, `name`, `address`, `lat`, `lng`) VALUES ('3','Vivanta by Taj','Koregaon Park','18.540112','73.8882739');
INSERT INTO `markers` (`id`, `name`, `address`, `lat`, `lng`) VALUES ('4','The Westin','Koregaon Park','18.540112','73.8882739');
INSERT INTO `markers` (`id`, `name`, `address`, `lat`, `lng`) VALUES ('5','Hotel ABC Inn',' Nigdi','18.657125','73.7716086');
INSERT INTO `markers` (`id`, `name`, `address`, `lat`, `lng`) VALUES ('6','Hotel Krishna Regency','Nigdi','18.657125','73.7716086');
INSERT INTO `markers` (`id`, `name`, `address`, `lat`, `lng`) VALUES ('7','Hotel Basera','Bajirao Road','18.5193718','73.8519211');
INSERT INTO `markers` (`id`, `name`, `address`, `lat`, `lng`) VALUES ('8','Hotel Sapna','Shivajinagar','18.5193718','73.8519211');
|
INSERT into category (description) VALUES ('American');
INSERT into category (description) VALUES ('Italian');
INSERT into category (description) VALUES ('Mexican');
INSERT into category (description) VALUES ('Fast Foot');
INSERT into unit_of_measure (description) VALUES ('Cup');
|
SELECT
Title, IsActive
FROM Chats
WHERE IsActive = 0 AND LEN(Title) < 5 OR Title LIKE '__tl%'
ORDER BY Title DESC |
DROP DATABASE IF EXISTS todo;
CREATE DATABASE todo;
USE todo;
CREATE TABLE things(
id INTEGER NOT NULL AUTO_INCREMENT,
PRIMARY KEY (id),
description varchar(50) NOT NULL,
user varchar(50) NOT NULL,
status BOOLEAN,
num INTEGER
);
CREATE TABLE user(
id INTEGER NOT NULL AUTO_INCREMENT,
PRIMARY KEY (id),
username varchar(50) NOT NULL,
password varchar(50) NOT NULL
);
CREATE TABLE session(
id INTEGER NOT NULL AUTO_INCREMENT,
PRIMARY KEY (id),
token varchar(200) NOT NULL,
user varchar(50) NOT NULL
);
INSERT INTO user(username, password) VALUES
('test', '123');
INSERT INTO session(token, user) VALUES
('empty', 'empty'); |
create table sales_order
(entity_id int(10) unsigned NOT NULL auto_increment comment "Entity Id",
state varchar(32) comment "State",
`status` varchar(32) comment "Status",
coupon_code varchar(255) comment "Coupon Code",
protect_code varchar(255) comment "Protect Code",
shipping_description varchar(255) comment "Shipping Description",
is_virtual smallint(5) unsigned comment "Is Virtual",
store_id smallint(5) unsigned comment "Store Id",
customer_id int(10) unsigned comment "Customer Id",
base_discount_amount decimal(12,4) comment "Base Discount Amount",
base_discount_canceled decimal(12,4) comment "Base Discount Canceled",
base_discount_invoiced decimal(12,4) comment "Base Discount Invoiced",
base_discount_refunded decimal(12,4) comment "Base Discount Refunded",
base_grand_total decimal(12,4) comment "Base Grand Total",
base_shipping_amount decimal(12,4) comment "Base Shipping Amount",
base_shipping_canceled decimal(12,4) comment "Base Shipping Canceled",
base_shipping_invoiced decimal(12,4) comment "Base Shipping Invoiced",
base_shipping_refunded decimal(12,4) comment "Base Shipping Refunded",
base_shipping_tax_amount decimal(12,4) comment "Base Shipping Tax Amount",
base_shipping_tax_refunded decimal(12,4) comment "Base Shipping Tax Refunded",
base_subtotal decimal(12,4) comment "Base Subtotal",
base_subtotal_canceled decimal(12,4) comment "Base Subtotal Canceled",
base_subtotal_invoiced decimal(12,4) comment "Base Subtotal Invoiced",
base_subtotal_refunded decimal(12,4) comment "Base Subtotal Refunded",
base_tax_amount decimal(12,4) comment "Base Tax Amount",
base_tax_canceled decimal(12,4) comment "Base Tax Canceled",
base_tax_invoiced decimal(12,4) comment "Base Tax Invoiced",
base_tax_refunded decimal(12,4) comment "Base Tax Refunded",
base_to_global_rate decimal(12,4) comment "Base To Global Rate",
base_to_order_rate decimal(12,4) comment "Base To Order Cate",
base_total_canceled decimal(12,4) comment "Base Total Canceled",
base_total_invoiced decimal(12,4) comment "Base Total Invoiced",
base_total_invoiced_cost decimal(12,4) comment "Base Total Invoiced Cost",
base_total_offline_refunded decimal(12,4) comment "Base Total Offline Refunded",
base_total_online_refunded decimal(12,4) comment "Base Total Online Refunded",
base_total_paid decimal(12,4) comment "Base_Total_Paid",
base_total_qty_ordered decimal(12,4) comment "Base_Total_Qty_Ordered",
base_total_refunded decimal(12,4) comment "Base_Total_Refunded",
discount_amount decimal(12,4) comment "Discount_Amount",
discount_canceled decimal(12,4) comment "Discount_Canceled",
discount_invoiced decimal(12,4) comment "Discount_Invoiced",
discount_refunded decimal(12,4) comment "Discount_Refunded",
grand_total decimal(12,4) comment "Grand_Total",
created_at timestamp not null default current_timestamp comment "Created_At",
updated_at timestamp not null default current_timestamp comment "Updated_At",
PRIMARY KEY(`entity_id`));
describe sales_order;
create table sales_order_item(
item_id int(10) unsigned NOT NULL auto_increment,
order_id int(10) unsigned NOT NULL,
store_id smallint(5) unsigned,
parent_item_id int(10) unsigned,
quote_item_id int(10) unsigned,
created_at timestamp not null default current_timestamp,
updated_at timestamp not null default current_timestamp on update CURRENT_TIMESTAMP,
product_id int(10) unsigned,
product_type varchar(255),
product_options text,
weight decimal(12,4),
is_virtual int(10) unsigned,
sku int(10) unsigned,
`name` int(10) unsigned,
description text,
applied_rule_ids text,
additional_data text,
is_qty_decimal smallint(5) unsigned,
no_discount smallint(5) unsigned not null,
qty_backordered decimal(12,4),
qty_canceled decimal(12,4),
qty_invoiced decimal(12,4),
qty_ordered decimal(12,4),
qty_refunded decimal(12,4),
qty_shipped decimal(12,4),
base_cost decimal(12,4),
price decimal(12,4) not null,
base_price decimal(12,4) not null,
original_price decimal(12,4),
base_original_price decimal(12,4),
tax_percent decimal(12,4),
tax_amount decimal(12,4),
foreign key(`order_id`) references sales_order(entity_id),
PRIMARY KEY(`item_id`)
);
alter table sales_order_item add column(
subscription_info int(11),subscription_type text,no_of_days text);
CREATE TABLE `sales`.`st` (
`a1` INT NOT NULL AUTO_INCREMENT,
`a2` VARCHAR(20) NULL,
`a3` DECIMAL(10,4) NULL COMMENT 'third column',
PRIMARY KEY (`a1`));
alter table sales_order_item drop foreign key sales_order_item_ibfk_1;
alter table sales_order_item add foreign key(`order_id`) references sales_order(entity_id);
insert into sales_order values('1','karnataka','success','A00','Z00','Banglore','12','123','1234',
'100.00','100.00','100.00','100.00','100.00','100.00','100.00',
'100.00','100.00','100.00','100.00','100.00','100.00','100.00',
'100.00','100.00','100.00','100.00','100.00','100.00','100.00',
'100.00','100.00','100.00','100.00','100.00','100.00','100.00',
'100.00','100.00','100.00','100.00','100.00','100.00','2018-01-01 00:00:01','2018-01-01 00:00:01');
select * from sales_order;
insert into sales_order_item values('1','1','12','12','12','2018-01-01 00:00:01','2018-01-01 00:00:01','4','hello2','hii','123.3',
'100','2','2','hiii','hii','hii','100',
'100','100.00','100.00','100.00','100.00','100.00','100.00',
'100.00','100.00','100.00','100.00','100.00','100.00','100.00',
'100','end','end');
select * from sales_order_item;
update sales_order set updated_at=default where entity_id=1;
select*from sales_order; |
-- Sqlite stores dates at text, real, or integer, depending on what we're doing.
-- http://www.sqlite.org/datatype3.html#datetime
create table status (
id integer primary key autoincrement,
uuid text,
msg text,
date text
);
create table meta (
id integer primary key autoincrement,
name text,
value text
);
|
-- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 02, 2018 at 02:56 PM
-- Server version: 10.1.32-MariaDB
-- PHP Version: 7.2.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!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 */;
--
-- Database: `brasilclassificados`
--
-- --------------------------------------------------------
--
-- Table structure for table `categoria`
--
CREATE TABLE `categoria` (
`cod` int(6) NOT NULL,
`nome` varchar(50) NOT NULL,
`thumb` varchar(100) NOT NULL,
`descricao` text NOT NULL,
`link` varchar(100) NOT NULL,
`categoria_cod` int(6) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `classificado`
--
CREATE TABLE `classificado` (
`cod` int(11) NOT NULL,
`nome` varchar(100) NOT NULL,
`descricao` text NOT NULL,
`tipo` varchar(1) NOT NULL COMMENT 'Venda, troca, doaรงรฃo ou outro',
`valor` decimal(10,2) NOT NULL,
`status` int(1) NOT NULL,
`perfil` int(1) NOT NULL,
`usuario_cod` int(6) NOT NULL,
`categoria_cod` int(6) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `comentario`
--
CREATE TABLE `comentario` (
`cod` int(11) NOT NULL,
`mensagem` varchar(500) NOT NULL,
`data` datetime NOT NULL,
`status` int(1) NOT NULL,
`classificado_cod` int(11) NOT NULL,
`usuario_cod` int(6) NOT NULL,
`comentario_cod` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `contato`
--
CREATE TABLE `contato` (
`cod` int(11) NOT NULL,
`nome` varchar(100) NOT NULL,
`email` varchar(100) NOT NULL,
`assunto` varchar(100) NOT NULL,
`mensagem` text NOT NULL,
`data` datetime NOT NULL,
`ip` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `endereco`
--
CREATE TABLE `endereco` (
`cod` int(11) NOT NULL,
`rua` varchar(100) NOT NULL,
`numero` varchar(20) NOT NULL,
`bairro` varchar(50) NOT NULL,
`cidade` varchar(50) NOT NULL,
`estado` varchar(2) NOT NULL,
`complemento` varchar(20) NOT NULL,
`cep` varchar(20) NOT NULL,
`usuario_cod` int(6) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `imagens`
--
CREATE TABLE `imagens` (
`cod` int(11) NOT NULL,
`imagem` varchar(100) NOT NULL,
`classificado_cod` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `telefone`
--
CREATE TABLE `telefone` (
`cod` int(11) NOT NULL,
`tipo` int(1) NOT NULL,
`numero` varchar(20) NOT NULL,
`usuario_cod` int(6) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `usuario`
--
CREATE TABLE `usuario` (
`cod` int(6) NOT NULL,
`nome` varchar(100) NOT NULL,
`email` varchar(100) NOT NULL,
`cpf` varchar(20) NOT NULL,
`usuario` varchar(50) NOT NULL,
`senha` varchar(50) NOT NULL,
`nascimento` date NOT NULL,
`sexo` varchar(1) NOT NULL,
`status` int(1) NOT NULL,
`permissao` int(1) NOT NULL,
`ip` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `usuario`
--
INSERT INTO `usuario` (`cod`, `nome`, `email`, `cpf`, `usuario`, `senha`, `nascimento`, `sexo`, `status`, `permissao`, `ip`) VALUES
(0, 'Gunnar Correa', 'gunnercorrea@gmail.com', '309.073.040-52', 'gunnarcorrea', '25f9e794323b453885f5181f1b624d0b', '1992-08-21', 'm', 1, 1, '::1');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `categoria`
--
ALTER TABLE `categoria`
ADD PRIMARY KEY (`cod`),
ADD KEY `fk_categoria_categoria1_idx` (`categoria_cod`);
--
-- Indexes for table `classificado`
--
ALTER TABLE `classificado`
ADD PRIMARY KEY (`cod`),
ADD KEY `fk_classificado_usuario1_idx` (`usuario_cod`),
ADD KEY `fk_classificado_categoria1_idx` (`categoria_cod`);
--
-- Indexes for table `comentario`
--
ALTER TABLE `comentario`
ADD PRIMARY KEY (`cod`),
ADD KEY `fk_comentario_classificado1_idx` (`classificado_cod`),
ADD KEY `fk_comentario_usuario1_idx` (`usuario_cod`),
ADD KEY `fk_comentario_comentario1_idx` (`comentario_cod`);
--
-- Indexes for table `contato`
--
ALTER TABLE `contato`
ADD PRIMARY KEY (`cod`);
--
-- Indexes for table `endereco`
--
ALTER TABLE `endereco`
ADD PRIMARY KEY (`cod`),
ADD KEY `fk_endereco_usuario_idx` (`usuario_cod`);
--
-- Indexes for table `imagens`
--
ALTER TABLE `imagens`
ADD PRIMARY KEY (`cod`),
ADD KEY `fk_imagens_classificado1_idx` (`classificado_cod`);
--
-- Indexes for table `telefone`
--
ALTER TABLE `telefone`
ADD PRIMARY KEY (`cod`),
ADD KEY `fk_telefone_usuario1_idx` (`usuario_cod`);
--
-- Indexes for table `usuario`
--
ALTER TABLE `usuario`
ADD PRIMARY KEY (`cod`),
ADD UNIQUE KEY `cpf_UNIQUE` (`cpf`),
ADD UNIQUE KEY `email_UNIQUE` (`email`),
ADD UNIQUE KEY `usuario_UNIQUE` (`usuario`);
--
-- Constraints for dumped tables
--
--
-- Constraints for table `categoria`
--
ALTER TABLE `categoria`
ADD CONSTRAINT `fk_categoria_categoria1` FOREIGN KEY (`categoria_cod`) REFERENCES `categoria` (`cod`) ON DELETE NO ACTION ON UPDATE NO ACTION;
--
-- Constraints for table `classificado`
--
ALTER TABLE `classificado`
ADD CONSTRAINT `fk_classificado_categoria1` FOREIGN KEY (`categoria_cod`) REFERENCES `categoria` (`cod`) ON DELETE NO ACTION ON UPDATE NO ACTION,
ADD CONSTRAINT `fk_classificado_usuario1` FOREIGN KEY (`usuario_cod`) REFERENCES `usuario` (`cod`) ON DELETE NO ACTION ON UPDATE NO ACTION;
--
-- Constraints for table `comentario`
--
ALTER TABLE `comentario`
ADD CONSTRAINT `fk_comentario_classificado1` FOREIGN KEY (`classificado_cod`) REFERENCES `classificado` (`cod`) ON DELETE NO ACTION ON UPDATE NO ACTION,
ADD CONSTRAINT `fk_comentario_comentario1` FOREIGN KEY (`comentario_cod`) REFERENCES `comentario` (`cod`) ON DELETE NO ACTION ON UPDATE NO ACTION,
ADD CONSTRAINT `fk_comentario_usuario1` FOREIGN KEY (`usuario_cod`) REFERENCES `usuario` (`cod`) ON DELETE NO ACTION ON UPDATE NO ACTION;
--
-- Constraints for table `endereco`
--
ALTER TABLE `endereco`
ADD CONSTRAINT `fk_endereco_usuario` FOREIGN KEY (`usuario_cod`) REFERENCES `usuario` (`cod`) ON DELETE NO ACTION ON UPDATE NO ACTION;
--
-- Constraints for table `imagens`
--
ALTER TABLE `imagens`
ADD CONSTRAINT `fk_imagens_classificado1` FOREIGN KEY (`classificado_cod`) REFERENCES `classificado` (`cod`) ON DELETE NO ACTION ON UPDATE NO ACTION;
--
-- Constraints for table `telefone`
--
ALTER TABLE `telefone`
ADD CONSTRAINT `fk_telefone_usuario1` FOREIGN KEY (`usuario_cod`) REFERENCES `usuario` (`cod`) ON DELETE NO ACTION ON UPDATE NO ACTION;
COMMIT;
/*!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 */;
|
delete from HtmlLabelIndex where id=19680
/
delete from HtmlLabelInfo where indexid=19680
/
INSERT INTO HtmlLabelIndex values(19680,'ๆถ้ดๅบ้ด')
/
INSERT INTO HtmlLabelInfo VALUES(19680,'ๆถ้ดๅบ้ด',7)
/
INSERT INTO HtmlLabelInfo VALUES(19680,'Time Zone',8)
/
INSERT INTO HtmlLabelInfo VALUES(19680,'ๆ้ๅ้',9)
/
delete from HtmlLabelIndex where id=24183
/
delete from HtmlLabelInfo where indexid=24183
/
INSERT INTO HtmlLabelIndex values(24183,'ๅทฒๅไปฃ็')
/
INSERT INTO HtmlLabelInfo VALUES(24183,'ๅทฒๅไปฃ็',7)
/
INSERT INTO HtmlLabelInfo VALUES(24183,'Acting has been done',8)
/
INSERT INTO HtmlLabelInfo VALUES(24183,'ๅทฒ่พฆไปฃ็',9)
/
delete from HtmlLabelIndex where id=24535
/
delete from HtmlLabelInfo where indexid=24535
/
INSERT INTO HtmlLabelIndex values(24535,'ไปฃ็็ฑปๅ')
/
delete from HtmlLabelIndex where id=24536
/
delete from HtmlLabelInfo where indexid=24536
/
INSERT INTO HtmlLabelIndex values(24536,'ๆไปฃ็็ๆต็จ')
/
delete from HtmlLabelIndex where id=24537
/
delete from HtmlLabelInfo where indexid=24537
/
INSERT INTO HtmlLabelIndex values(24537,'ไปฃ็็ปๆ็ๆต็จ')
/
INSERT INTO HtmlLabelInfo VALUES(24535,'ไปฃ็็ฑปๅ',7)
/
INSERT INTO HtmlLabelInfo VALUES(24535,'agenttype',8)
/
INSERT INTO HtmlLabelInfo VALUES(24535,'ไปฃ็้กๅ',9)
/
INSERT INTO HtmlLabelInfo VALUES(24536,'ๆไปฃ็็ๆต็จ',7)
/
INSERT INTO HtmlLabelInfo VALUES(24536,'My agent process',8)
/
INSERT INTO HtmlLabelInfo VALUES(24536,'ๆไปฃ็็ๆต็จ',9)
/
INSERT INTO HtmlLabelInfo VALUES(24537,'ไปฃ็็ปๆ็ๆต็จ',7)
/
INSERT INTO HtmlLabelInfo VALUES(24537,'Acting to me the process',8)
/
INSERT INTO HtmlLabelInfo VALUES(24537,'ไปฃ็็ตฆๆ็ๆต็จ',9)
/
|
alter table SystemSet add openPasswordLock integer
/
alter table SystemSet add sumPasswordLock integer
/
alter table SystemSet add passwordComplexity integer
/
alter table HrmResource add passwordlock integer
/
alter table HrmResource add sumpasswordwrong integer
/
ALTER TABLE HrmResource ADD oldpassword1 varchar2(100) NULL
/
ALTER TABLE HrmResource ADD oldpassword2 varchar2(100) NULL
/
|
-- phpMyAdmin SQL Dump
-- version 4.4.12
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jun 30, 2020 at 06:22 AM
-- Server version: 5.6.25
-- PHP Version: 5.6.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!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 */;
--
-- Database: `penjualan_brg`
--
-- --------------------------------------------------------
--
-- Table structure for table `karyawan`
--
CREATE TABLE IF NOT EXISTS `karyawan` (
`id_karyawan` char(12) NOT NULL,
`nama_karyawan` varchar(20) NOT NULL,
`password` varchar(32) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `karyawan`
--
INSERT INTO `karyawan` (`id_karyawan`, `nama_karyawan`, `password`) VALUES
('1234', 'Widia', '3f132ed0f4b301669300eabbe237da88');
-- --------------------------------------------------------
--
-- Table structure for table `kasir`
--
CREATE TABLE IF NOT EXISTS `kasir` (
`id_kasir` char(12) NOT NULL,
`nama` varchar(25) NOT NULL,
`password` varchar(32) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `kasir`
--
INSERT INTO `kasir` (`id_kasir`, `nama`, `password`) VALUES
('1111', 'Isan', 'aaaed2417888d4246e38db8d8d338bd2');
-- --------------------------------------------------------
--
-- Table structure for table `pembeli`
--
CREATE TABLE IF NOT EXISTS `pembeli` (
`id_pembeli` char(12) NOT NULL,
`nama_pembeli` varchar(25) NOT NULL,
`telepon` char(12) NOT NULL,
`alamat` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `pembeli`
--
INSERT INTO `pembeli` (`id_pembeli`, `nama_pembeli`, `telepon`, `alamat`) VALUES
('1122', 'Adila', '0878889990', 'Pondok Pinang'),
('1133', 'Ita', '08922233399', 'Pamulang');
-- --------------------------------------------------------
--
-- Table structure for table `penjualan`
--
CREATE TABLE IF NOT EXISTS `penjualan` (
`no_nota` char(12) NOT NULL,
`tgl_penjualan` varchar(20) NOT NULL,
`kode_barang` char(8) NOT NULL,
`nama_barang` varchar(20) NOT NULL,
`kategori` varchar(25) NOT NULL,
`jmh` int(11) NOT NULL,
`harga` int(11) NOT NULL,
`diskon` int(11) NOT NULL,
`total` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `penjualan`
--
INSERT INTO `penjualan` (`no_nota`, `tgl_penjualan`, `kode_barang`, `nama_barang`, `kategori`, `jmh`, `harga`, `diskon`, `total`) VALUES
('F0001', '2020-06-10', '0898989', 'Tunik', 'Ladies Wear', 3, 150000, 5, 427500);
-- --------------------------------------------------------
--
-- Table structure for table `persediaan`
--
CREATE TABLE IF NOT EXISTS `persediaan` (
`kode_barang` char(8) NOT NULL,
`nama_barang` varchar(20) NOT NULL,
`kategori` varchar(25) NOT NULL,
`qty` int(10) NOT NULL,
`tgl_input` date NOT NULL,
`id_karyawan` char(12) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `persediaan`
--
INSERT INTO `persediaan` (`kode_barang`, `nama_barang`, `kategori`, `qty`, `tgl_input`, `id_karyawan`) VALUES
('0888888', 'pasminah', 'Jilbab', 100, '2020-05-31', '1234'),
('0898989', 'Tunik', 'Ladies Wear', 50, '2020-05-31', '1234'),
('9898989', 'Kemeja Koko', 'Mens Wear', 150, '2020-03-20', '1234');
-- --------------------------------------------------------
--
-- Table structure for table `transaksi`
--
CREATE TABLE IF NOT EXISTS `transaksi` (
`no_nota` char(12) NOT NULL,
`id_pembeli` char(12) NOT NULL,
`tgl_transaksi` date NOT NULL,
`total` int(11) NOT NULL,
`bayar` int(11) NOT NULL,
`kembali` int(11) NOT NULL,
`id_kasir` char(12) NOT NULL,
`nama` varchar(25) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `transaksi`
--
INSERT INTO `transaksi` (`no_nota`, `id_pembeli`, `tgl_transaksi`, `total`, `bayar`, `kembali`, `id_kasir`, `nama`) VALUES
('F0001', 'null', '2020-06-10', 427500, 450000, 22500, '1111', 'Isan');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `karyawan`
--
ALTER TABLE `karyawan`
ADD PRIMARY KEY (`id_karyawan`);
--
-- Indexes for table `kasir`
--
ALTER TABLE `kasir`
ADD PRIMARY KEY (`id_kasir`);
--
-- Indexes for table `pembeli`
--
ALTER TABLE `pembeli`
ADD PRIMARY KEY (`id_pembeli`);
--
-- Indexes for table `penjualan`
--
ALTER TABLE `penjualan`
ADD PRIMARY KEY (`no_nota`),
ADD KEY `kode_barang` (`kode_barang`);
--
-- Indexes for table `persediaan`
--
ALTER TABLE `persediaan`
ADD PRIMARY KEY (`kode_barang`),
ADD KEY `id_karyawan` (`id_karyawan`);
--
-- Indexes for table `transaksi`
--
ALTER TABLE `transaksi`
ADD KEY `no_nota` (`no_nota`),
ADD KEY `id_pembeli` (`id_pembeli`),
ADD KEY `id_kasir` (`id_kasir`);
--
-- Constraints for dumped tables
--
--
-- Constraints for table `penjualan`
--
ALTER TABLE `penjualan`
ADD CONSTRAINT `penjualan_ibfk_1` FOREIGN KEY (`kode_barang`) REFERENCES `persediaan` (`kode_barang`);
--
-- Constraints for table `persediaan`
--
ALTER TABLE `persediaan`
ADD CONSTRAINT `persediaan_ibfk_1` FOREIGN KEY (`id_karyawan`) REFERENCES `karyawan` (`id_karyawan`);
--
-- Constraints for table `transaksi`
--
ALTER TABLE `transaksi`
ADD CONSTRAINT `transaksi_ibfk_1` FOREIGN KEY (`no_nota`) REFERENCES `penjualan` (`no_nota`),
ADD CONSTRAINT `transaksi_ibfk_3` FOREIGN KEY (`id_kasir`) REFERENCES `kasir` (`id_kasir`);
/*!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 */;
|
CREATE TABLE baseball(
team_name VARCHAR(15) PRIMARY KEY,
play_total NUMBER,
win NUMBER,
lose NUMBER,
same NUMBER,
WinPoint NUMBER(5),
difference NUMBER,
recentTen VARCHAR2(30),
conti VARCHAR2(10),
home VARCHAR2(20),
visit VARCHAR2(10)
);
SELECT * FROM baseball;
commit;
INSERT INTO baseball test values ('test', 150,90,50,10,0.15,3,7,3,2,2)
|
1.
select *
from xx_orders
where total_amount > 350;
2.
select *
from xx_orders
where status != 'CLOSED';
3.
select *
from xx_address
where address_id BETWEEN 10 and 20;
4.
select *
from xx_customers
where customer_name like '%Corp.';
5.
select *
from xx_orders
where warehouse_id in (1,2); |
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 10.1.8-MariaDB - mariadb.org binary distribution
-- Server OS: Win32
-- HeidiSQL Version: 9.3.0.4984
-- --------------------------------------------------------
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8mb4 */;
/*!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' */;
use halsalla;
-- Dumping structure for table guh15.companies
DROP TABLE IF EXISTS `companies`;
CREATE TABLE IF NOT EXISTS `companies` (
`CompanyID` int(10) NOT NULL,
`CompanyName` varchar(25) NOT NULL,
`CompanyAddress` varchar(75) DEFAULT NULL,
`CompanyCountry` varchar(25) DEFAULT NULL,
PRIMARY KEY (`CompanyID`),
UNIQUE KEY `CompanyName_U` (`CompanyName`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- Dumping data for table guh15.companies: ~0 rows (approximately)
/*!40000 ALTER TABLE `companies` DISABLE KEYS */;
/*!40000 ALTER TABLE `companies` ENABLE KEYS */;
-- Dumping structure for table guh15.jobs
DROP TABLE IF EXISTS `jobs`;
CREATE TABLE IF NOT EXISTS `jobs` (
`JobID` int(10) NOT NULL,
`JobDescription` varchar(75) NOT NULL,
`JobActive` tinyint(1) NOT NULL,
`JobStartDate` date DEFAULT NULL,
`JobEndDate` date DEFAULT NULL,
`JobUploadDate` date DEFAULT NULL,
`JobValue` int(10) DEFAULT NULL,
`JobDist` smallint(10) DEFAULT NULL,
`JobDifficulty` smallint(3) DEFAULT NULL,
PRIMARY KEY (`JobID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- Dumping data for table guh15.jobs: ~0 rows (approximately)
/*!40000 ALTER TABLE `jobs` DISABLE KEYS */;
/*!40000 ALTER TABLE `jobs` ENABLE KEYS */;
-- Dumping structure for table guh15.jobs_completed
DROP TABLE IF EXISTS `jobs_completed`;
CREATE TABLE IF NOT EXISTS `jobs_completed` (
`JobID` int(10) NOT NULL AUTO_INCREMENT,
`JobDescription` varchar(75) DEFAULT NULL,
`JobStartDate` date DEFAULT NULL,
`JobEndDate` date DEFAULT NULL,
`JobUploadDate` date DEFAULT NULL,
`JobValue` int(10) DEFAULT NULL,
`JobCompleteDate` date DEFAULT NULL,
`JobDist` smallint(10) DEFAULT NULL,
`JobDifficulty` smallint(3) DEFAULT NULL,
PRIMARY KEY (`JobID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
-- Dumping data for table guh15.jobs_completed: ~0 rows (approximately)
/*!40000 ALTER TABLE `jobs_completed` DISABLE KEYS */;
/*!40000 ALTER TABLE `jobs_completed` ENABLE KEYS */;
-- Dumping structure for table guh15.ranks
DROP TABLE IF EXISTS `ranks`;
CREATE TABLE IF NOT EXISTS `ranks` (
`RankID` int(10) NOT NULL,
`RankName` varchar(25) NOT NULL,
`RankDescription` varchar(75) NOT NULL,
PRIMARY KEY (`RankID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- Dumping data for table guh15.ranks: ~9 rows (approximately)
/*!40000 ALTER TABLE `ranks` DISABLE KEYS */;
REPLACE INTO `ranks` (`RankID`, `RankName`, `RankDescription`) VALUES
(1, 'Newbie', 'Beginner'),
(2, 'Clonetrooper', 'Beginner+1'),
(3, 'Padawan', ''),
(4, 'Clonetrooper', ''),
(5, 'Jedi', ''),
(6, 'Jedi Knight', ''),
(7, 'Jedi Master', ''),
(8, 'Jedi Sage', ''),
(9, 'Skywalker', '');
/*!40000 ALTER TABLE `ranks` ENABLE KEYS */;
-- Dumping structure for table guh15.useronjob
DROP TABLE IF EXISTS `useronjob`;
CREATE TABLE IF NOT EXISTS `useronjob` (
`JobID` int(10) DEFAULT NULL,
`UserID` int(10) DEFAULT NULL,
`DateJoined` date DEFAULT NULL,
`DateLeft` date DEFAULT NULL,
KEY `JobID_FK` (`JobID`),
KEY `UserID_FK` (`UserID`),
CONSTRAINT `JobID_FK` FOREIGN KEY (`JobID`) REFERENCES `jobs` (`JobID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- Dumping data for table guh15.useronjob: ~0 rows (approximately)
/*!40000 ALTER TABLE `useronjob` DISABLE KEYS */;
/*!40000 ALTER TABLE `useronjob` ENABLE KEYS */;
-- Dumping structure for table guh15.users
DROP TABLE IF EXISTS `users`;
CREATE TABLE IF NOT EXISTS `users` (
`UserID` int(10) NOT NULL AUTO_INCREMENT,
`Username` varchar(25) DEFAULT NULL,
`UserPassword` varchar(32) DEFAULT NULL,
`UserEmail` varchar(25) DEFAULT NULL,
`RankID` int(10) DEFAULT NULL,
PRIMARY KEY (`UserID`),
UNIQUE KEY `UserEmail_U` (`UserEmail`),
UNIQUE KEY `Username_U` (`Username`),
KEY `RankID_FK` (`RankID`),
CONSTRAINT `RankID_FK` FOREIGN KEY (`RankID`) REFERENCES `ranks` (`RankID`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;
-- Dumping data for table guh15.users: ~5 rows (approximately)
/*!40000 ALTER TABLE `users` DISABLE KEYS */;
REPLACE INTO `users` (`UserID`, `Username`, `UserPassword`, `UserEmail`, `RankID`) VALUES
(1, 'Theo', '5f17dd871dacc61834234a9cd5aa375d', 'theo-c@live.co.uk', 1),
(4, 'Theoc', '5f17dd871dacc61834234a9cd5aa375d', 'theo-cc@live.co.uk', 1),
(5, 'Theocc', '5f17dd871dacc61834234a9cd5aa375d', 'theo-dcc@live.co.uk', 1),
(6, 'theo3', '5f17dd871dacc61834234a9cd5aa375d', 'theo3@test.com', 1),
(7, 'josh', '5f4dcc3b5aa765d61d8327deb882cf99', 'josh@josh.net', 1);
/*!40000 ALTER TABLE `users` ENABLE KEYS */;
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
--
-- PostgreSQL database dump
--
-- Dumped from database version 10.5
-- Dumped by pg_dump version 10.5 (Debian 10.5-1.pgdg90+1)
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET client_min_messages = warning;
SET row_security = off;
SET default_tablespace = '';
SET default_with_oids = false;
--
-- Name: company; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.company (
code character varying(100),
name character varying(255)
);
ALTER TABLE public.company OWNER TO postgres;
--
-- Data for Name: company; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.company (code, name) FROM stdin;
MQ Envoy Air
NK Spirit AirLines
OH PSA Airlines Inc.
OO SkyWest Airlines Inc.
UA United Air Lines Inc.
WN Southwest Airlines Co.
9E Endeavor Air Inc.
AA American Airlines Inc.
AS Alaska Airlines Inc.
\.
--
-- PostgreSQL database dump complete
--
|
--This system stored procedure closes the current server log and starts a new one
--the old logs are available through the management tools.
--However, EXEC master.dbo.xp_readerrorlog will not pick up any errors for the dashboard
--NB CHECK THE LOG FOR ERRORS BEFORE RUNNING THIS.
EXEC sp_cycle_errorlog |
alter table "public"."projects" rename column "links" to "urls";
|
ALTER TABLE TB_DOUBT
ALTER COLUMN TITLE VARCHAR(150) NOT NULL; |
1. user
id
username
password
email
2. post
id
content : string
image :
support : int
oppose : int
user : [{username, id}]
comments : [{comment, user, createTime:}]
createTime: |
insert into first_table (a, b, c, field_1, field_2) values(1, 2, 3, 'first_val1', 'first_val2'); |
ALTER TABLE "skills" DROP COLUMN IF EXISTS "player_can_change_value";
ALTER TABLE "skills" DROP COLUMN IF EXISTS "formula_parent_ids";
ALTER TABLE "game_rules" DROP COLUMN IF EXISTS "base_perk_points";
ALTER TABLE "game_rules" DROP COLUMN IF EXISTS "min_level";
ALTER TABLE "game_rules" DROP COLUMN IF EXISTS "max_level";
ALTER TABLE "game_sessions" DROP COLUMN IF EXISTS "primary_stat_points";
ALTER TABLE "game_sessions" DROP COLUMN IF EXISTS "secondary_stat_points";
DROP TABLE IF EXISTS "game_session_races";
DROP TABLE IF EXISTS "game_session_stats";
DROP TABLE IF EXISTS "game_session_stat_categories";
DROP TABLE IF EXISTS "items__stats"; |
SELECT * FROM KNOWLEDGES
ORDER BY INSERT_DATETIME %s;
|
ALTER TABLE "APP"."PART_COL_STATS" ADD COLUMN "BIT_VECTOR" BLOB;
ALTER TABLE "APP"."TAB_COL_STATS" ADD COLUMN "BIT_VECTOR" BLOB;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.