<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://www.edegan.com/mediawiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=RavaliKruthiventi</id>
	<title>edegan.com - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://www.edegan.com/mediawiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=RavaliKruthiventi"/>
	<link rel="alternate" type="text/html" href="http://www.edegan.com/wiki/Special:Contributions/RavaliKruthiventi"/>
	<updated>2026-05-22T21:13:30Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.34.2</generator>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Web_Server_Documentation&amp;diff=12429</id>
		<title>Web Server Documentation</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Web_Server_Documentation&amp;diff=12429"/>
		<updated>2016-11-07T22:05:46Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: /* = Semantic Mediawiki Extensions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: McNair Admin]]&lt;br /&gt;
&lt;br /&gt;
=Old Notes (from Alex Jiang)=&lt;br /&gt;
&lt;br /&gt;
== Installing Ubuntu aka Trying RAID 10 (2/15/2016) ==&lt;br /&gt;
&lt;br /&gt;
Some general configuration options:&lt;br /&gt;
* hostname: McNairWebServ&lt;br /&gt;
* user full name: McNair Center&lt;br /&gt;
* username: mcnair&lt;br /&gt;
* don't encrypt home directory&lt;br /&gt;
* manual partitioning (see below for configuration of RAID)&lt;br /&gt;
* no automatic updates&lt;br /&gt;
* software: LAMP stack&lt;br /&gt;
&lt;br /&gt;
Sahil and I tried to configure RAID 10 using the software RAID option in the installer, which is documented [https://help.ubuntu.com/community/Installation/SoftwareRAID#Partitioning_the_disk here]. We put two 64 GB swap space partitions on the first two hard drives, and created two ext4 partitions that took up the rest of the space on those two drives. For the other two drives, we used a single ext4 partition for each drive. For all of the ext4 partitions, we set the bootable flag to &amp;quot;on.&amp;quot; Then we chose to configure the software RAID, created a new MD device, and chose RAID10 with 2 active devices and 2 spare devices. For the active devices, we chose the two ext4 partitions on the first two hard drives, and for the spare devices, we chose the two ext4 partitions on the other two hard drives. But then the installation process fails when the GRUB boot loader can't be installed, because the GUID partition tables (GPT) need a designated, small (1 MB is enough) partition for the GRUB bootloader.&lt;br /&gt;
&lt;br /&gt;
So we started partitioning from scratch, but with only two hard drives for a RAID1 array. In the first drive, there are three partitions: one 1 MB partition reserved for the bootloader, one 64 GB swap partition, and the rest of the drive as an ext4 partition for the filesystem. In the second drive, there are two partitions: one 1 MB partition reserved for the bootloader and the rest of the drive as an ext4 partition for the filesystem. Then we made two software RAID devices, both with one with 2 active devices and 0 spare devices. The first RAID device had both of the bootloader partitions as the active devices, and the second RAID device had both of the ext4 filesystem partitions as the active devices. Then we set the first RAID device to &amp;quot;use as ext4&amp;quot; and the mount as &amp;quot;/boot&amp;quot; and the second RAID device as &amp;quot;use as ext4&amp;quot; and the mount as &amp;quot;/&amp;quot; and then continued with the installation. This time, it failed to install the kernel.&lt;br /&gt;
&lt;br /&gt;
I guessed that, because the 1 MB RAID device was made first, that the kernel tried to install itself to that device and failed. So I went back to the partitioner and set the first RAID device to &amp;quot;do not use&amp;quot; and then tried the installation process again. It prompted me a couple of times warning me that the old filesystem would be overwritten, but I continued the installation regardless. But then the GRUB boot loader failed, even if we tried not installing it to the master boot record (MBR) and installing it to &amp;quot;dev/md0&amp;quot; or installing it to &amp;quot;dev/md0_raid1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Configuring RAID 1 on Web Server (2/17/2016) ==&lt;br /&gt;
&lt;br /&gt;
The first RAID device (/dev/md0) we set to use as an ext4 filesystem and mounted /boot to it, and the second RAID device (/dev/md127) we set to use as an ext4 filesystem and mounted / to it (we tried this before, but it failed to install the kernel). This time, it failed to install the bootloader, but it never prompted me to choose where to install the bootloader (usually it asks whether you'd like to install the bootloader to the master boot record).&lt;br /&gt;
&lt;br /&gt;
'''Second partitioning attempt:'''&lt;br /&gt;
&lt;br /&gt;
First hard disk (/dev/sda):&lt;br /&gt;
* 10 MB partition, use as reserved BIOS boot area, bootable flag off&lt;br /&gt;
* 64 GB partition, use as swap space&lt;br /&gt;
* rest of the space partition, use as ext4 filesystem, mount point /, bootable flag off&lt;br /&gt;
&lt;br /&gt;
Second hard disk (/dev/sdb):&lt;br /&gt;
* 10 MB partition, use as reserved BIOS boot area, bootable flag off&lt;br /&gt;
* rest of the space partition, use as ext4 filesystem, mount point /, bootable flag off&lt;br /&gt;
&lt;br /&gt;
Write partition changes to disk and then start configuring software RAID:&lt;br /&gt;
&lt;br /&gt;
* First RAID device (/dev/md0): RAID1, 2 active devices (/dev/sda3 and /dev/sdb2), 0 spare devices&lt;br /&gt;
* Second RAID device (/dev/md1): RAID1, 2 active devices (/dev/sda1 and /dev/sdb1), 0 spare devices&lt;br /&gt;
* first RAID device partition: use as ext4 filesystem, mount point /&lt;br /&gt;
* second RAID device partition: use as ext4 filesystem, mount point /boot, format data on the partition&lt;br /&gt;
&lt;br /&gt;
Failed to install GRUB bootloader on a hard disk (again).&lt;br /&gt;
&lt;br /&gt;
Next attempt:&lt;br /&gt;
First RAID device (/dev/md0): use as ext4 filesystem, mount point /, format data on the partition&lt;br /&gt;
Second RAID device (/dev/md1): erase data on partition, use as &amp;quot;do not use&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Next attempt:&lt;br /&gt;
Redo the RAID devices so that the first device (/dev/md0): RAID1, 2 active devices (/dev/sda1 and /dev/sdb1), 0 spare devices, and the second RAID device (/dev/md1): RAID1, 2 active devices (/dev/sda3 and /dev/sdb2), 0 spare devices. Then configure the RAID devices:&lt;br /&gt;
&lt;br /&gt;
* first RAID device partition: use as ext4 filesystem, mount point /boot, format data on the partition&lt;br /&gt;
* second RAID device partition: use as ext4 filesystem, mount point /, format data on the partition&lt;br /&gt;
&lt;br /&gt;
New idea: ditch the idea of RAID on the boot partitions (we'll put the bootloader on one of the boot partitions and then we can try to set up RAID once we've got the thing booting into Linux), so leave the partitions as above (&amp;quot;Second Partitioning Attempt&amp;quot;). Only make one software RAID device (/dev/md0): RAID1, 2 active devices (/dev/sda3 and /dev/sdb2), 0 spare devices. Then configure the first RAID device partition: use as ext4 filesystem, mount point /, format data on the partition.&lt;br /&gt;
&lt;br /&gt;
'''Third partitioning attempt:'''&lt;br /&gt;
&lt;br /&gt;
First hard disk (/dev/sda):&lt;br /&gt;
* 10 MB partition, use as reserved BIOS boot area, bootable flag off&lt;br /&gt;
* 32 GB partition, use as swap space&lt;br /&gt;
* rest of the space partition, use as ext4 filesystem, mount point /, bootable flag off&lt;br /&gt;
&lt;br /&gt;
Second hard disk (/dev/sdb):&lt;br /&gt;
* 10 MB partition, use as reserved BIOS boot area, bootable flag off&lt;br /&gt;
* 32 GB partition, use as swap space&lt;br /&gt;
* rest of the space partition, use as ext4 filesystem, mount point /, bootable flag off&lt;br /&gt;
&lt;br /&gt;
One RAID device (/dev/md0): RAID1, 2 active devices (/dev/sda3 and /dev/sdb3), 0 spare devices. set partition: use as ext4 filesystem, mount point /&lt;br /&gt;
&lt;br /&gt;
'''Fourth partitioning attempt:'''&lt;br /&gt;
&lt;br /&gt;
First hard disk (/dev/sda):&lt;br /&gt;
* 10 MB partition, use as reserved BIOS boot area, bootable flag off&lt;br /&gt;
* 32 GB partition, use as swap space&lt;br /&gt;
* rest of the space partition, use as ext4 filesystem, mount point /, bootable flag off&lt;br /&gt;
&lt;br /&gt;
Second hard disk (/dev/sdb):&lt;br /&gt;
* 10 MB partition, use as reserved BIOS boot area, bootable flag off&lt;br /&gt;
* 32 GB partition, use as swap space&lt;br /&gt;
* rest of the space partition, use as ext4 filesystem, mount point /, bootable flag off&lt;br /&gt;
&lt;br /&gt;
First RAID device (/dev/md0): RAID1, 2 active devices (/dev/sda3 and /dev/sdb3), 0 spare devices. set partition: use as ext4 filesystem, mount point /&lt;br /&gt;
&lt;br /&gt;
Second RAID device (/dev/md1): RAID1, 2 active devices (/dev/sda1 and /dev/sdb1), 0 spare devices. set partition: use as ext4 filesystem, mount point /boot&lt;br /&gt;
&lt;br /&gt;
Third RAID device (/dev/md2): RAID0, 2 active devices (/dev/sda2 and /dev/sdb2). set partition: use as swap area&lt;br /&gt;
&lt;br /&gt;
'''Fifth partitioning attempt (made sure all software RAID devices are removed, delete all partitions, create new partition tables):'''&lt;br /&gt;
&lt;br /&gt;
First hard disk (/dev/sda):&lt;br /&gt;
* 10 MB partition, use as reserved BIOS boot area, bootable flag off&lt;br /&gt;
* 32 GB partition, use as swap space&lt;br /&gt;
* rest of the space partition, use as ext4 filesystem, mount point /, bootable flag off&lt;br /&gt;
&lt;br /&gt;
Second hard disk (/dev/sdb):&lt;br /&gt;
* 10 MB partition, use as reserved BIOS boot area, bootable flag off&lt;br /&gt;
* 32 GB partition, use as swap space&lt;br /&gt;
* rest of the space partition, use as ext4 filesystem, mount point /, bootable flag off&lt;br /&gt;
&lt;br /&gt;
First RAID device (/dev/md0): RAID1, 2 active devices (/dev/sda3 and /dev/sdb3), 0 spare devices. set partition: use as ext4 filesystem, mount point /&lt;br /&gt;
&lt;br /&gt;
install GRUB bootloader to /dev/sda and /dev/sdb. It works!&lt;br /&gt;
&lt;br /&gt;
== Network Configuration (2/22/2016) ==&lt;br /&gt;
&lt;br /&gt;
As with the [[Test_Web_Server_Documentation|test web server]], network configuration can be annoying. First, I had to figure out the right LAN port on the mobo by plugging the RJ45 cable in and waiting for the LED to light up (it took about 5 seconds and a couple of tries). Then I went to the terminal to check on the network interfaces:&lt;br /&gt;
&lt;br /&gt;
 $ ifconfig&lt;br /&gt;
 $ ifconfig -a&lt;br /&gt;
 $ sudo ifconfig eth0 up&lt;br /&gt;
 $ cat /etc/network/interfaces&lt;br /&gt;
&lt;br /&gt;
After bringing up the eth0 interface (it's down if it's not listed in the output of ifconfig), I then modified /etc/network/interfaces to set up the eth0 interface:&lt;br /&gt;
&lt;br /&gt;
 $ sudo vi /etc/network/interfaces&lt;br /&gt;
&lt;br /&gt;
And added these lines:&lt;br /&gt;
&lt;br /&gt;
 auto eth0&lt;br /&gt;
 iface eth0 inet dhcp&lt;br /&gt;
     dns-nameservers 8.8.8.8 8.8.4.4&lt;br /&gt;
&lt;br /&gt;
Then I used ifdown/ifup to reconfigure the interface:&lt;br /&gt;
&lt;br /&gt;
 $ sudo ifdown eth0&lt;br /&gt;
 $ sudo ifup eth0&lt;br /&gt;
&lt;br /&gt;
There's a couple of configuration files that you can check to make sure that the network configured correctly (I compared them to the corresponding files in the test web server):&lt;br /&gt;
&lt;br /&gt;
 $ hostname -I&lt;br /&gt;
 $ cat /etc/resolv.conf&lt;br /&gt;
 $ cat /etc/hosts&lt;br /&gt;
 $ cat /var/lib/dhcp/dhclient.eth0.leases&lt;br /&gt;
&lt;br /&gt;
Then I checked if it was connected to the internet:&lt;br /&gt;
&lt;br /&gt;
 $ ping google.com&lt;br /&gt;
 $ sudo apt-get update&lt;br /&gt;
&lt;br /&gt;
I got a &amp;quot;GPG error: http://security.ubuntu.com trusty-security InRelease: Clearsigned file isn't valid, got 'NODATA' (does the network require authentication?)&amp;quot; message on the apt-get update a couple of times, so I tried sudo ifdown eth0 and sudo ifup eth0 a couple of times. Then I rebooted the machine and tried to update the package manager again, and it still didn't work.&lt;br /&gt;
&lt;br /&gt;
These results seem familiar; I think I had the same error when I tried to connect the test web server to the internet before Ed filed the ticket with the IT help desk, which suggests that we may have given the wrong MAC address or IT messed up the configuration. Still, I checked all of the configuration files. I only noted a couple of differences between the test web server network interface and this web server network interface:&lt;br /&gt;
&lt;br /&gt;
# The IP addresses are different. The test web server has an address that starts with 128, but this webserver has an address that starts with 10. (Ed thinks this is a sign that this webserver's IP address limits it to the Rice network).&lt;br /&gt;
# The subnet masks are different. The test web server has a subnet mask that ends in 240, but this webserver has a mask that ends in 0.&lt;br /&gt;
# The test webserver has a DNS domain name (i.e. the output of hostname -d) of attlocal.net. This webserver doesn't have one. I tried adding it (by editing /etc/hosts), but that change alone didn't help.&lt;br /&gt;
&lt;br /&gt;
Interesting side note: going into the mobo BIOS menu, under &amp;quot;Server Mgmt&amp;quot; there is a submenu &amp;quot;BMC network configuration&amp;quot; that shows the MAC address for &amp;quot;DM_LAN1&amp;quot; as ending in de, whereas the MAC address for eth0 ends in dc (otherwise, the two MAC addresses are the same). So maybe the mobo is interfering with the MAC address? But changing DM_LAN1's Config Address source from &amp;quot;Previous State&amp;quot; to &amp;quot;DynamicBmcDhcp&amp;quot; doesn't fix the problem (and upon reboot, it switches back to Previous State).&lt;br /&gt;
&lt;br /&gt;
Turns out IT just configured the network IP addresses incorrectly. Ed and I talked to the IT desk on Tuesday and we got new IP addresses.&lt;br /&gt;
&lt;br /&gt;
== Installing Software (2/24/2016) ==&lt;br /&gt;
&lt;br /&gt;
Now that we have internet connection, we can start getting packages:&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get update&lt;br /&gt;
 $ sudo apt-get upgrade&lt;br /&gt;
&lt;br /&gt;
Since I didn't install the SSH server in the beginning, I'll go ahead and install the openssh-server package now:&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install openssh-server&lt;br /&gt;
&lt;br /&gt;
Backup the SSH server config file:&lt;br /&gt;
&lt;br /&gt;
 $ sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.original&lt;br /&gt;
&lt;br /&gt;
== Installing Mediawiki (3/7/2016) ==&lt;br /&gt;
&lt;br /&gt;
As with the [[Test Web Server Documentation#Installing Mediawiki (1/4/16)|test web server]], I followed the steps from [http://www.mediawiki.org/wiki/Manual:Running_MediaWiki_on_Ubuntu this page] on installing Mediawiki.&lt;br /&gt;
&lt;br /&gt;
Make a directory for the stable version of Mediawiki (1.26.2), which isn't available through apt-get, so we're downloading the official tarball!&lt;br /&gt;
&lt;br /&gt;
 $ mkdir ~/Downloads&lt;br /&gt;
 $ cd ~/Downloads&lt;br /&gt;
 $ wget https://releases.wikimedia.org/mediawiki/1.26/mediawiki-1.26.2.tar.gz&lt;br /&gt;
 $ tar -xvzf /pathtofile/mediawiki-*.tar.gz&lt;br /&gt;
&lt;br /&gt;
Copy the extracted files to /var/lib/mediawiki:&lt;br /&gt;
&lt;br /&gt;
 $ sudo mkdir /var/lib/mediawiki&lt;br /&gt;
 $ sudo mv mediawiki-1.26.2/* /var/lib/mediawiki&lt;br /&gt;
&lt;br /&gt;
Then set up the mediawiki directory:&lt;br /&gt;
&lt;br /&gt;
 $ cd /var/www/html&lt;br /&gt;
 $ sudo ln -s /var/lib/mediawiki mediawiki&lt;br /&gt;
&lt;br /&gt;
Now point a browser to http://[ip_address]/mediawiki/mw-config/index.php and configure the Mediawiki site as follows:&lt;br /&gt;
&lt;br /&gt;
Choose both &amp;quot;your language&amp;quot; and the &amp;quot;wiki language&amp;quot; to be English and continue to the next page. Make sure that all of the environmental checks pass before continuing to the next page. Leave the &amp;quot;database host&amp;quot; as localhost and change &amp;quot;database name&amp;quot; to mcnair. Leave &amp;quot;database table prefix&amp;quot; empty and &amp;quot;database username&amp;quot; as root. Set the &amp;quot;database password&amp;quot; to whatever the password for the MySQL user was set as during installation and then continue to the next page. Check the box for &amp;quot;Use this account for installation&amp;quot; and choose InnoDB for &amp;quot;Storage Engine&amp;quot; and choose Binary for &amp;quot;Database character set&amp;quot; and continue to the next page. Set the name of the wiki as McNair Center and let the project namespace be the same as the wiki name. For the administrator account, set the username, password, and email. Choose to subscribe to the release announcements mailing list if you provide an email, and choose to answer more questions.&lt;br /&gt;
&lt;br /&gt;
Choose &amp;quot;open wiki&amp;quot; for the user rights profile. Choose &amp;quot;no license footer&amp;quot;. Uncheck the box for &amp;quot;enable outbound email&amp;quot; and choose which skin you'd like to use. For extensions, leave them all unchecked. Leave &amp;quot;enable file uploads&amp;quot; unchecked. Don't change the Logo URL and don't check &amp;quot;enable Instant Commons&amp;quot;. For caching, choose &amp;quot;no caching&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Copy the downloaded LocalSettings.php configuration file onto the webserver in the root directory of the mediawiki installation: /var/lib/mediawiki. Then point a browser to  http://[ip_address]/mediawiki and see your new site!&lt;br /&gt;
&lt;br /&gt;
== Short URLs (3/7/2016) ==&lt;br /&gt;
&lt;br /&gt;
Same as for the [[Test Web Server Documentation#Short URLs (1/27/16)|test web server]].&lt;br /&gt;
&lt;br /&gt;
== Labeled Section Transclusion (3/7/2016) ==&lt;br /&gt;
&lt;br /&gt;
Same as for the [[Test Web Server Documentation#Labeled Section Transclusion (1/25/16)|test web server]].&lt;br /&gt;
&lt;br /&gt;
== Responsive Design (3/7/2016) ==&lt;br /&gt;
&lt;br /&gt;
Same as for the [[Test Web Server Documentation#Responsive Design (1/25/16)|test web server]].&lt;br /&gt;
&lt;br /&gt;
== Mediawiki CSS changes (3/9/2016) ==&lt;br /&gt;
&lt;br /&gt;
Started working with Julia on the mediawiki website CSS design (color scheme and typography on [[Website Design]]). Ran into a couple of problems:&lt;br /&gt;
&lt;br /&gt;
* If you upload a file to Slack and want to download it from its URL using the wget command on command-line, make sure you get a public link from the person who uploaded the file, otherwise the file won't be downloaded. (I was trying to figure out why the McNair logo that Julia sent me on slack wasn't showing up on the website, but it turns out I just needed a public link to the file, which should look something like https://files.slack.com/files-pri/T0JA2A9Q9-F0RL0G4BZ/mcnair.png?pub_secret=30505f5d02).&lt;br /&gt;
* the @font-face rule doesn't seem to work in Common.css... I never got past this problem. I think the .tff file for the font may have failed to download onto the server properly, but I haven't found a good way to test for that case. Also, I tried using an absolute URL (i.e. http://128.42.44.180/mediawiki/resources/assets/fonts/franklin-gothic-book.ttf) when specifying the @font-face rule, but it doesn't seem to help. Using an absolute URL to the slack file public URL (i.e. https://files.slack.com/files-pri/T0JA2A9Q9-F0RLDB3G8/download/franklin-gothic-book.ttf?pub_secret=327cdaaeb8) doesn't seem to work either.&lt;br /&gt;
&lt;br /&gt;
Well, I don't really trust the file to download onto the webserver properly from terminal, so I got an SFTP client and used that to copy the .ttf file onto the webserver. Still no dice.&lt;br /&gt;
&lt;br /&gt;
== Setting up users (3/11/2016) ==&lt;br /&gt;
&lt;br /&gt;
First, getting the ImportUsers extension for bulk account creation (using a CSV). Downloading the extension is as follows:&lt;br /&gt;
&lt;br /&gt;
 $ cd ~/Downloads&lt;br /&gt;
 $ wget https://extdist.wmflabs.org/dist/extensions/ImportUsers-REL1_26-0fe9e22.tar.gz&lt;br /&gt;
 $ tar -xzvf ImportUsers-REL1_26-0fe9e22.tar.gz&lt;br /&gt;
 $ cd /var/lib/mediawiki/extensions&lt;br /&gt;
 $ cp -r ~/Downloads/ImportUsers ./ImportUsers&lt;br /&gt;
&lt;br /&gt;
Then edit LocalSettings.php and add this line:&lt;br /&gt;
&lt;br /&gt;
 require_once(&amp;quot;$IP/extensions/ImportUsers/ImportUsers.php&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Then we just have to make a CSV with columns for username, password, email, real name, and user groups (optional). More info on the [https://www.mediawiki.org/wiki/Extension:ImportUsers extension documentation page].&lt;br /&gt;
&lt;br /&gt;
I made a small little CSV to test the ImportUsers extensions:&lt;br /&gt;
 &lt;br /&gt;
 user1,pass1,user1@example.com,Dummy One&lt;br /&gt;
 user2,pass2,user2@example.com,Dummy Two&lt;br /&gt;
 user3,pass3,user3@example.com,Dummy Three&lt;br /&gt;
&lt;br /&gt;
After importing the users, run a maintenance script from the command line to update new user statistics:&lt;br /&gt;
&lt;br /&gt;
 $ cd /var/lib/mediawiki/maintenance&lt;br /&gt;
 $ php initSiteStats.php&lt;br /&gt;
&lt;br /&gt;
But this runs into some errors ([https://www.mediawiki.org/wiki/Manual:Maintenance_scripts this page] suggests setting the MW_INSTALL_PATH environment variable, but I can't find a good way to do that). I looked into the error messages and found [http://stackoverflow.com/questions/21257589/ubuntu-typing-php-in-terminal-shows-a-lot-of-errors this SO post] which seems to cover it. I don't know whether we need SNMP, so I decided to just install it to be safe:&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install snmp&lt;br /&gt;
&lt;br /&gt;
And the error messages go away. Alternatively, you can disable the snmp module for PHP with:&lt;br /&gt;
&lt;br /&gt;
 $ sudo php5dismod snmp&lt;br /&gt;
&lt;br /&gt;
We also want to limit account creation to sysops only [https://www.mediawiki.org/wiki/Manual:Preventing_access#Restrict_account_creation as done here]. To do this, edit LocalSettings.php and add these lines:&lt;br /&gt;
 &lt;br /&gt;
 # Prevent new user registrations except by sysops&lt;br /&gt;
 $wgGroupPermissions['*']['createaccount'] = false;&lt;br /&gt;
&lt;br /&gt;
== BibTex citations with BibManager (3/11/2016) ==&lt;br /&gt;
&lt;br /&gt;
The [https://www.mediawiki.org/wiki/Extension:BibManager BibManager extension] isn't actively maintained, but it doesn't seem like it needs to be constantly updated to accommodate for new features and was last updated for Mediawiki version 1.22, which isn't too bad.&lt;br /&gt;
&lt;br /&gt;
Let's test on the test web server first.&lt;br /&gt;
&lt;br /&gt;
== Bibtex citations with Bibtex (3/14/2016) ==&lt;br /&gt;
&lt;br /&gt;
The [https://www.mediawiki.org/wiki/Extension:Bibtex Bibtex extension] doesn't look like it's being actively maintained, but it might work. I'm testing it on the test web server alongside BibManager.&lt;br /&gt;
&lt;br /&gt;
== Ghost vs. WordPress (3/14/2016) ==&lt;br /&gt;
&lt;br /&gt;
So it looks like we may choose Ghost over WordPress. We need something self-hostable, and ideally open-source (and both Ghost and WP satisfy those two conditions). However, I hear Ghost is more lightweight, so if we're not looking for a lot of extra functionality from third-party plugins, Ghost may be the better choice. I'm setting up Ghost on the [[Test Web Server Documentation#Installing Ghost (3/14/2016)|test web server]], so we'll see how it goes...&lt;br /&gt;
&lt;br /&gt;
Turns out Ghost+apache is kinda difficult (definitely more difficult than WordPress+Apache), so let's just try WordPress.&lt;br /&gt;
&lt;br /&gt;
The [[Test Web Server Documentation#Installing WordPress (3/14/2016)|test web server]] had a pretty easy time installing WordPress alongside the existing mediawiki site, so it seems that we'll use WP for the blog on this web server as well.&lt;br /&gt;
&lt;br /&gt;
== Infoboxes (3/16/2016) ==&lt;br /&gt;
&lt;br /&gt;
I decide to follow the instructions on [http://trog.qgl.org/20140923/setting-up-infobox-templates-in-mediawiki-v1-23/ this post]. Let's see how it goes.&lt;br /&gt;
&lt;br /&gt;
Step 1: &lt;br /&gt;
&lt;br /&gt;
Download and install the [https://www.mediawiki.org/wiki/Extension:Scribunto Scribunto extension].&lt;br /&gt;
&lt;br /&gt;
 cd ~/Downloads&lt;br /&gt;
 $ wget https://extdist.wmflabs.org/dist/extensions/Scribunto-REL1_26-9fd4e64.tar.gz&lt;br /&gt;
 $ tar -xzvf Scribunto-REL1_26-9fd4e64.tar.gz&lt;br /&gt;
 $ cd /var/lib/mediawiki/extensions&lt;br /&gt;
 $ cp -r ~/Downloads/Scribunto ./Scribunto&lt;br /&gt;
&lt;br /&gt;
Add these two lines to LocalSettings.php:&lt;br /&gt;
 &lt;br /&gt;
 require_once(&amp;quot;$IP/extensions/Scribunto/Scribunto.php&amp;quot;);&lt;br /&gt;
 $wgScribuntoDefaultEngine = 'luastandalone';&lt;br /&gt;
&lt;br /&gt;
And set execute permissions for Lua binaries in the extension:&lt;br /&gt;
&lt;br /&gt;
 $ chmod a+x /var/lib/mediawiki/extensions/Scribunto/engines/LuaStandalone/binaries/lua_5_1_5_linux_64_generic/lua&lt;br /&gt;
&lt;br /&gt;
In addition, check that the PCRE version is at least 8.10 (preferable at least 8.33), PHP's mbstring extension is enabled, and PHP's proc_open function is not disabled using a phpinfo page.&lt;br /&gt;
&lt;br /&gt;
Step 2:&lt;br /&gt;
&lt;br /&gt;
Copy Wikipedia's [https://en.wikipedia.org/w/index.php?title=MediaWiki:Common.css&amp;amp;action=edit Common.css] stylesheet into the wiki's Common.css stylesheet.&lt;br /&gt;
&lt;br /&gt;
Step 3:&lt;br /&gt;
&lt;br /&gt;
Export the Infobox template from Wikipedia from the [https://en.wikipedia.org/wiki/Special:Export Special:Export] page. In the &amp;quot;add pages manually&amp;quot; text box, type Template:Infobox and then check all three checkboxes below: &amp;quot;Include only the current revision, not the full history&amp;quot;, &amp;quot;Include templates&amp;quot;, and &amp;quot;Save as file&amp;quot;, then click the Export button and save the XML file.&lt;br /&gt;
&lt;br /&gt;
Step 4:&lt;br /&gt;
&lt;br /&gt;
Import that XML file onto the wiki using the Special:Import page. Choose the &amp;quot;Import to default locations&amp;quot; option. &lt;br /&gt;
&lt;br /&gt;
Step 5:&lt;br /&gt;
&lt;br /&gt;
Test your Infobox template by creating a new page on the mediawiki and using the Infobox template. I used the following code to test:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 {{Infobox&lt;br /&gt;
 |title = An amazing Infobox&lt;br /&gt;
 |header1 = It works!&lt;br /&gt;
 |label2 = Configured by&lt;br /&gt;
 |data2 = trog&lt;br /&gt;
 |label3 = Web&lt;br /&gt;
 |data3 = http://trog.qgl.org/20140923/setting-up-infobox-templates-in-mediawiki-v1-23/&lt;br /&gt;
 }}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Debugging:&lt;br /&gt;
&lt;br /&gt;
I seem to have the template functionality working, but it's not styled properly. So let's try exporting and importing Wikipedia's Common.css stylesheet instead of just copying and pasting. And let's also try exporting and importing Wikipedia's Common.js script into the wiki.&lt;br /&gt;
&lt;br /&gt;
Wait, I fixed it by just removing the custom CSS code that I had from trying to change the font-face. If those two things conflict, we may have issues down the line...&lt;br /&gt;
&lt;br /&gt;
I also uncovered something about HTMLTidy that may impact how well templates from Wikipedia run on our mediawiki [https://www.mediawiki.org/wiki/Manual:Using_content_from_Wikipedia#HTMLTidy]. It looks like we can either [https://www.mediawiki.org/wiki/Manual:$wgTidyConfig set an option] in LocalSettings.php to enable HTMLTidy or we can [https://en.wikipedia.org/wiki/Wikipedia:WikiProject_Transwiki get the templates from another source].&lt;br /&gt;
&lt;br /&gt;
== Installing WordPress (3/16/2016) ==&lt;br /&gt;
&lt;br /&gt;
Same as the [[Test Web Server Documentation#Installing WordPress (3/14/2016)|test web server]]&lt;br /&gt;
&lt;br /&gt;
== Google Analytics for Mediawiki and WordPress (3/16/2016) ==&lt;br /&gt;
&lt;br /&gt;
There's an [https://www.mediawiki.org/wiki/Extension:Google_Analytics_Integration extension] for google analytics integration on Mediawiki, and it seems to have pretty robust support (you can exclude specific pages or categories from analytics, and you exclude user groups from analytics too).&lt;br /&gt;
&lt;br /&gt;
There's an open-source alternative to google analytics called [http://www.openwebanalytics.com/ Open Web Analytics], and there's [https://www.mediawiki.org/wiki/Extension:Open_Web_Analytics a Mediawiki extension] for that too. Looks like Open Web Analytics has some cool extra features too like click heatmaps...&lt;br /&gt;
&lt;br /&gt;
WordPress appears to have support for both Google Analytics and Open Web Analytics.&lt;br /&gt;
&lt;br /&gt;
After looking around for other open-source alternatives, it appears Piwik is another strong contender. There's a demo of Piwik [http://demo.piwik.org/ here] and a demo of OWA [http://demo.openwebanalytics.com/owa/ here]. There's [https://www.mediawiki.org/wiki/Extension:Piwik_Integration a Mediawiki extension] for Piwik integration, and it seems to be pretty well maintained. WordPress also appears to support Piwik as well.&lt;br /&gt;
&lt;br /&gt;
== Open-source Analytics Alternatives (3/21/2016) ==&lt;br /&gt;
&lt;br /&gt;
Might as well try to keep everything open-source. I'll try out Open Web Analytics (OWA) on the test web server to play around with the interface.&lt;br /&gt;
&lt;br /&gt;
OWA isn't going to work, as noted on the [[Test Web Server Documentation#Installing Open Web Analytics (3/21/2016)|test web server page]]. So let's try the [https://www.mediawiki.org/wiki/Extension:Piwik_Integration extension] for Piwik too.&lt;br /&gt;
&lt;br /&gt;
So at least Piwik works. But here's the counterargument: in five years, which is more likely to be well-supported and maintained, Piwik or Google Analytics? And with the obvious answer being Google Analytics, we should just use that.&lt;br /&gt;
&lt;br /&gt;
== Back to Google Analytics (3/23/2016) ==&lt;br /&gt;
&lt;br /&gt;
We made a new Google Analytics account! admin@mcnaircenter.org 9million&lt;br /&gt;
&lt;br /&gt;
I'm going to go ahead and test the Google Analytics integration extension on the [[Test Web Server Documentation#Installing Google Analytics (3/23/2016)|test web server]].&lt;br /&gt;
&lt;br /&gt;
== Cargo vs Semantic Mediawiki? (3/25/2016) ==&lt;br /&gt;
&lt;br /&gt;
I recently learned about Cargo, which claims to be a more straightforward version of SMW. see the [https://www.semantic-mediawiki.org/w/images/9/9a/Cargo_and_the_future_of_SMW.pdf slides] of a presentation given at the spring 2015 SMWCon, and the Cargo extension page's [https://www.mediawiki.org/wiki/Extension:Cargo/Cargo_and_Semantic_MediaWiki comparison] page. The lead author of the extension, Yaron, is a member of the SMW community, and so Cargo is likely pretty legit. Now I'm not sure which is better...&lt;br /&gt;
&lt;br /&gt;
After some more deliberation, I think Cargo wins. Cargo's querying syntax is more like SQL (which is actually useful and pretty easy to learn), and Cargo also doesn't deal with all of the property declarations that Semantic Mediawiki requires. Also, Cargo has native support for JSON exporting, while SMW doesn't (and any extensions that provide such support are pretty stale).&lt;br /&gt;
&lt;br /&gt;
== CSS Design (4/22/2016) ==&lt;br /&gt;
&lt;br /&gt;
Couple of notes on where &amp;quot;obvious&amp;quot; (hint: not so obvious) things are. (Note, all paths that follow are relative to the Mediawiki root directory, which should be in /var/lib/mediawiki).&lt;br /&gt;
&lt;br /&gt;
First, the logo for the page is defined in LocalSettings.php. Look for the $wgLogo variable. I used a FTP client to upload new logos, but you could use a terminal and wget the file if you have it online somewhere.&lt;br /&gt;
&lt;br /&gt;
For changing CSS rules, I just used the Chrome inspector (F12 or right-click and choose &amp;quot;Inspect&amp;quot; from the option menu) to understand which CSS selector rules were being applied and which were being overridden. You can also make small CSS changes in the inspector that are lost upon refreshing the page, but can be useful for experimenting with different colors, positions, etc. &lt;br /&gt;
&lt;br /&gt;
You can use $ grep -r &amp;quot;[words_to_search_for]&amp;quot; on the command line to search for something (a CSS hex color code, a CSS selector, etc.) in all files and directories in the current directory. I usually used this while in the skins/Vector directory to make finding CSS properties easier.&lt;br /&gt;
&lt;br /&gt;
The CSS is actually written in LESS, which is an extension of CSS syntax that allows you to do nested properties, variables, etc. The skins/Vector/variables.less file has all the variables, which are prefixed with an at sign (@) in LESS. WARNING: if you try to use a variable name that hasn't been defined (due to a typo, for example), ALL of the CSS/LESS will stop working. The plus side is that its obvious that you messed up. The down side is that it may not be obvious where exactly you messed up, so make small changes and refresh the browser view constantly. Other than that, most of the other LESS rules are in the skins/Vector/components folder. The file names are fairly reasonable: common.less defines rules common to the entire page, navigation.less defines the area on the left sidebar, personalMenu.less defines the set of links in the top right corner for the user account, footer.less defines the footer. There's also another file in skins/Vector that is useful for understanding how everything comes together: VectorTemplate.php, which contains the high level HTML structure.&lt;br /&gt;
&lt;br /&gt;
== To-do list ==&lt;br /&gt;
&lt;br /&gt;
* extra namespaces for IntraACL stuff. see [https://www.mediawiki.org/wiki/Manual:Using_custom_namespaces here]&lt;br /&gt;
* inconsistent styling: links aren't orange on special pages, fonts and links are the default in the &amp;quot;mobile&amp;quot; view&lt;br /&gt;
&lt;br /&gt;
== In progress ==&lt;br /&gt;
&lt;br /&gt;
* Mediawiki CSS styling - '''custom fonts fixed, need new designs/layouts'''&lt;br /&gt;
* analytics - '''getting GA installed for WordPress blogs, need port 21 opened'''&lt;br /&gt;
&lt;br /&gt;
== Potential pitfalls ==&lt;br /&gt;
&lt;br /&gt;
* It looks like the Common.css stylesheet has to be exactly the same as the Wikipedia Common.css stylesheet for the Wikipedia Infobox templates to be styled properly, because I solved the problem of the infoboxes being styled incorrectly by deleting all of the custom CSS that we had written for the mediawiki.&lt;br /&gt;
&lt;br /&gt;
==Installing and configuring the Backup Drive==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=New Notes=&lt;br /&gt;
&lt;br /&gt;
==Mounting the RDP==&lt;br /&gt;
&lt;br /&gt;
 apt-get install cifs-utils&lt;br /&gt;
&lt;br /&gt;
 mount -t cifs //128.42.44.182/mcnair /mnt/rdp -o user=researcher,domain=ad.mcnaircenter.org&lt;br /&gt;
&lt;br /&gt;
==Mobile Interface==&lt;br /&gt;
&lt;br /&gt;
===Folders===&lt;br /&gt;
* The folders with the source code can be found at&lt;br /&gt;
&lt;br /&gt;
   /var/lib/mediawiki/extensions/MobileFrontend/minerva.less&lt;br /&gt;
&lt;br /&gt;
===Tips===&lt;br /&gt;
* Using a [http://www.mobilephoneemulator.com/ mobile emulator] helps understand what the mobile interface is going to look like before deploying onto Production.&lt;br /&gt;
&lt;br /&gt;
==User Access 6/15/2016 ==&lt;br /&gt;
'''Objective'''&lt;br /&gt;
&lt;br /&gt;
Accounts are to be vetted before they are created. We would like to have a queue of account creation requests, that must be approved before they can be created, given that we allow users to edit public wiki pages.&lt;br /&gt;
*Helpful Material:&lt;br /&gt;
** [https://www.mediawiki.org/wiki/Extension:ConfirmAccount Mediawiki Documentation ]&lt;br /&gt;
** mcnair@rice.edu -account that will approve account creation.&lt;br /&gt;
&lt;br /&gt;
Steps Followed:&lt;br /&gt;
'''Package Installation Steps:'''&lt;br /&gt;
* cd extensions/&lt;br /&gt;
* wget https://extdist.wmflabs.org/dist/extensions/ConfirmAccount-REL1_26-d6e2f46.tar.gz&lt;br /&gt;
* tar -xzf ConfirmAccount-REL1_26-d6e2f46.tar.gz &lt;br /&gt;
* sudo pear install mail&lt;br /&gt;
* sudo pear install net_smtp&lt;br /&gt;
The above steps ensure that email notification system is set up, and that the Confirm Account package is set up. &lt;br /&gt;
&lt;br /&gt;
'''Configuring Confirm Accounts php files '''&lt;br /&gt;
The following files need to be updated as follows:&lt;br /&gt;
*ConfirmAccount.php:&lt;br /&gt;
 Set the confirmation queues to point to folders that www-data has access to:&lt;br /&gt;
// For changing path in accountreqs&lt;br /&gt;
$wgConfirmAccountPathAR = $IP . &amp;quot;/images/accountreqs&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// For changing path in accountcreds&lt;br /&gt;
$wgConfirmAccountPathAC = $IP . &amp;quot;/images/accountcreds&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
*ConfirmAccount.config.php&lt;br /&gt;
 Change the directories to those defined in ConfirmAccount.php&lt;br /&gt;
 $wgFileStore['accountreqs']['directory'] : $wgConfirmAccountPathAR,&lt;br /&gt;
 $wgFileStore['accountcreds']['directory'] : $wgConfirmAccountPathAC,&lt;br /&gt;
&lt;br /&gt;
* LocalSettings.php:&lt;br /&gt;
&lt;br /&gt;
 $wgEnableEmail = true;&lt;br /&gt;
 $wgEmergencyContact = &amp;quot;mcnair@rice.edu&amp;quot;;&lt;br /&gt;
 $wgPasswordSender = &amp;quot;mcnair@rice.edu&amp;quot;;&lt;br /&gt;
 # User Account Confirmation&lt;br /&gt;
 require_once &amp;quot;$IP/extensions/ConfirmAccount/ConfirmAccount.php&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$wgSMTP = array(&lt;br /&gt;
        'host' =&amp;gt; 'ssl://smtp.mail.rice.edu',&lt;br /&gt;
        'IDHost' =&amp;gt; '128.42.44.22',&lt;br /&gt;
        'port' =&amp;gt; 465,&lt;br /&gt;
        'username' =&amp;gt; 'mcnair@rice.edu',&lt;br /&gt;
        'password' =&amp;gt; '*********',&lt;br /&gt;
        'auth' =&amp;gt; true&lt;br /&gt;
);&lt;br /&gt;
 $wgConfirmAccountContact = 'mcnair@rice.edu';&lt;br /&gt;
&lt;br /&gt;
''' Updating the Wiki'''&lt;br /&gt;
* cd /var/lib/mediawiki/maintenance&lt;br /&gt;
* php update.php&lt;br /&gt;
&lt;br /&gt;
[[admin_classification::IT Build| ]]&lt;br /&gt;
&lt;br /&gt;
== Mediawiki extensions ==&lt;br /&gt;
&lt;br /&gt;
== Semantic Mediawiki Extensions ==&lt;br /&gt;
The SMW extension installation process requires a composer.phar to be installed. All further installations to SMW are done through the composer.phar.&lt;br /&gt;
&lt;br /&gt;
==== Installing Mediawiki Composer.phar ====&lt;br /&gt;
Here is the mediawiki link: [https://getcomposer.org/doc/00-intro.md#installation-nix]&lt;br /&gt;
&lt;br /&gt;
==== Installing Extension : Semantic Results Formats ====&lt;br /&gt;
* Here is the link to the installation process : &lt;br /&gt;
* Here is the command to be run in the Mediawiki root folder (var/lib/mediawiki)&lt;br /&gt;
 php composer.phar require --update-no-dev mediawiki/semantic-result-formats &amp;quot;2.*&amp;quot;&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Web_Server_Documentation&amp;diff=12426</id>
		<title>Web Server Documentation</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Web_Server_Documentation&amp;diff=12426"/>
		<updated>2016-11-07T21:46:08Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: /* New Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: McNair Admin]]&lt;br /&gt;
&lt;br /&gt;
=Old Notes (from Alex Jiang)=&lt;br /&gt;
&lt;br /&gt;
== Installing Ubuntu aka Trying RAID 10 (2/15/2016) ==&lt;br /&gt;
&lt;br /&gt;
Some general configuration options:&lt;br /&gt;
* hostname: McNairWebServ&lt;br /&gt;
* user full name: McNair Center&lt;br /&gt;
* username: mcnair&lt;br /&gt;
* don't encrypt home directory&lt;br /&gt;
* manual partitioning (see below for configuration of RAID)&lt;br /&gt;
* no automatic updates&lt;br /&gt;
* software: LAMP stack&lt;br /&gt;
&lt;br /&gt;
Sahil and I tried to configure RAID 10 using the software RAID option in the installer, which is documented [https://help.ubuntu.com/community/Installation/SoftwareRAID#Partitioning_the_disk here]. We put two 64 GB swap space partitions on the first two hard drives, and created two ext4 partitions that took up the rest of the space on those two drives. For the other two drives, we used a single ext4 partition for each drive. For all of the ext4 partitions, we set the bootable flag to &amp;quot;on.&amp;quot; Then we chose to configure the software RAID, created a new MD device, and chose RAID10 with 2 active devices and 2 spare devices. For the active devices, we chose the two ext4 partitions on the first two hard drives, and for the spare devices, we chose the two ext4 partitions on the other two hard drives. But then the installation process fails when the GRUB boot loader can't be installed, because the GUID partition tables (GPT) need a designated, small (1 MB is enough) partition for the GRUB bootloader.&lt;br /&gt;
&lt;br /&gt;
So we started partitioning from scratch, but with only two hard drives for a RAID1 array. In the first drive, there are three partitions: one 1 MB partition reserved for the bootloader, one 64 GB swap partition, and the rest of the drive as an ext4 partition for the filesystem. In the second drive, there are two partitions: one 1 MB partition reserved for the bootloader and the rest of the drive as an ext4 partition for the filesystem. Then we made two software RAID devices, both with one with 2 active devices and 0 spare devices. The first RAID device had both of the bootloader partitions as the active devices, and the second RAID device had both of the ext4 filesystem partitions as the active devices. Then we set the first RAID device to &amp;quot;use as ext4&amp;quot; and the mount as &amp;quot;/boot&amp;quot; and the second RAID device as &amp;quot;use as ext4&amp;quot; and the mount as &amp;quot;/&amp;quot; and then continued with the installation. This time, it failed to install the kernel.&lt;br /&gt;
&lt;br /&gt;
I guessed that, because the 1 MB RAID device was made first, that the kernel tried to install itself to that device and failed. So I went back to the partitioner and set the first RAID device to &amp;quot;do not use&amp;quot; and then tried the installation process again. It prompted me a couple of times warning me that the old filesystem would be overwritten, but I continued the installation regardless. But then the GRUB boot loader failed, even if we tried not installing it to the master boot record (MBR) and installing it to &amp;quot;dev/md0&amp;quot; or installing it to &amp;quot;dev/md0_raid1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Configuring RAID 1 on Web Server (2/17/2016) ==&lt;br /&gt;
&lt;br /&gt;
The first RAID device (/dev/md0) we set to use as an ext4 filesystem and mounted /boot to it, and the second RAID device (/dev/md127) we set to use as an ext4 filesystem and mounted / to it (we tried this before, but it failed to install the kernel). This time, it failed to install the bootloader, but it never prompted me to choose where to install the bootloader (usually it asks whether you'd like to install the bootloader to the master boot record).&lt;br /&gt;
&lt;br /&gt;
'''Second partitioning attempt:'''&lt;br /&gt;
&lt;br /&gt;
First hard disk (/dev/sda):&lt;br /&gt;
* 10 MB partition, use as reserved BIOS boot area, bootable flag off&lt;br /&gt;
* 64 GB partition, use as swap space&lt;br /&gt;
* rest of the space partition, use as ext4 filesystem, mount point /, bootable flag off&lt;br /&gt;
&lt;br /&gt;
Second hard disk (/dev/sdb):&lt;br /&gt;
* 10 MB partition, use as reserved BIOS boot area, bootable flag off&lt;br /&gt;
* rest of the space partition, use as ext4 filesystem, mount point /, bootable flag off&lt;br /&gt;
&lt;br /&gt;
Write partition changes to disk and then start configuring software RAID:&lt;br /&gt;
&lt;br /&gt;
* First RAID device (/dev/md0): RAID1, 2 active devices (/dev/sda3 and /dev/sdb2), 0 spare devices&lt;br /&gt;
* Second RAID device (/dev/md1): RAID1, 2 active devices (/dev/sda1 and /dev/sdb1), 0 spare devices&lt;br /&gt;
* first RAID device partition: use as ext4 filesystem, mount point /&lt;br /&gt;
* second RAID device partition: use as ext4 filesystem, mount point /boot, format data on the partition&lt;br /&gt;
&lt;br /&gt;
Failed to install GRUB bootloader on a hard disk (again).&lt;br /&gt;
&lt;br /&gt;
Next attempt:&lt;br /&gt;
First RAID device (/dev/md0): use as ext4 filesystem, mount point /, format data on the partition&lt;br /&gt;
Second RAID device (/dev/md1): erase data on partition, use as &amp;quot;do not use&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Next attempt:&lt;br /&gt;
Redo the RAID devices so that the first device (/dev/md0): RAID1, 2 active devices (/dev/sda1 and /dev/sdb1), 0 spare devices, and the second RAID device (/dev/md1): RAID1, 2 active devices (/dev/sda3 and /dev/sdb2), 0 spare devices. Then configure the RAID devices:&lt;br /&gt;
&lt;br /&gt;
* first RAID device partition: use as ext4 filesystem, mount point /boot, format data on the partition&lt;br /&gt;
* second RAID device partition: use as ext4 filesystem, mount point /, format data on the partition&lt;br /&gt;
&lt;br /&gt;
New idea: ditch the idea of RAID on the boot partitions (we'll put the bootloader on one of the boot partitions and then we can try to set up RAID once we've got the thing booting into Linux), so leave the partitions as above (&amp;quot;Second Partitioning Attempt&amp;quot;). Only make one software RAID device (/dev/md0): RAID1, 2 active devices (/dev/sda3 and /dev/sdb2), 0 spare devices. Then configure the first RAID device partition: use as ext4 filesystem, mount point /, format data on the partition.&lt;br /&gt;
&lt;br /&gt;
'''Third partitioning attempt:'''&lt;br /&gt;
&lt;br /&gt;
First hard disk (/dev/sda):&lt;br /&gt;
* 10 MB partition, use as reserved BIOS boot area, bootable flag off&lt;br /&gt;
* 32 GB partition, use as swap space&lt;br /&gt;
* rest of the space partition, use as ext4 filesystem, mount point /, bootable flag off&lt;br /&gt;
&lt;br /&gt;
Second hard disk (/dev/sdb):&lt;br /&gt;
* 10 MB partition, use as reserved BIOS boot area, bootable flag off&lt;br /&gt;
* 32 GB partition, use as swap space&lt;br /&gt;
* rest of the space partition, use as ext4 filesystem, mount point /, bootable flag off&lt;br /&gt;
&lt;br /&gt;
One RAID device (/dev/md0): RAID1, 2 active devices (/dev/sda3 and /dev/sdb3), 0 spare devices. set partition: use as ext4 filesystem, mount point /&lt;br /&gt;
&lt;br /&gt;
'''Fourth partitioning attempt:'''&lt;br /&gt;
&lt;br /&gt;
First hard disk (/dev/sda):&lt;br /&gt;
* 10 MB partition, use as reserved BIOS boot area, bootable flag off&lt;br /&gt;
* 32 GB partition, use as swap space&lt;br /&gt;
* rest of the space partition, use as ext4 filesystem, mount point /, bootable flag off&lt;br /&gt;
&lt;br /&gt;
Second hard disk (/dev/sdb):&lt;br /&gt;
* 10 MB partition, use as reserved BIOS boot area, bootable flag off&lt;br /&gt;
* 32 GB partition, use as swap space&lt;br /&gt;
* rest of the space partition, use as ext4 filesystem, mount point /, bootable flag off&lt;br /&gt;
&lt;br /&gt;
First RAID device (/dev/md0): RAID1, 2 active devices (/dev/sda3 and /dev/sdb3), 0 spare devices. set partition: use as ext4 filesystem, mount point /&lt;br /&gt;
&lt;br /&gt;
Second RAID device (/dev/md1): RAID1, 2 active devices (/dev/sda1 and /dev/sdb1), 0 spare devices. set partition: use as ext4 filesystem, mount point /boot&lt;br /&gt;
&lt;br /&gt;
Third RAID device (/dev/md2): RAID0, 2 active devices (/dev/sda2 and /dev/sdb2). set partition: use as swap area&lt;br /&gt;
&lt;br /&gt;
'''Fifth partitioning attempt (made sure all software RAID devices are removed, delete all partitions, create new partition tables):'''&lt;br /&gt;
&lt;br /&gt;
First hard disk (/dev/sda):&lt;br /&gt;
* 10 MB partition, use as reserved BIOS boot area, bootable flag off&lt;br /&gt;
* 32 GB partition, use as swap space&lt;br /&gt;
* rest of the space partition, use as ext4 filesystem, mount point /, bootable flag off&lt;br /&gt;
&lt;br /&gt;
Second hard disk (/dev/sdb):&lt;br /&gt;
* 10 MB partition, use as reserved BIOS boot area, bootable flag off&lt;br /&gt;
* 32 GB partition, use as swap space&lt;br /&gt;
* rest of the space partition, use as ext4 filesystem, mount point /, bootable flag off&lt;br /&gt;
&lt;br /&gt;
First RAID device (/dev/md0): RAID1, 2 active devices (/dev/sda3 and /dev/sdb3), 0 spare devices. set partition: use as ext4 filesystem, mount point /&lt;br /&gt;
&lt;br /&gt;
install GRUB bootloader to /dev/sda and /dev/sdb. It works!&lt;br /&gt;
&lt;br /&gt;
== Network Configuration (2/22/2016) ==&lt;br /&gt;
&lt;br /&gt;
As with the [[Test_Web_Server_Documentation|test web server]], network configuration can be annoying. First, I had to figure out the right LAN port on the mobo by plugging the RJ45 cable in and waiting for the LED to light up (it took about 5 seconds and a couple of tries). Then I went to the terminal to check on the network interfaces:&lt;br /&gt;
&lt;br /&gt;
 $ ifconfig&lt;br /&gt;
 $ ifconfig -a&lt;br /&gt;
 $ sudo ifconfig eth0 up&lt;br /&gt;
 $ cat /etc/network/interfaces&lt;br /&gt;
&lt;br /&gt;
After bringing up the eth0 interface (it's down if it's not listed in the output of ifconfig), I then modified /etc/network/interfaces to set up the eth0 interface:&lt;br /&gt;
&lt;br /&gt;
 $ sudo vi /etc/network/interfaces&lt;br /&gt;
&lt;br /&gt;
And added these lines:&lt;br /&gt;
&lt;br /&gt;
 auto eth0&lt;br /&gt;
 iface eth0 inet dhcp&lt;br /&gt;
     dns-nameservers 8.8.8.8 8.8.4.4&lt;br /&gt;
&lt;br /&gt;
Then I used ifdown/ifup to reconfigure the interface:&lt;br /&gt;
&lt;br /&gt;
 $ sudo ifdown eth0&lt;br /&gt;
 $ sudo ifup eth0&lt;br /&gt;
&lt;br /&gt;
There's a couple of configuration files that you can check to make sure that the network configured correctly (I compared them to the corresponding files in the test web server):&lt;br /&gt;
&lt;br /&gt;
 $ hostname -I&lt;br /&gt;
 $ cat /etc/resolv.conf&lt;br /&gt;
 $ cat /etc/hosts&lt;br /&gt;
 $ cat /var/lib/dhcp/dhclient.eth0.leases&lt;br /&gt;
&lt;br /&gt;
Then I checked if it was connected to the internet:&lt;br /&gt;
&lt;br /&gt;
 $ ping google.com&lt;br /&gt;
 $ sudo apt-get update&lt;br /&gt;
&lt;br /&gt;
I got a &amp;quot;GPG error: http://security.ubuntu.com trusty-security InRelease: Clearsigned file isn't valid, got 'NODATA' (does the network require authentication?)&amp;quot; message on the apt-get update a couple of times, so I tried sudo ifdown eth0 and sudo ifup eth0 a couple of times. Then I rebooted the machine and tried to update the package manager again, and it still didn't work.&lt;br /&gt;
&lt;br /&gt;
These results seem familiar; I think I had the same error when I tried to connect the test web server to the internet before Ed filed the ticket with the IT help desk, which suggests that we may have given the wrong MAC address or IT messed up the configuration. Still, I checked all of the configuration files. I only noted a couple of differences between the test web server network interface and this web server network interface:&lt;br /&gt;
&lt;br /&gt;
# The IP addresses are different. The test web server has an address that starts with 128, but this webserver has an address that starts with 10. (Ed thinks this is a sign that this webserver's IP address limits it to the Rice network).&lt;br /&gt;
# The subnet masks are different. The test web server has a subnet mask that ends in 240, but this webserver has a mask that ends in 0.&lt;br /&gt;
# The test webserver has a DNS domain name (i.e. the output of hostname -d) of attlocal.net. This webserver doesn't have one. I tried adding it (by editing /etc/hosts), but that change alone didn't help.&lt;br /&gt;
&lt;br /&gt;
Interesting side note: going into the mobo BIOS menu, under &amp;quot;Server Mgmt&amp;quot; there is a submenu &amp;quot;BMC network configuration&amp;quot; that shows the MAC address for &amp;quot;DM_LAN1&amp;quot; as ending in de, whereas the MAC address for eth0 ends in dc (otherwise, the two MAC addresses are the same). So maybe the mobo is interfering with the MAC address? But changing DM_LAN1's Config Address source from &amp;quot;Previous State&amp;quot; to &amp;quot;DynamicBmcDhcp&amp;quot; doesn't fix the problem (and upon reboot, it switches back to Previous State).&lt;br /&gt;
&lt;br /&gt;
Turns out IT just configured the network IP addresses incorrectly. Ed and I talked to the IT desk on Tuesday and we got new IP addresses.&lt;br /&gt;
&lt;br /&gt;
== Installing Software (2/24/2016) ==&lt;br /&gt;
&lt;br /&gt;
Now that we have internet connection, we can start getting packages:&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get update&lt;br /&gt;
 $ sudo apt-get upgrade&lt;br /&gt;
&lt;br /&gt;
Since I didn't install the SSH server in the beginning, I'll go ahead and install the openssh-server package now:&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install openssh-server&lt;br /&gt;
&lt;br /&gt;
Backup the SSH server config file:&lt;br /&gt;
&lt;br /&gt;
 $ sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.original&lt;br /&gt;
&lt;br /&gt;
== Installing Mediawiki (3/7/2016) ==&lt;br /&gt;
&lt;br /&gt;
As with the [[Test Web Server Documentation#Installing Mediawiki (1/4/16)|test web server]], I followed the steps from [http://www.mediawiki.org/wiki/Manual:Running_MediaWiki_on_Ubuntu this page] on installing Mediawiki.&lt;br /&gt;
&lt;br /&gt;
Make a directory for the stable version of Mediawiki (1.26.2), which isn't available through apt-get, so we're downloading the official tarball!&lt;br /&gt;
&lt;br /&gt;
 $ mkdir ~/Downloads&lt;br /&gt;
 $ cd ~/Downloads&lt;br /&gt;
 $ wget https://releases.wikimedia.org/mediawiki/1.26/mediawiki-1.26.2.tar.gz&lt;br /&gt;
 $ tar -xvzf /pathtofile/mediawiki-*.tar.gz&lt;br /&gt;
&lt;br /&gt;
Copy the extracted files to /var/lib/mediawiki:&lt;br /&gt;
&lt;br /&gt;
 $ sudo mkdir /var/lib/mediawiki&lt;br /&gt;
 $ sudo mv mediawiki-1.26.2/* /var/lib/mediawiki&lt;br /&gt;
&lt;br /&gt;
Then set up the mediawiki directory:&lt;br /&gt;
&lt;br /&gt;
 $ cd /var/www/html&lt;br /&gt;
 $ sudo ln -s /var/lib/mediawiki mediawiki&lt;br /&gt;
&lt;br /&gt;
Now point a browser to http://[ip_address]/mediawiki/mw-config/index.php and configure the Mediawiki site as follows:&lt;br /&gt;
&lt;br /&gt;
Choose both &amp;quot;your language&amp;quot; and the &amp;quot;wiki language&amp;quot; to be English and continue to the next page. Make sure that all of the environmental checks pass before continuing to the next page. Leave the &amp;quot;database host&amp;quot; as localhost and change &amp;quot;database name&amp;quot; to mcnair. Leave &amp;quot;database table prefix&amp;quot; empty and &amp;quot;database username&amp;quot; as root. Set the &amp;quot;database password&amp;quot; to whatever the password for the MySQL user was set as during installation and then continue to the next page. Check the box for &amp;quot;Use this account for installation&amp;quot; and choose InnoDB for &amp;quot;Storage Engine&amp;quot; and choose Binary for &amp;quot;Database character set&amp;quot; and continue to the next page. Set the name of the wiki as McNair Center and let the project namespace be the same as the wiki name. For the administrator account, set the username, password, and email. Choose to subscribe to the release announcements mailing list if you provide an email, and choose to answer more questions.&lt;br /&gt;
&lt;br /&gt;
Choose &amp;quot;open wiki&amp;quot; for the user rights profile. Choose &amp;quot;no license footer&amp;quot;. Uncheck the box for &amp;quot;enable outbound email&amp;quot; and choose which skin you'd like to use. For extensions, leave them all unchecked. Leave &amp;quot;enable file uploads&amp;quot; unchecked. Don't change the Logo URL and don't check &amp;quot;enable Instant Commons&amp;quot;. For caching, choose &amp;quot;no caching&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Copy the downloaded LocalSettings.php configuration file onto the webserver in the root directory of the mediawiki installation: /var/lib/mediawiki. Then point a browser to  http://[ip_address]/mediawiki and see your new site!&lt;br /&gt;
&lt;br /&gt;
== Short URLs (3/7/2016) ==&lt;br /&gt;
&lt;br /&gt;
Same as for the [[Test Web Server Documentation#Short URLs (1/27/16)|test web server]].&lt;br /&gt;
&lt;br /&gt;
== Labeled Section Transclusion (3/7/2016) ==&lt;br /&gt;
&lt;br /&gt;
Same as for the [[Test Web Server Documentation#Labeled Section Transclusion (1/25/16)|test web server]].&lt;br /&gt;
&lt;br /&gt;
== Responsive Design (3/7/2016) ==&lt;br /&gt;
&lt;br /&gt;
Same as for the [[Test Web Server Documentation#Responsive Design (1/25/16)|test web server]].&lt;br /&gt;
&lt;br /&gt;
== Mediawiki CSS changes (3/9/2016) ==&lt;br /&gt;
&lt;br /&gt;
Started working with Julia on the mediawiki website CSS design (color scheme and typography on [[Website Design]]). Ran into a couple of problems:&lt;br /&gt;
&lt;br /&gt;
* If you upload a file to Slack and want to download it from its URL using the wget command on command-line, make sure you get a public link from the person who uploaded the file, otherwise the file won't be downloaded. (I was trying to figure out why the McNair logo that Julia sent me on slack wasn't showing up on the website, but it turns out I just needed a public link to the file, which should look something like https://files.slack.com/files-pri/T0JA2A9Q9-F0RL0G4BZ/mcnair.png?pub_secret=30505f5d02).&lt;br /&gt;
* the @font-face rule doesn't seem to work in Common.css... I never got past this problem. I think the .tff file for the font may have failed to download onto the server properly, but I haven't found a good way to test for that case. Also, I tried using an absolute URL (i.e. http://128.42.44.180/mediawiki/resources/assets/fonts/franklin-gothic-book.ttf) when specifying the @font-face rule, but it doesn't seem to help. Using an absolute URL to the slack file public URL (i.e. https://files.slack.com/files-pri/T0JA2A9Q9-F0RLDB3G8/download/franklin-gothic-book.ttf?pub_secret=327cdaaeb8) doesn't seem to work either.&lt;br /&gt;
&lt;br /&gt;
Well, I don't really trust the file to download onto the webserver properly from terminal, so I got an SFTP client and used that to copy the .ttf file onto the webserver. Still no dice.&lt;br /&gt;
&lt;br /&gt;
== Setting up users (3/11/2016) ==&lt;br /&gt;
&lt;br /&gt;
First, getting the ImportUsers extension for bulk account creation (using a CSV). Downloading the extension is as follows:&lt;br /&gt;
&lt;br /&gt;
 $ cd ~/Downloads&lt;br /&gt;
 $ wget https://extdist.wmflabs.org/dist/extensions/ImportUsers-REL1_26-0fe9e22.tar.gz&lt;br /&gt;
 $ tar -xzvf ImportUsers-REL1_26-0fe9e22.tar.gz&lt;br /&gt;
 $ cd /var/lib/mediawiki/extensions&lt;br /&gt;
 $ cp -r ~/Downloads/ImportUsers ./ImportUsers&lt;br /&gt;
&lt;br /&gt;
Then edit LocalSettings.php and add this line:&lt;br /&gt;
&lt;br /&gt;
 require_once(&amp;quot;$IP/extensions/ImportUsers/ImportUsers.php&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Then we just have to make a CSV with columns for username, password, email, real name, and user groups (optional). More info on the [https://www.mediawiki.org/wiki/Extension:ImportUsers extension documentation page].&lt;br /&gt;
&lt;br /&gt;
I made a small little CSV to test the ImportUsers extensions:&lt;br /&gt;
 &lt;br /&gt;
 user1,pass1,user1@example.com,Dummy One&lt;br /&gt;
 user2,pass2,user2@example.com,Dummy Two&lt;br /&gt;
 user3,pass3,user3@example.com,Dummy Three&lt;br /&gt;
&lt;br /&gt;
After importing the users, run a maintenance script from the command line to update new user statistics:&lt;br /&gt;
&lt;br /&gt;
 $ cd /var/lib/mediawiki/maintenance&lt;br /&gt;
 $ php initSiteStats.php&lt;br /&gt;
&lt;br /&gt;
But this runs into some errors ([https://www.mediawiki.org/wiki/Manual:Maintenance_scripts this page] suggests setting the MW_INSTALL_PATH environment variable, but I can't find a good way to do that). I looked into the error messages and found [http://stackoverflow.com/questions/21257589/ubuntu-typing-php-in-terminal-shows-a-lot-of-errors this SO post] which seems to cover it. I don't know whether we need SNMP, so I decided to just install it to be safe:&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install snmp&lt;br /&gt;
&lt;br /&gt;
And the error messages go away. Alternatively, you can disable the snmp module for PHP with:&lt;br /&gt;
&lt;br /&gt;
 $ sudo php5dismod snmp&lt;br /&gt;
&lt;br /&gt;
We also want to limit account creation to sysops only [https://www.mediawiki.org/wiki/Manual:Preventing_access#Restrict_account_creation as done here]. To do this, edit LocalSettings.php and add these lines:&lt;br /&gt;
 &lt;br /&gt;
 # Prevent new user registrations except by sysops&lt;br /&gt;
 $wgGroupPermissions['*']['createaccount'] = false;&lt;br /&gt;
&lt;br /&gt;
== BibTex citations with BibManager (3/11/2016) ==&lt;br /&gt;
&lt;br /&gt;
The [https://www.mediawiki.org/wiki/Extension:BibManager BibManager extension] isn't actively maintained, but it doesn't seem like it needs to be constantly updated to accommodate for new features and was last updated for Mediawiki version 1.22, which isn't too bad.&lt;br /&gt;
&lt;br /&gt;
Let's test on the test web server first.&lt;br /&gt;
&lt;br /&gt;
== Bibtex citations with Bibtex (3/14/2016) ==&lt;br /&gt;
&lt;br /&gt;
The [https://www.mediawiki.org/wiki/Extension:Bibtex Bibtex extension] doesn't look like it's being actively maintained, but it might work. I'm testing it on the test web server alongside BibManager.&lt;br /&gt;
&lt;br /&gt;
== Ghost vs. WordPress (3/14/2016) ==&lt;br /&gt;
&lt;br /&gt;
So it looks like we may choose Ghost over WordPress. We need something self-hostable, and ideally open-source (and both Ghost and WP satisfy those two conditions). However, I hear Ghost is more lightweight, so if we're not looking for a lot of extra functionality from third-party plugins, Ghost may be the better choice. I'm setting up Ghost on the [[Test Web Server Documentation#Installing Ghost (3/14/2016)|test web server]], so we'll see how it goes...&lt;br /&gt;
&lt;br /&gt;
Turns out Ghost+apache is kinda difficult (definitely more difficult than WordPress+Apache), so let's just try WordPress.&lt;br /&gt;
&lt;br /&gt;
The [[Test Web Server Documentation#Installing WordPress (3/14/2016)|test web server]] had a pretty easy time installing WordPress alongside the existing mediawiki site, so it seems that we'll use WP for the blog on this web server as well.&lt;br /&gt;
&lt;br /&gt;
== Infoboxes (3/16/2016) ==&lt;br /&gt;
&lt;br /&gt;
I decide to follow the instructions on [http://trog.qgl.org/20140923/setting-up-infobox-templates-in-mediawiki-v1-23/ this post]. Let's see how it goes.&lt;br /&gt;
&lt;br /&gt;
Step 1: &lt;br /&gt;
&lt;br /&gt;
Download and install the [https://www.mediawiki.org/wiki/Extension:Scribunto Scribunto extension].&lt;br /&gt;
&lt;br /&gt;
 cd ~/Downloads&lt;br /&gt;
 $ wget https://extdist.wmflabs.org/dist/extensions/Scribunto-REL1_26-9fd4e64.tar.gz&lt;br /&gt;
 $ tar -xzvf Scribunto-REL1_26-9fd4e64.tar.gz&lt;br /&gt;
 $ cd /var/lib/mediawiki/extensions&lt;br /&gt;
 $ cp -r ~/Downloads/Scribunto ./Scribunto&lt;br /&gt;
&lt;br /&gt;
Add these two lines to LocalSettings.php:&lt;br /&gt;
 &lt;br /&gt;
 require_once(&amp;quot;$IP/extensions/Scribunto/Scribunto.php&amp;quot;);&lt;br /&gt;
 $wgScribuntoDefaultEngine = 'luastandalone';&lt;br /&gt;
&lt;br /&gt;
And set execute permissions for Lua binaries in the extension:&lt;br /&gt;
&lt;br /&gt;
 $ chmod a+x /var/lib/mediawiki/extensions/Scribunto/engines/LuaStandalone/binaries/lua_5_1_5_linux_64_generic/lua&lt;br /&gt;
&lt;br /&gt;
In addition, check that the PCRE version is at least 8.10 (preferable at least 8.33), PHP's mbstring extension is enabled, and PHP's proc_open function is not disabled using a phpinfo page.&lt;br /&gt;
&lt;br /&gt;
Step 2:&lt;br /&gt;
&lt;br /&gt;
Copy Wikipedia's [https://en.wikipedia.org/w/index.php?title=MediaWiki:Common.css&amp;amp;action=edit Common.css] stylesheet into the wiki's Common.css stylesheet.&lt;br /&gt;
&lt;br /&gt;
Step 3:&lt;br /&gt;
&lt;br /&gt;
Export the Infobox template from Wikipedia from the [https://en.wikipedia.org/wiki/Special:Export Special:Export] page. In the &amp;quot;add pages manually&amp;quot; text box, type Template:Infobox and then check all three checkboxes below: &amp;quot;Include only the current revision, not the full history&amp;quot;, &amp;quot;Include templates&amp;quot;, and &amp;quot;Save as file&amp;quot;, then click the Export button and save the XML file.&lt;br /&gt;
&lt;br /&gt;
Step 4:&lt;br /&gt;
&lt;br /&gt;
Import that XML file onto the wiki using the Special:Import page. Choose the &amp;quot;Import to default locations&amp;quot; option. &lt;br /&gt;
&lt;br /&gt;
Step 5:&lt;br /&gt;
&lt;br /&gt;
Test your Infobox template by creating a new page on the mediawiki and using the Infobox template. I used the following code to test:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 {{Infobox&lt;br /&gt;
 |title = An amazing Infobox&lt;br /&gt;
 |header1 = It works!&lt;br /&gt;
 |label2 = Configured by&lt;br /&gt;
 |data2 = trog&lt;br /&gt;
 |label3 = Web&lt;br /&gt;
 |data3 = http://trog.qgl.org/20140923/setting-up-infobox-templates-in-mediawiki-v1-23/&lt;br /&gt;
 }}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Debugging:&lt;br /&gt;
&lt;br /&gt;
I seem to have the template functionality working, but it's not styled properly. So let's try exporting and importing Wikipedia's Common.css stylesheet instead of just copying and pasting. And let's also try exporting and importing Wikipedia's Common.js script into the wiki.&lt;br /&gt;
&lt;br /&gt;
Wait, I fixed it by just removing the custom CSS code that I had from trying to change the font-face. If those two things conflict, we may have issues down the line...&lt;br /&gt;
&lt;br /&gt;
I also uncovered something about HTMLTidy that may impact how well templates from Wikipedia run on our mediawiki [https://www.mediawiki.org/wiki/Manual:Using_content_from_Wikipedia#HTMLTidy]. It looks like we can either [https://www.mediawiki.org/wiki/Manual:$wgTidyConfig set an option] in LocalSettings.php to enable HTMLTidy or we can [https://en.wikipedia.org/wiki/Wikipedia:WikiProject_Transwiki get the templates from another source].&lt;br /&gt;
&lt;br /&gt;
== Installing WordPress (3/16/2016) ==&lt;br /&gt;
&lt;br /&gt;
Same as the [[Test Web Server Documentation#Installing WordPress (3/14/2016)|test web server]]&lt;br /&gt;
&lt;br /&gt;
== Google Analytics for Mediawiki and WordPress (3/16/2016) ==&lt;br /&gt;
&lt;br /&gt;
There's an [https://www.mediawiki.org/wiki/Extension:Google_Analytics_Integration extension] for google analytics integration on Mediawiki, and it seems to have pretty robust support (you can exclude specific pages or categories from analytics, and you exclude user groups from analytics too).&lt;br /&gt;
&lt;br /&gt;
There's an open-source alternative to google analytics called [http://www.openwebanalytics.com/ Open Web Analytics], and there's [https://www.mediawiki.org/wiki/Extension:Open_Web_Analytics a Mediawiki extension] for that too. Looks like Open Web Analytics has some cool extra features too like click heatmaps...&lt;br /&gt;
&lt;br /&gt;
WordPress appears to have support for both Google Analytics and Open Web Analytics.&lt;br /&gt;
&lt;br /&gt;
After looking around for other open-source alternatives, it appears Piwik is another strong contender. There's a demo of Piwik [http://demo.piwik.org/ here] and a demo of OWA [http://demo.openwebanalytics.com/owa/ here]. There's [https://www.mediawiki.org/wiki/Extension:Piwik_Integration a Mediawiki extension] for Piwik integration, and it seems to be pretty well maintained. WordPress also appears to support Piwik as well.&lt;br /&gt;
&lt;br /&gt;
== Open-source Analytics Alternatives (3/21/2016) ==&lt;br /&gt;
&lt;br /&gt;
Might as well try to keep everything open-source. I'll try out Open Web Analytics (OWA) on the test web server to play around with the interface.&lt;br /&gt;
&lt;br /&gt;
OWA isn't going to work, as noted on the [[Test Web Server Documentation#Installing Open Web Analytics (3/21/2016)|test web server page]]. So let's try the [https://www.mediawiki.org/wiki/Extension:Piwik_Integration extension] for Piwik too.&lt;br /&gt;
&lt;br /&gt;
So at least Piwik works. But here's the counterargument: in five years, which is more likely to be well-supported and maintained, Piwik or Google Analytics? And with the obvious answer being Google Analytics, we should just use that.&lt;br /&gt;
&lt;br /&gt;
== Back to Google Analytics (3/23/2016) ==&lt;br /&gt;
&lt;br /&gt;
We made a new Google Analytics account! admin@mcnaircenter.org 9million&lt;br /&gt;
&lt;br /&gt;
I'm going to go ahead and test the Google Analytics integration extension on the [[Test Web Server Documentation#Installing Google Analytics (3/23/2016)|test web server]].&lt;br /&gt;
&lt;br /&gt;
== Cargo vs Semantic Mediawiki? (3/25/2016) ==&lt;br /&gt;
&lt;br /&gt;
I recently learned about Cargo, which claims to be a more straightforward version of SMW. see the [https://www.semantic-mediawiki.org/w/images/9/9a/Cargo_and_the_future_of_SMW.pdf slides] of a presentation given at the spring 2015 SMWCon, and the Cargo extension page's [https://www.mediawiki.org/wiki/Extension:Cargo/Cargo_and_Semantic_MediaWiki comparison] page. The lead author of the extension, Yaron, is a member of the SMW community, and so Cargo is likely pretty legit. Now I'm not sure which is better...&lt;br /&gt;
&lt;br /&gt;
After some more deliberation, I think Cargo wins. Cargo's querying syntax is more like SQL (which is actually useful and pretty easy to learn), and Cargo also doesn't deal with all of the property declarations that Semantic Mediawiki requires. Also, Cargo has native support for JSON exporting, while SMW doesn't (and any extensions that provide such support are pretty stale).&lt;br /&gt;
&lt;br /&gt;
== CSS Design (4/22/2016) ==&lt;br /&gt;
&lt;br /&gt;
Couple of notes on where &amp;quot;obvious&amp;quot; (hint: not so obvious) things are. (Note, all paths that follow are relative to the Mediawiki root directory, which should be in /var/lib/mediawiki).&lt;br /&gt;
&lt;br /&gt;
First, the logo for the page is defined in LocalSettings.php. Look for the $wgLogo variable. I used a FTP client to upload new logos, but you could use a terminal and wget the file if you have it online somewhere.&lt;br /&gt;
&lt;br /&gt;
For changing CSS rules, I just used the Chrome inspector (F12 or right-click and choose &amp;quot;Inspect&amp;quot; from the option menu) to understand which CSS selector rules were being applied and which were being overridden. You can also make small CSS changes in the inspector that are lost upon refreshing the page, but can be useful for experimenting with different colors, positions, etc. &lt;br /&gt;
&lt;br /&gt;
You can use $ grep -r &amp;quot;[words_to_search_for]&amp;quot; on the command line to search for something (a CSS hex color code, a CSS selector, etc.) in all files and directories in the current directory. I usually used this while in the skins/Vector directory to make finding CSS properties easier.&lt;br /&gt;
&lt;br /&gt;
The CSS is actually written in LESS, which is an extension of CSS syntax that allows you to do nested properties, variables, etc. The skins/Vector/variables.less file has all the variables, which are prefixed with an at sign (@) in LESS. WARNING: if you try to use a variable name that hasn't been defined (due to a typo, for example), ALL of the CSS/LESS will stop working. The plus side is that its obvious that you messed up. The down side is that it may not be obvious where exactly you messed up, so make small changes and refresh the browser view constantly. Other than that, most of the other LESS rules are in the skins/Vector/components folder. The file names are fairly reasonable: common.less defines rules common to the entire page, navigation.less defines the area on the left sidebar, personalMenu.less defines the set of links in the top right corner for the user account, footer.less defines the footer. There's also another file in skins/Vector that is useful for understanding how everything comes together: VectorTemplate.php, which contains the high level HTML structure.&lt;br /&gt;
&lt;br /&gt;
== To-do list ==&lt;br /&gt;
&lt;br /&gt;
* extra namespaces for IntraACL stuff. see [https://www.mediawiki.org/wiki/Manual:Using_custom_namespaces here]&lt;br /&gt;
* inconsistent styling: links aren't orange on special pages, fonts and links are the default in the &amp;quot;mobile&amp;quot; view&lt;br /&gt;
&lt;br /&gt;
== In progress ==&lt;br /&gt;
&lt;br /&gt;
* Mediawiki CSS styling - '''custom fonts fixed, need new designs/layouts'''&lt;br /&gt;
* analytics - '''getting GA installed for WordPress blogs, need port 21 opened'''&lt;br /&gt;
&lt;br /&gt;
== Potential pitfalls ==&lt;br /&gt;
&lt;br /&gt;
* It looks like the Common.css stylesheet has to be exactly the same as the Wikipedia Common.css stylesheet for the Wikipedia Infobox templates to be styled properly, because I solved the problem of the infoboxes being styled incorrectly by deleting all of the custom CSS that we had written for the mediawiki.&lt;br /&gt;
&lt;br /&gt;
==Installing and configuring the Backup Drive==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=New Notes=&lt;br /&gt;
&lt;br /&gt;
==Mounting the RDP==&lt;br /&gt;
&lt;br /&gt;
 apt-get install cifs-utils&lt;br /&gt;
&lt;br /&gt;
 mount -t cifs //128.42.44.182/mcnair /mnt/rdp -o user=researcher,domain=ad.mcnaircenter.org&lt;br /&gt;
&lt;br /&gt;
==Mobile Interface==&lt;br /&gt;
&lt;br /&gt;
===Folders===&lt;br /&gt;
* The folders with the source code can be found at&lt;br /&gt;
&lt;br /&gt;
   /var/lib/mediawiki/extensions/MobileFrontend/minerva.less&lt;br /&gt;
&lt;br /&gt;
===Tips===&lt;br /&gt;
* Using a [http://www.mobilephoneemulator.com/ mobile emulator] helps understand what the mobile interface is going to look like before deploying onto Production.&lt;br /&gt;
&lt;br /&gt;
==User Access 6/15/2016 ==&lt;br /&gt;
'''Objective'''&lt;br /&gt;
&lt;br /&gt;
Accounts are to be vetted before they are created. We would like to have a queue of account creation requests, that must be approved before they can be created, given that we allow users to edit public wiki pages.&lt;br /&gt;
*Helpful Material:&lt;br /&gt;
** [https://www.mediawiki.org/wiki/Extension:ConfirmAccount Mediawiki Documentation ]&lt;br /&gt;
** mcnair@rice.edu -account that will approve account creation.&lt;br /&gt;
&lt;br /&gt;
Steps Followed:&lt;br /&gt;
'''Package Installation Steps:'''&lt;br /&gt;
* cd extensions/&lt;br /&gt;
* wget https://extdist.wmflabs.org/dist/extensions/ConfirmAccount-REL1_26-d6e2f46.tar.gz&lt;br /&gt;
* tar -xzf ConfirmAccount-REL1_26-d6e2f46.tar.gz &lt;br /&gt;
* sudo pear install mail&lt;br /&gt;
* sudo pear install net_smtp&lt;br /&gt;
The above steps ensure that email notification system is set up, and that the Confirm Account package is set up. &lt;br /&gt;
&lt;br /&gt;
'''Configuring Confirm Accounts php files '''&lt;br /&gt;
The following files need to be updated as follows:&lt;br /&gt;
*ConfirmAccount.php:&lt;br /&gt;
 Set the confirmation queues to point to folders that www-data has access to:&lt;br /&gt;
// For changing path in accountreqs&lt;br /&gt;
$wgConfirmAccountPathAR = $IP . &amp;quot;/images/accountreqs&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
// For changing path in accountcreds&lt;br /&gt;
$wgConfirmAccountPathAC = $IP . &amp;quot;/images/accountcreds&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
*ConfirmAccount.config.php&lt;br /&gt;
 Change the directories to those defined in ConfirmAccount.php&lt;br /&gt;
 $wgFileStore['accountreqs']['directory'] : $wgConfirmAccountPathAR,&lt;br /&gt;
 $wgFileStore['accountcreds']['directory'] : $wgConfirmAccountPathAC,&lt;br /&gt;
&lt;br /&gt;
* LocalSettings.php:&lt;br /&gt;
&lt;br /&gt;
 $wgEnableEmail = true;&lt;br /&gt;
 $wgEmergencyContact = &amp;quot;mcnair@rice.edu&amp;quot;;&lt;br /&gt;
 $wgPasswordSender = &amp;quot;mcnair@rice.edu&amp;quot;;&lt;br /&gt;
 # User Account Confirmation&lt;br /&gt;
 require_once &amp;quot;$IP/extensions/ConfirmAccount/ConfirmAccount.php&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$wgSMTP = array(&lt;br /&gt;
        'host' =&amp;gt; 'ssl://smtp.mail.rice.edu',&lt;br /&gt;
        'IDHost' =&amp;gt; '128.42.44.22',&lt;br /&gt;
        'port' =&amp;gt; 465,&lt;br /&gt;
        'username' =&amp;gt; 'mcnair@rice.edu',&lt;br /&gt;
        'password' =&amp;gt; '*********',&lt;br /&gt;
        'auth' =&amp;gt; true&lt;br /&gt;
);&lt;br /&gt;
 $wgConfirmAccountContact = 'mcnair@rice.edu';&lt;br /&gt;
&lt;br /&gt;
''' Updating the Wiki'''&lt;br /&gt;
* cd /var/lib/mediawiki/maintenance&lt;br /&gt;
* php update.php&lt;br /&gt;
&lt;br /&gt;
[[admin_classification::IT Build| ]]&lt;br /&gt;
&lt;br /&gt;
== Mediawiki extensions ==&lt;br /&gt;
&lt;br /&gt;
=== Semantic Mediawiki Extensions ==&lt;br /&gt;
The SMW extension installation process requires a composer.phar to be installed. All further installations to SMW are done through the composer.phar.&lt;br /&gt;
&lt;br /&gt;
==== Installing Mediawiki Composer.phar ====&lt;br /&gt;
Here is the mediawiki link: [https://getcomposer.org/doc/00-intro.md#installation-nix]&lt;br /&gt;
&lt;br /&gt;
==== Installing Extension : Semantic Results Formats ====&lt;br /&gt;
* Here is the link to the installation process : &lt;br /&gt;
* Here is the command to be run in the Mediawiki root folder (var/lib/mediawiki)&lt;br /&gt;
 php composer.phar require --update-no-dev mediawiki/semantic-result-formats &amp;quot;2.*&amp;quot;&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Wordpress_Blog_Site_(Tool)&amp;diff=12008</id>
		<title>Wordpress Blog Site (Tool)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Wordpress_Blog_Site_(Tool)&amp;diff=12008"/>
		<updated>2016-10-31T21:03:37Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: /* Image Uploads */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Log in to:&lt;br /&gt;
http://www.mcnaircenter.org/blog/wp-admin/&lt;br /&gt;
&lt;br /&gt;
==Install FTP server==&lt;br /&gt;
&lt;br /&gt;
Log in and sudo su yourself, then:&lt;br /&gt;
&lt;br /&gt;
 apt-get install vsftpd&lt;br /&gt;
&lt;br /&gt;
Man page for the vsftpd.conf file&lt;br /&gt;
&lt;br /&gt;
 http://vsftpd.beasts.org/vsftpd_conf.html&lt;br /&gt;
&lt;br /&gt;
Securing the FTP:&lt;br /&gt;
&lt;br /&gt;
 https://help.ubuntu.com/lts/serverguide/ftp-server.html&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
&lt;br /&gt;
Edit /etc/vsftpd.conf (note next restart will reflect changes in /etc/init)&lt;br /&gt;
&lt;br /&gt;
 #add at tend of file:&lt;br /&gt;
 listen_port=26&lt;br /&gt;
&lt;br /&gt;
'''Generate keys for our website''' with the following command:&lt;br /&gt;
&lt;br /&gt;
 openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout /etc/vsftpd.pem -out /etc/vsftpd.pem&lt;br /&gt;
&lt;br /&gt;
 Country Name (2 letter code) [AU]:US&lt;br /&gt;
 State or Province Name (full name) [Some-State]:Texas&lt;br /&gt;
 Locality Name (eg, city) []:Houston&lt;br /&gt;
 Organization Name (eg, company) [Internet Widgits Pty Ltd]:McNair Center at Rice University's Baker Institute&lt;br /&gt;
 Organizational Unit Name (eg, section) []:&lt;br /&gt;
 Common Name (e.g. server FQDN or YOUR name) []:McNair Center&lt;br /&gt;
 Email Address []:admin@mcnaircenter.org&lt;br /&gt;
&lt;br /&gt;
Edit /etc/vsftpd.conf again&lt;br /&gt;
&lt;br /&gt;
 #change the lines as follows:&lt;br /&gt;
 rsa_cert_file=/etc/vsftpd.pem&lt;br /&gt;
 rsa_private_key_file=/etc/vsftpd.pem&lt;br /&gt;
 write_enable=YES&lt;br /&gt;
 chroot_local_user=YES&lt;br /&gt;
 chroot_list_enable=YES&lt;br /&gt;
 chroot_list_file=/etc/vsftpd.chroot_list&lt;br /&gt;
 ssl_enable=YES&lt;br /&gt;
&lt;br /&gt;
Edit  /etc/vsftpd.chroot_list to contain a list of usernames (e.g., ravali)&lt;br /&gt;
 &lt;br /&gt;
Restart the server&lt;br /&gt;
&lt;br /&gt;
 service vsftpd restart&lt;br /&gt;
&lt;br /&gt;
The FTP server should be accessible. Beware local packet shaping. Connect through mcnaircenter.org:26. Otherise have a check that the process is running and listening:&lt;br /&gt;
 ps -aux&lt;br /&gt;
 netstat -lnt&lt;br /&gt;
&lt;br /&gt;
Assuming all is good with the FTP server, we now need to update Wordpress. &lt;br /&gt;
&lt;br /&gt;
==Update Wordpress==&lt;br /&gt;
&lt;br /&gt;
First make a copy of the wordpress folder and dbase&lt;br /&gt;
&lt;br /&gt;
  cp -R /var/lib/wordpress/ /var/lib/wordpress_bak&lt;br /&gt;
  mysqldump -u mcnair_wp -p wordpress &amp;gt; backup_12Aug2016.sql&lt;br /&gt;
  (enter password for dbase found in wp-config.php)&lt;br /&gt;
&lt;br /&gt;
Change the permissions on every in the wordpress folder and make www-data its owner:&lt;br /&gt;
 chown -R www-data /var/lib/wordpress&lt;br /&gt;
 chmod -R 755 /var/lib/wordpress&lt;br /&gt;
&lt;br /&gt;
Browse to 128.42.44.180/blog/wp-admin&lt;br /&gt;
Click update now. Enter:&lt;br /&gt;
&lt;br /&gt;
 Hostname 128.42.44.180:26&lt;br /&gt;
 FTP Username ravali (or some other account)&lt;br /&gt;
 FTP Password &lt;br /&gt;
 Connection Type FTPS (SSL)&lt;br /&gt;
&lt;br /&gt;
Leave the Akismet plugin&lt;br /&gt;
Go to appearance, themes -&amp;gt; add new&lt;br /&gt;
 Choose Accesspress Lite 2.46.7&lt;br /&gt;
 Activate&lt;br /&gt;
Install all of the recommended pluggins that come with the theme&lt;br /&gt;
&lt;br /&gt;
Check the media library works by uploading a file (e.g., GreenRoundLogo.png)&lt;br /&gt;
&lt;br /&gt;
Create a child theme&lt;br /&gt;
 cd /var/lib/wordpress/wp-content/themes&lt;br /&gt;
 mkdir accesspress-lite-child&lt;br /&gt;
 vi accesspress-lite-child/style.css &lt;br /&gt;
 	Add in the template from the parent folder's style.css (just the top of the file)&lt;br /&gt;
 	Update the theme name and text domain to accesspress-lite-child.&lt;br /&gt;
 vi accesspress-lite-child/functions.php&lt;br /&gt;
 	Add in the section that never changes&lt;br /&gt;
 	&lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
 function my_theme_enqueue_styles() {&lt;br /&gt;
 &lt;br /&gt;
     $parent_style = 'parent-style'; // This is 'twentyfifteen-style' for the Twenty Fifteen theme.&lt;br /&gt;
 &lt;br /&gt;
     wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );&lt;br /&gt;
     wp_enqueue_style( 'child-style',&lt;br /&gt;
         get_stylesheet_directory_uri() . '/style.css',&lt;br /&gt;
         array( $parent_style ),&lt;br /&gt;
         wp_get_theme()-&amp;gt;get('Version')&lt;br /&gt;
     );&lt;br /&gt;
 }&lt;br /&gt;
 add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check the permissions on the new files:&lt;br /&gt;
 chown -R www-data /var/lib/wordpress&lt;br /&gt;
 chmod -R 755 /var/lib/wordpress&lt;br /&gt;
&lt;br /&gt;
Active the child theme!&lt;br /&gt;
Check out what it looks like: www.mcnaircenter.org/blog&lt;br /&gt;
&lt;br /&gt;
==Customize our theme==&lt;br /&gt;
=== Middle Section ===&lt;br /&gt;
The middle area of the blog's home page as three sections -&lt;br /&gt;
&lt;br /&gt;
==== The Twitter Feed ====&lt;br /&gt;
This widget will display the top 5 tweets of the McNair Center's twitter account.&lt;br /&gt;
&lt;br /&gt;
*In the Appearance -&amp;gt; Widgets section, the theme has the middle section sidebar. &lt;br /&gt;
*Add the AccessPress-lite Twitter feed widget to the middle section sidebar&lt;br /&gt;
*Log into dev.twitter.com with the McNair Center's creds.&lt;br /&gt;
*Paste the security keys, consumer keys, etc identifying the McNair Center API into the form of the widget.&lt;br /&gt;
*Set/reset the number of blog posts that are required &lt;br /&gt;
&lt;br /&gt;
==== Categories ====&lt;br /&gt;
This is a built in widget from wordpress that is being used in this section.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Custom Widgets ====&lt;br /&gt;
Add a custom (text/html) widget from the widgets to put in the 'Contact Us' and social media icons.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
== Styling ==&lt;br /&gt;
=== Header===&lt;br /&gt;
=== Sidebar ===&lt;br /&gt;
=== Image Uploads ===&lt;br /&gt;
*Images uploaded, both attached to posts and unattached, are added to the media library.&lt;br /&gt;
*They are categorized in the backend per the month and the year in which they are uploaded.&lt;br /&gt;
&lt;br /&gt;
*Plugins involved:&lt;br /&gt;
&lt;br /&gt;
** Enhanced Media Library&lt;br /&gt;
*** This plugin allows us to&lt;br /&gt;
**** create new categories&lt;br /&gt;
**** assign images to categories&lt;br /&gt;
**** filter in the media library section by category&lt;br /&gt;
&lt;br /&gt;
** Pixabay&lt;br /&gt;
*** This plugin allows us to &lt;br /&gt;
**** find images from Creative Commons&lt;br /&gt;
**** add these images for each post - the Pixabay button can be seen next to the Add Media button on the create post screen.&lt;br /&gt;
&lt;br /&gt;
=== Content ===&lt;br /&gt;
=== Footer === &lt;br /&gt;
=== Blog Posts ===&lt;br /&gt;
====Titles====&lt;br /&gt;
==== Author Info ====&lt;br /&gt;
== Usability Features ==&lt;br /&gt;
===RSS===&lt;br /&gt;
===Subscription Rules===&lt;br /&gt;
&lt;br /&gt;
== User Accounts ==&lt;br /&gt;
&lt;br /&gt;
==Useful resources if there are errors==&lt;br /&gt;
&lt;br /&gt;
Wordpress:&lt;br /&gt;
*https://codex.wordpress.org/Upgrading_WordPress_Extended#Step_9:_Run_the_WordPress_upgrade_program&lt;br /&gt;
*https://wordpress.org/support/topic/wordpress-45-error-after-update&lt;br /&gt;
*https://help.webcontrolcenter.com/kb/a992/vsftpd-ftp-server.aspx&lt;br /&gt;
&lt;br /&gt;
FTP Issues:&lt;br /&gt;
*https://help.ubuntu.com/lts/serverguide/ftp-server.html&lt;br /&gt;
*http://askubuntu.com/questions/666858/vsftpd-service-will-not-start-for-14-04&lt;br /&gt;
&lt;br /&gt;
[[Category: Internal]]&lt;br /&gt;
[[Internal Classification: Internal Resources| ]]&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=NLP_(Internal_Tool)&amp;diff=9933</id>
		<title>NLP (Internal Tool)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=NLP_(Internal_Tool)&amp;diff=9933"/>
		<updated>2016-10-07T22:10:06Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: Protected &amp;quot;NLP (Internal Tool)&amp;quot; ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
We (comp sci group) will be focused on building a few tools that can help us mine\learn the behaviors of patents. To understand which of the many technology options available to us yield the most useful results, we will be implementing various approaches, for easy to compute measures, that can be verified by SQL queries, or by the judgment of the Econ group.&lt;br /&gt;
&lt;br /&gt;
Depending on which option pans out for us, we will be extending the approaches to larger sets, or to more complex measures. &lt;br /&gt;
&lt;br /&gt;
==Methodologies==&lt;br /&gt;
====Method: ===&lt;br /&gt;
====Data Set Used ====&lt;br /&gt;
====Result====&lt;br /&gt;
====Link to Code====&lt;br /&gt;
====Pros and Cons====&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=NLP_(Internal_Tool)&amp;diff=9927</id>
		<title>NLP (Internal Tool)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=NLP_(Internal_Tool)&amp;diff=9927"/>
		<updated>2016-10-07T21:18:51Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: /* Methodologies */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
We (comp sci group) will be focused on building a few tools that can help us mine\learn the behaviors of patents. To understand which of the many technology options available to us yield the most useful results, we will be implementing various approaches, for easy to compute measures, that can be verified by SQL queries, or by the judgment of the Econ group.&lt;br /&gt;
&lt;br /&gt;
Depending on which option pans out for us, we will be extending the approaches to larger sets, or to more complex measures. &lt;br /&gt;
&lt;br /&gt;
==Methodologies==&lt;br /&gt;
====Method: ===&lt;br /&gt;
====Data Set Used ====&lt;br /&gt;
====Result====&lt;br /&gt;
====Link to Code====&lt;br /&gt;
====Pros and Cons====&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=NLP_(Internal_Tool)&amp;diff=9926</id>
		<title>NLP (Internal Tool)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=NLP_(Internal_Tool)&amp;diff=9926"/>
		<updated>2016-10-07T21:18:16Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: Created page with &amp;quot;==Introduction== We (comp sci group) will be focused on building a few tools that can help us mine\learn the behaviors of patents. To understand which of the many technology o...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
We (comp sci group) will be focused on building a few tools that can help us mine\learn the behaviors of patents. To understand which of the many technology options available to us yield the most useful results, we will be implementing various approaches, for easy to compute measures, that can be verified by SQL queries, or by the judgment of the Econ group.&lt;br /&gt;
&lt;br /&gt;
Depending on which option pans out for us, we will be extending the approaches to larger sets, or to more complex measures. &lt;br /&gt;
&lt;br /&gt;
==Methodologies==&lt;br /&gt;
===Method: ===&lt;br /&gt;
===Data Set Used ===&lt;br /&gt;
===Result===&lt;br /&gt;
===Link to Code===&lt;br /&gt;
===Pros and Cons===&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Work_Hours&amp;diff=8022</id>
		<title>Work Hours</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Work_Hours&amp;diff=8022"/>
		<updated>2016-08-31T15:28:25Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Please complete your preferred times for the Fall term of 2015 below.&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;border: 1px solid darkgray; bgcolor: #f9f9f9&amp;quot;&lt;br /&gt;
| align=&amp;quot;center&amp;quot; style=&amp;quot;background:#f0f0f0;&amp;quot;|'''Name'''&lt;br /&gt;
| align=&amp;quot;center&amp;quot; style=&amp;quot;background:#f0f0f0;&amp;quot;|'''Mon'''&lt;br /&gt;
| align=&amp;quot;center&amp;quot; style=&amp;quot;background:#f0f0f0;&amp;quot;|'''Tues'''&lt;br /&gt;
| align=&amp;quot;center&amp;quot; style=&amp;quot;background:#f0f0f0;&amp;quot;|'''Wed'''&lt;br /&gt;
| align=&amp;quot;center&amp;quot; style=&amp;quot;background:#f0f0f0;&amp;quot;|'''Thurs'''&lt;br /&gt;
| align=&amp;quot;center&amp;quot; style=&amp;quot;background:#f0f0f0;&amp;quot;|'''Fri'''&lt;br /&gt;
|-&lt;br /&gt;
| Albert Nabiullin||||||3-4:30||12:30-3||3-4:30&lt;br /&gt;
|-&lt;br /&gt;
| Amir Kazempour||||||||||&lt;br /&gt;
|-&lt;br /&gt;
| Ariel Sun||||||11-12, 1:15-2:30||||11-12, 1:15-2:30&lt;br /&gt;
|-&lt;br /&gt;
| Ben Baldazo||||||||||&lt;br /&gt;
|-&lt;br /&gt;
| Carlin Cherry||||||3-5:00||2:30-4||&lt;br /&gt;
|-&lt;br /&gt;
| Dylan Dickens||1-5:00||||||||&lt;br /&gt;
|-&lt;br /&gt;
| Harsh Upadhyay||3-5:30||3-5:30||3-5:30||3-5:30||3-5:30&lt;br /&gt;
|-&lt;br /&gt;
| Jake Silberman||||||||||&lt;br /&gt;
|-&lt;br /&gt;
| James Chen||||||||||&lt;br /&gt;
|-&lt;br /&gt;
| Julia Wang||||||1-4:30||||1-4:00&lt;br /&gt;
|-&lt;br /&gt;
| Marcela Interiano||||||||||&lt;br /&gt;
|-&lt;br /&gt;
| Meghana Gaur||||||||||&lt;br /&gt;
|-&lt;br /&gt;
| Ramee Saleh||||||3-5:00||3-5:00||3-5:00&lt;br /&gt;
|-&lt;br /&gt;
| Ravali Kruthiventi||3-6||||3-6||||3-6&lt;br /&gt;
|-&lt;br /&gt;
| Todd Rachowin||||||||||&lt;br /&gt;
|-&lt;br /&gt;
| Veeral Shah||12:30-2:30||||||||12:30-2:30&lt;br /&gt;
|-&lt;br /&gt;
| Will Cleland||||12:30-4||||12:30-4||2-5:00 &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category: McNair Admin]]&lt;br /&gt;
[[admin_classification::Admin| ]]&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Wordpress_Blog_Site_(Tool)&amp;diff=8007</id>
		<title>Wordpress Blog Site (Tool)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Wordpress_Blog_Site_(Tool)&amp;diff=8007"/>
		<updated>2016-08-18T19:38:39Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: /* Customize our theme */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Log in to:&lt;br /&gt;
http://www.mcnaircenter.org/blog/wp-admin/&lt;br /&gt;
&lt;br /&gt;
==Install FTP server==&lt;br /&gt;
&lt;br /&gt;
Log in and sudo su yourself, then:&lt;br /&gt;
&lt;br /&gt;
 apt-get install vsftpd&lt;br /&gt;
&lt;br /&gt;
Man page for the vsftpd.conf file&lt;br /&gt;
&lt;br /&gt;
 http://vsftpd.beasts.org/vsftpd_conf.html&lt;br /&gt;
&lt;br /&gt;
Securing the FTP:&lt;br /&gt;
&lt;br /&gt;
 https://help.ubuntu.com/lts/serverguide/ftp-server.html&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
&lt;br /&gt;
Edit /etc/vsftpd.conf (note next restart will reflect changes in /etc/init)&lt;br /&gt;
&lt;br /&gt;
 #add at tend of file:&lt;br /&gt;
 listen_port=26&lt;br /&gt;
&lt;br /&gt;
'''Generate keys for our website''' with the following command:&lt;br /&gt;
&lt;br /&gt;
 openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout /etc/vsftpd.pem -out /etc/vsftpd.pem&lt;br /&gt;
&lt;br /&gt;
 Country Name (2 letter code) [AU]:US&lt;br /&gt;
 State or Province Name (full name) [Some-State]:Texas&lt;br /&gt;
 Locality Name (eg, city) []:Houston&lt;br /&gt;
 Organization Name (eg, company) [Internet Widgits Pty Ltd]:McNair Center at Rice University's Baker Institute&lt;br /&gt;
 Organizational Unit Name (eg, section) []:&lt;br /&gt;
 Common Name (e.g. server FQDN or YOUR name) []:McNair Center&lt;br /&gt;
 Email Address []:admin@mcnaircenter.org&lt;br /&gt;
&lt;br /&gt;
Edit /etc/vsftpd.conf again&lt;br /&gt;
&lt;br /&gt;
 #change the lines as follows:&lt;br /&gt;
 rsa_cert_file=/etc/vsftpd.pem&lt;br /&gt;
 rsa_private_key_file=/etc/vsftpd.pem&lt;br /&gt;
 write_enable=YES&lt;br /&gt;
 chroot_local_user=YES&lt;br /&gt;
 chroot_list_enable=YES&lt;br /&gt;
 chroot_list_file=/etc/vsftpd.chroot_list&lt;br /&gt;
 ssl_enable=YES&lt;br /&gt;
&lt;br /&gt;
Edit  /etc/vsftpd.chroot_list to contain a list of usernames (e.g., ravali)&lt;br /&gt;
 &lt;br /&gt;
Restart the server&lt;br /&gt;
&lt;br /&gt;
 service vsftpd restart&lt;br /&gt;
&lt;br /&gt;
The FTP server should be accessible. Beware local packet shaping. Connect through mcnaircenter.org:26. Otherise have a check that the process is running and listening:&lt;br /&gt;
 ps -aux&lt;br /&gt;
 netstat -lnt&lt;br /&gt;
&lt;br /&gt;
Assuming all is good with the FTP server, we now need to update Wordpress. &lt;br /&gt;
&lt;br /&gt;
==Update Wordpress==&lt;br /&gt;
&lt;br /&gt;
First make a copy of the wordpress folder and dbase&lt;br /&gt;
&lt;br /&gt;
  cp -R /var/lib/wordpress/ /var/lib/wordpress_bak&lt;br /&gt;
  mysqldump -u mcnair_wp -p wordpress &amp;gt; backup_12Aug2016.sql&lt;br /&gt;
  (enter password for dbase found in wp-config.php)&lt;br /&gt;
&lt;br /&gt;
Change the permissions on every in the wordpress folder and make www-data its owner:&lt;br /&gt;
 chown -R www-data /var/lib/wordpress&lt;br /&gt;
 chmod -R 755 /var/lib/wordpress&lt;br /&gt;
&lt;br /&gt;
Browse to 128.42.44.180/blog/wp-admin&lt;br /&gt;
Click update now. Enter:&lt;br /&gt;
&lt;br /&gt;
 Hostname 128.42.44.180:26&lt;br /&gt;
 FTP Username ravali (or some other account)&lt;br /&gt;
 FTP Password &lt;br /&gt;
 Connection Type FTPS (SSL)&lt;br /&gt;
&lt;br /&gt;
Leave the Akismet plugin&lt;br /&gt;
Go to appearance, themes -&amp;gt; add new&lt;br /&gt;
 Choose Accesspress Lite 2.46.7&lt;br /&gt;
 Activate&lt;br /&gt;
Install all of the recommended pluggins that come with the theme&lt;br /&gt;
&lt;br /&gt;
Check the media library works by uploading a file (e.g., GreenRoundLogo.png)&lt;br /&gt;
&lt;br /&gt;
Create a child theme&lt;br /&gt;
 cd /var/lib/wordpress/wp-content/themes&lt;br /&gt;
 mkdir accesspress-lite-child&lt;br /&gt;
 vi accesspress-lite-child/style.css &lt;br /&gt;
 	Add in the template from the parent folder's style.css (just the top of the file)&lt;br /&gt;
 	Update the theme name and text domain to accesspress-lite-child.&lt;br /&gt;
 vi accesspress-lite-child/functions.php&lt;br /&gt;
 	Add in the section that never changes&lt;br /&gt;
 	&lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
 function my_theme_enqueue_styles() {&lt;br /&gt;
 &lt;br /&gt;
     $parent_style = 'parent-style'; // This is 'twentyfifteen-style' for the Twenty Fifteen theme.&lt;br /&gt;
 &lt;br /&gt;
     wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );&lt;br /&gt;
     wp_enqueue_style( 'child-style',&lt;br /&gt;
         get_stylesheet_directory_uri() . '/style.css',&lt;br /&gt;
         array( $parent_style ),&lt;br /&gt;
         wp_get_theme()-&amp;gt;get('Version')&lt;br /&gt;
     );&lt;br /&gt;
 }&lt;br /&gt;
 add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check the permissions on the new files:&lt;br /&gt;
 chown -R www-data /var/lib/wordpress&lt;br /&gt;
 chmod -R 755 /var/lib/wordpress&lt;br /&gt;
&lt;br /&gt;
Active the child theme!&lt;br /&gt;
Check out what it looks like: www.mcnaircenter.org/blog&lt;br /&gt;
&lt;br /&gt;
==Customize our theme==&lt;br /&gt;
=== Middle Section ===&lt;br /&gt;
The middle area of the blog's home page as three sections -&lt;br /&gt;
&lt;br /&gt;
==== The Twitter Feed ====&lt;br /&gt;
This widget will display the top 5 tweets of the McNair Center's twitter account.&lt;br /&gt;
&lt;br /&gt;
*In the Appearance -&amp;gt; Widgets section, the theme has the middle section sidebar. &lt;br /&gt;
*Add the AccessPress-lite Twitter feed widget to the middle section sidebar&lt;br /&gt;
*Log into dev.twitter.com with the McNair Center's creds.&lt;br /&gt;
*Paste the security keys, consumer keys, etc identifying the McNair Center API into the form of the widget.&lt;br /&gt;
*Set/reset the number of blog posts that are required &lt;br /&gt;
&lt;br /&gt;
==== Categories ====&lt;br /&gt;
This is a built in widget from wordpress that is being used in this section.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Custom Widgets ====&lt;br /&gt;
Add a custom (text/html) widget from the widgets to put in the 'Contact Us' and social media icons.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
== Styling ==&lt;br /&gt;
=== Header===&lt;br /&gt;
=== Sidebar ===&lt;br /&gt;
=== Image Uploads ===&lt;br /&gt;
=== Content ===&lt;br /&gt;
=== Footer === &lt;br /&gt;
=== Blog Posts ===&lt;br /&gt;
====Titles====&lt;br /&gt;
==== Author Info ====&lt;br /&gt;
== Usability Features ==&lt;br /&gt;
===RSS===&lt;br /&gt;
===Subscription Rules===&lt;br /&gt;
&lt;br /&gt;
== User Accounts ==&lt;br /&gt;
&lt;br /&gt;
==Useful resources if there are errors==&lt;br /&gt;
&lt;br /&gt;
Wordpress:&lt;br /&gt;
*https://codex.wordpress.org/Upgrading_WordPress_Extended#Step_9:_Run_the_WordPress_upgrade_program&lt;br /&gt;
*https://wordpress.org/support/topic/wordpress-45-error-after-update&lt;br /&gt;
*https://help.webcontrolcenter.com/kb/a992/vsftpd-ftp-server.aspx&lt;br /&gt;
&lt;br /&gt;
FTP Issues:&lt;br /&gt;
*https://help.ubuntu.com/lts/serverguide/ftp-server.html&lt;br /&gt;
*http://askubuntu.com/questions/666858/vsftpd-service-will-not-start-for-14-04&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=McNair_Center_Admin&amp;diff=8003</id>
		<title>McNair Center Admin</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=McNair_Center_Admin&amp;diff=8003"/>
		<updated>2016-08-11T21:17:16Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: /* Twitter */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: McNair Admin]]&lt;br /&gt;
==Director==&lt;br /&gt;
&lt;br /&gt;
Ed Egan: ed.egan@rice.edu, 617 415 8097, Office 230 Baker Hall [[ Image: MinionBob.jpg | 200x200px ]]&lt;br /&gt;
&lt;br /&gt;
==Research Assistants==&lt;br /&gt;
&lt;br /&gt;
===Summer Term 2016 Schedule===&lt;br /&gt;
&lt;br /&gt;
[[:Category:McNair Staff|Full Staff List]]&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;border: 1px solid darkgray; bgcolor: #f9f9f9&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Name || Year || Rice Email || Phone ||&lt;br /&gt;
|-&lt;br /&gt;
|[[Veeral Shah]] || Sophomore || vss2@rice.edu  || 914-261-1057  ||&lt;br /&gt;
|-&lt;br /&gt;
|[[Marcela Interiano]] || Senior || emi2@rice.edu || 832-830-6613 ||&lt;br /&gt;
|-&lt;br /&gt;
|[[Richard Goldman]] || Sophomore|| rag10@rice.edu || 713-689-8371 ||&lt;br /&gt;
|-&lt;br /&gt;
|[[Ariel Sun]] || Senior || hs28@rice.edu || 832-931-3358 ||&lt;br /&gt;
|-&lt;br /&gt;
|[[Jake Silberman]] || Junior|| wjs4@rice.edu || 512-590-2062 ||&lt;br /&gt;
|-&lt;br /&gt;
|[[Dylan Dickens]] || Junior|| dtd4@rice.edu || 832-691-6590 ||&lt;br /&gt;
|-&lt;br /&gt;
|[[User:GunnyLiu|Gunny Liu]] || Sophomore|| jl134@rice.edu || 346-228-6657 ||&lt;br /&gt;
|-&lt;br /&gt;
|[[Ravali Kruthiventi|Ravali Kruthiventi]] || Second Year Graduate Student|| sk99@rice.edu || 512-506-1552 ||&lt;br /&gt;
|-&lt;br /&gt;
|[[McNair Staff:Shoeb Mohammed |Shoeb Mohammed]] || Second Year Graduate Student|| sm55@rice.edu || 979-402-9133 ||&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Email addresses===&lt;br /&gt;
&lt;br /&gt;
Director:&lt;br /&gt;
*ed.egan@rice.edu&lt;br /&gt;
&lt;br /&gt;
Center:&lt;br /&gt;
*admin@mcnaircenter.org (goes to director's gmail)&lt;br /&gt;
*mcnair@rice.edu (goes to a dedicated Rice email box. Log in at https://webmail.mail.rice.edu/)&lt;br /&gt;
&lt;br /&gt;
Researchers (copy and paste for distribution):&lt;br /&gt;
&lt;br /&gt;
vss2@rice.edu, emi2@rice.edu, rag10@rice.edu, hs28@rice.edu, wjs4@rice.edu, dtd4@rice.edu, jl134@rice.edu&lt;br /&gt;
&lt;br /&gt;
==Hiring Instructions==&lt;br /&gt;
&lt;br /&gt;
For those hired for pay:&lt;br /&gt;
# Log in to Esther and complete a '''SPAF (Student Personnel Action Form)''' - just search for it and it comes up pre-populated. Print out the completed form, sign it, and return it to Ed or to the finance office downstairs. Don't worry about completing the job title, rate, or other fields. This will be done for you.&lt;br /&gt;
# If you don't have an '''I-9 employment verification''' filed with Rice University, you'll need to get one. You'll have one if you've worked for Rice before. Otherwise, '''bring your passport''' (original, not a copy of the page) to the Baker Institute's finance team during regular business hours, and they will help you. If you can't find the finance office, ask Ed to be taken downstairs to see Giovanna or Christine, or ask the receptionist on the 1st floor for directions.&lt;br /&gt;
# If you haven't already set yourself up for '''direct deposit''', you can do that through Esther.&lt;br /&gt;
# Complete your timesheets (available through Esther) every two weeks. These are now submitted electronically. They are checked by Ed and the Baker administration, so make sure that you complete them correctly. &lt;br /&gt;
&lt;br /&gt;
==Social Science Internship==&lt;br /&gt;
&lt;br /&gt;
Social science students with a declared major, who have not previously taken SOSC421, may take SOSC421 and gain 3 graded general degree credits for an internship with the McNair Center. '''The intern must work at least 10hrs a week for at least 8 weeks, and cannot receive other compensation for their efforts.''' Students selected for 3 credit internships must read the [http://socialsciencesgateway.rice.edu/uploadedFiles/Social_Sciences_Gateway/Internships/4.SOSC%20421-Internship_NEW.doc syllabus document], and complete the [http://goo.gl/forms/owxxVZDlCL online intern agreement]. The program is administrated by the Social Sciences Gateway office. As a part of the program the student must complete two one-page written descriptions of the internship and one self-evaluation. The center's director will provide two additional evaluations, and a grade. &lt;br /&gt;
&lt;br /&gt;
More information is available from:&lt;br /&gt;
*https://socialsciencesgateway.rice.edu/Content.aspx?id=2147484424&amp;amp;libID=2147484424&lt;br /&gt;
&lt;br /&gt;
==Login information==&lt;br /&gt;
&lt;br /&gt;
===Twitter===&lt;br /&gt;
&lt;br /&gt;
The Center's Twitter Account:&lt;br /&gt;
 admin@mcnaircenter.org&lt;br /&gt;
 Password: 9million&lt;br /&gt;
&lt;br /&gt;
Handle&lt;br /&gt;
 @bakermcnair&lt;br /&gt;
&lt;br /&gt;
===Local Machines===&lt;br /&gt;
&lt;br /&gt;
Usernames and passwords for local machines are:&lt;br /&gt;
 .\McNairCenterLocal&lt;br /&gt;
 9million&lt;br /&gt;
&lt;br /&gt;
===Dropbox===&lt;br /&gt;
&lt;br /&gt;
The center's dropbox account is:&lt;br /&gt;
 admin@mcnaircenter.org&lt;br /&gt;
 9million&lt;br /&gt;
&lt;br /&gt;
===WRDS===&lt;br /&gt;
&lt;br /&gt;
 mcnair&lt;br /&gt;
 9Mil2015&lt;br /&gt;
&lt;br /&gt;
===SDC Platinum===&lt;br /&gt;
&lt;br /&gt;
 The initials are '''mc'''&lt;br /&gt;
&lt;br /&gt;
===PACER===&lt;br /&gt;
&lt;br /&gt;
 ed.egan.mcnair&lt;br /&gt;
 9.Million&lt;br /&gt;
 city: Houston&lt;br /&gt;
 favorite college: Rice&lt;br /&gt;
&lt;br /&gt;
==Hardware and software==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Install TextPad from http://www.textpad.com (it's nag-ware with a free download and install).&lt;br /&gt;
&lt;br /&gt;
==Current projects==&lt;br /&gt;
Veeral Shah:&lt;br /&gt;
&lt;br /&gt;
Marcela Interiano:&lt;br /&gt;
&lt;br /&gt;
Richard Goldman:&lt;br /&gt;
&lt;br /&gt;
Ariel Sun:&lt;br /&gt;
&lt;br /&gt;
Jake Silberman:&lt;br /&gt;
&lt;br /&gt;
Dylan Dickens:&lt;br /&gt;
&lt;br /&gt;
Gunny Liu:&lt;br /&gt;
&lt;br /&gt;
==Management==&lt;br /&gt;
&lt;br /&gt;
*[[Meeting Logs]]&lt;br /&gt;
&lt;br /&gt;
[[admin_classification::General Information| ]]&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Wordpress_Blog_Site_(Tool)&amp;diff=7980</id>
		<title>Wordpress Blog Site (Tool)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Wordpress_Blog_Site_(Tool)&amp;diff=7980"/>
		<updated>2016-08-05T16:06:33Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: /* Error Logs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Requirements ==&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
== Styling ==&lt;br /&gt;
=== Header===&lt;br /&gt;
=== Sidebar ===&lt;br /&gt;
=== Image Uploads ===&lt;br /&gt;
=== Content ===&lt;br /&gt;
=== Footer === &lt;br /&gt;
=== Blog Posts ===&lt;br /&gt;
====Titles====&lt;br /&gt;
==== Author Info ====&lt;br /&gt;
== Usability Features ==&lt;br /&gt;
===RSS===&lt;br /&gt;
===Subscription Rules===&lt;br /&gt;
&lt;br /&gt;
== User Accounts ==&lt;br /&gt;
&lt;br /&gt;
== Error Logs ==&lt;br /&gt;
&lt;br /&gt;
McNair Center Wordpress blog&lt;br /&gt;
&lt;br /&gt;
Setup:&lt;br /&gt;
Images:&lt;br /&gt;
1. Wordpress currently looks for images in a completely different location than the one it is uploading to.&lt;br /&gt;
2. It also has trouble generating the three standard sizes - thumbnails, etc&lt;br /&gt;
&lt;br /&gt;
Permissions:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Styling:&lt;br /&gt;
Child themes:&lt;br /&gt;
*Usage of child themes when creating custom design with wordpress is recommended.&lt;br /&gt;
*Steps to create:&lt;br /&gt;
**Create a folder in the var/lib/wordpress/wp-content/themes with the title of your choice&lt;br /&gt;
**Into the newly created folder, add the header.php, style.css and functions.php file from the parent theme's folder to the child theme&lt;br /&gt;
**If the child files are blank, then all the parent theme's corresponding code is preserved.&lt;br /&gt;
**Else, if any chunk of code is added to the child theme's file, the code overrides the code in the parent theme's code.&lt;br /&gt;
**The webkit modules that adjust the display for mobile interfaces are best not changed.&lt;br /&gt;
*Once the files are created, to the style.css, add the template section enclosed in '/* ' and '*/' from the parent's style.css file.&lt;br /&gt;
*Go to the Wordpress dashboard, login as admin, and add the theme to wordpress (button should appear on the UI, along with the child theme) in the themes section&lt;br /&gt;
&lt;br /&gt;
Header&lt;br /&gt;
1. Header functions changed: &lt;br /&gt;
* The default header that comes with the twentysixteen has the header set within the same margins that govern the body of the blog.&lt;br /&gt;
* We want for our header to stretch across the UI like a banner.&lt;br /&gt;
* To do so,&lt;br /&gt;
** I removed the header from the div classes from the header.php file.&lt;br /&gt;
** I added some div classes around the header so that we could style &lt;br /&gt;
&lt;br /&gt;
Sidebar&lt;br /&gt;
1. Addition of text widgets&lt;br /&gt;
* We need some text + image based widgets added to the sidebar.&lt;br /&gt;
* These can be added with basic html and css (inline) as a text widget to the sidebar.&lt;br /&gt;
* Fonts changed to : &lt;br /&gt;
* border width reduced.&lt;br /&gt;
&lt;br /&gt;
Custom menus&lt;br /&gt;
Custom menus can be created and registered. Steps:&lt;br /&gt;
1. &lt;br /&gt;
Footer&lt;br /&gt;
&lt;br /&gt;
Helpful Links:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------&lt;br /&gt;
-- Installing FTPS Server on Web Servers&lt;br /&gt;
-------------------------------------------&lt;br /&gt;
&lt;br /&gt;
Objective: Install FTPS server on the web servers on port 26 - test server followed by the production server.&lt;br /&gt;
&lt;br /&gt;
Steps Followed:&lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
Helpful links:&lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout /etc/vsftpd.pem -out /etc/vsftpd.pem&lt;br /&gt;
&lt;br /&gt;
rsa_cert_file=/etc/vsftpd.pem&lt;br /&gt;
rsa_private_key_file=/etc/vsftpd.pem&lt;br /&gt;
&lt;br /&gt;
username: webadmin&lt;br /&gt;
password: 9Million!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
------- Aug 2nd -------------&lt;br /&gt;
&lt;br /&gt;
''' Man page for the vsftpd.conf file '''&lt;br /&gt;
 http://vsftpd.beasts.org/vsftpd_conf.html&lt;br /&gt;
&lt;br /&gt;
Securing the FTP:&lt;br /&gt;
 https://help.ubuntu.com/lts/serverguide/ftp-server.html&lt;br /&gt;
&lt;br /&gt;
'''Customization:'''&lt;br /&gt;
''''Change the port:''''&lt;br /&gt;
Add line to /etc/vsftpd.conf: &lt;br /&gt;
 listen_port=26&lt;br /&gt;
&lt;br /&gt;
Restart the server with the command:&lt;br /&gt;
 sudo vsftpd restart&lt;br /&gt;
&lt;br /&gt;
Check the installation by checking via a browser, the following address:&lt;br /&gt;
http://128.42.44.22:26&lt;br /&gt;
&lt;br /&gt;
''''Add users''''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''''Generate keys for ou website''''&lt;br /&gt;
Generate the key with the following command:&lt;br /&gt;
 openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout /etc/vsftpd.pem -out /etc/vsftpd.pem&lt;br /&gt;
&lt;br /&gt;
Add\Update the following lines in the /etc/vsftpd.conf:&lt;br /&gt;
 rsa_cert_file=/etc/vsftpd.pem&lt;br /&gt;
 rsa_private_key_file=/etc/vsftpd.pem&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 '''' Adding Users''''&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 FTP : Files not accessible:&lt;br /&gt;
 Add the following to wp-config.php&lt;br /&gt;
 if(is_admin()) {&lt;br /&gt;
	add_filter('filesystem_method', create_function('$a', 'return &amp;quot;direct&amp;quot;;' ));&lt;br /&gt;
	define( 'FS_CHMOD_DIR', 0751 );&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
 --- Back Up:&lt;br /&gt;
 &lt;br /&gt;
 Folders:&lt;br /&gt;
 Copy created&lt;br /&gt;
 Database:&lt;br /&gt;
 mysqldump -u mcnair_wp -p wordpress &amp;gt; backup_3Aug2016.sql&lt;br /&gt;
 &lt;br /&gt;
 -- Update:&lt;br /&gt;
 &lt;br /&gt;
 https://codex.wordpress.org/Upgrading_WordPress_Extended#Step_9:_Run_the_WordPress_upgrade_program&lt;br /&gt;
 &lt;br /&gt;
 Error Resolution:&lt;br /&gt;
 https://wordpress.org/support/topic/wordpress-45-error-after-update&lt;br /&gt;
&lt;br /&gt;
''''' in case of errors, try: '''''&lt;br /&gt;
https://help.webcontrolcenter.com/kb/a992/vsftpd-ftp-server.aspx&lt;br /&gt;
&lt;br /&gt;
FTP Issues:&lt;br /&gt;
https://help.ubuntu.com/lts/serverguide/ftp-server.html&lt;br /&gt;
&lt;br /&gt;
http://askubuntu.com/questions/666858/vsftpd-service-will-not-start-for-14-04&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Wordpress_Blog_Site_(Tool)&amp;diff=7979</id>
		<title>Wordpress Blog Site (Tool)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Wordpress_Blog_Site_(Tool)&amp;diff=7979"/>
		<updated>2016-08-05T16:05:17Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: /* Error Logs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Requirements ==&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
== Styling ==&lt;br /&gt;
=== Header===&lt;br /&gt;
=== Sidebar ===&lt;br /&gt;
=== Image Uploads ===&lt;br /&gt;
=== Content ===&lt;br /&gt;
=== Footer === &lt;br /&gt;
=== Blog Posts ===&lt;br /&gt;
====Titles====&lt;br /&gt;
==== Author Info ====&lt;br /&gt;
== Usability Features ==&lt;br /&gt;
===RSS===&lt;br /&gt;
===Subscription Rules===&lt;br /&gt;
&lt;br /&gt;
== User Accounts ==&lt;br /&gt;
&lt;br /&gt;
== Error Logs ==&lt;br /&gt;
&lt;br /&gt;
McNair Center Wordpress blog&lt;br /&gt;
&lt;br /&gt;
Setup:&lt;br /&gt;
Images:&lt;br /&gt;
1. Wordpress currently looks for images in a completely different location than the one it is uploading to.&lt;br /&gt;
2. It also has trouble generating the three standard sizes - thumbnails, etc&lt;br /&gt;
&lt;br /&gt;
Permissions:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Styling:&lt;br /&gt;
Child themes:&lt;br /&gt;
*Usage of child themes when creating custom design with wordpress is recommended.&lt;br /&gt;
*Steps to create:&lt;br /&gt;
**Create a folder in the var/lib/wordpress/wp-content/themes with the title of your choice&lt;br /&gt;
**Into the newly created folder, add the header.php, style.css and functions.php file from the parent theme's folder to the child theme&lt;br /&gt;
**If the child files are blank, then all the parent theme's corresponding code is preserved.&lt;br /&gt;
**Else, if any chunk of code is added to the child theme's file, the code overrides the code in the parent theme's code.&lt;br /&gt;
**The webkit modules that adjust the display for mobile interfaces are best not changed.&lt;br /&gt;
*Once the files are created, to the style.css, add the template section enclosed in '/* ' and '*/' from the parent's style.css file.&lt;br /&gt;
*Go to the Wordpress dashboard, login as admin, and add the theme to wordpress (button should appear on the UI, along with the child theme) in the themes section&lt;br /&gt;
&lt;br /&gt;
Header&lt;br /&gt;
1. Header functions changed: &lt;br /&gt;
* The default header that comes with the twentysixteen has the header set within the same margins that govern the body of the blog.&lt;br /&gt;
* We want for our header to stretch across the UI like a banner.&lt;br /&gt;
* To do so,&lt;br /&gt;
** I removed the header from the div classes from the header.php file.&lt;br /&gt;
** I added some div classes around the header so that we could style &lt;br /&gt;
&lt;br /&gt;
Sidebar&lt;br /&gt;
1. Addition of text widgets&lt;br /&gt;
* We need some text + image based widgets added to the sidebar.&lt;br /&gt;
* These can be added with basic html and css (inline) as a text widget to the sidebar.&lt;br /&gt;
* Fonts changed to : &lt;br /&gt;
* border width reduced.&lt;br /&gt;
&lt;br /&gt;
Custom menus&lt;br /&gt;
Custom menus can be created and registered. Steps:&lt;br /&gt;
1. &lt;br /&gt;
Footer&lt;br /&gt;
&lt;br /&gt;
Helpful Links:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------&lt;br /&gt;
-- Installing FTPS Server on Web Servers&lt;br /&gt;
-------------------------------------------&lt;br /&gt;
&lt;br /&gt;
Objective: Install FTPS server on the web servers on port 26 - test server followed by the production server.&lt;br /&gt;
&lt;br /&gt;
Steps Followed:&lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
Helpful links:&lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout /etc/vsftpd.pem -out /etc/vsftpd.pem&lt;br /&gt;
&lt;br /&gt;
rsa_cert_file=/etc/vsftpd.pem&lt;br /&gt;
rsa_private_key_file=/etc/vsftpd.pem&lt;br /&gt;
&lt;br /&gt;
username: webadmin&lt;br /&gt;
password: 9Million!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
------- Aug 2nd -------------&lt;br /&gt;
&lt;br /&gt;
''' Man page for the vsftpd.conf file '''&lt;br /&gt;
 http://vsftpd.beasts.org/vsftpd_conf.html&lt;br /&gt;
&lt;br /&gt;
Securing the FTP:&lt;br /&gt;
 https://help.ubuntu.com/lts/serverguide/ftp-server.html&lt;br /&gt;
&lt;br /&gt;
'''Customization:'''&lt;br /&gt;
''''Change the port:''''&lt;br /&gt;
Add line to /etc/vsftpd.conf: &lt;br /&gt;
 listen_port=26&lt;br /&gt;
&lt;br /&gt;
Restart the server with the command:&lt;br /&gt;
 sudo vsftpd restart&lt;br /&gt;
&lt;br /&gt;
Check the installation by checking via a browser, the following address:&lt;br /&gt;
http://128.42.44.22:26&lt;br /&gt;
&lt;br /&gt;
''''Add users''''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''''Generate keys for ou website''''&lt;br /&gt;
Generate the key with the following command:&lt;br /&gt;
 openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout /etc/vsftpd.pem -out /etc/vsftpd.pem&lt;br /&gt;
&lt;br /&gt;
Add\Update the following lines in the /etc/vsftpd.conf:&lt;br /&gt;
 rsa_cert_file=/etc/vsftpd.pem&lt;br /&gt;
 rsa_private_key_file=/etc/vsftpd.pem&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 '''' Adding Users''''&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 FTP : Files not accessible:&lt;br /&gt;
 Add the following to wp-config.php&lt;br /&gt;
 if(is_admin()) {&lt;br /&gt;
	add_filter('filesystem_method', create_function('$a', 'return &amp;quot;direct&amp;quot;;' ));&lt;br /&gt;
	define( 'FS_CHMOD_DIR', 0751 );&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
 --- Back Up:&lt;br /&gt;
 &lt;br /&gt;
 Folders:&lt;br /&gt;
 Copy created&lt;br /&gt;
 Database:&lt;br /&gt;
 mysqldump -u mcnair_wp -p wordpress &amp;gt; backup_3Aug2016.sql&lt;br /&gt;
 &lt;br /&gt;
 -- Update:&lt;br /&gt;
 &lt;br /&gt;
 https://codex.wordpress.org/Upgrading_WordPress_Extended#Step_9:_Run_the_WordPress_upgrade_program&lt;br /&gt;
 &lt;br /&gt;
 Error Resolution:&lt;br /&gt;
 https://wordpress.org/support/topic/wordpress-45-error-after-update&lt;br /&gt;
&lt;br /&gt;
''''' in case of errors, try: '''''&lt;br /&gt;
https://help.webcontrolcenter.com/kb/a992/vsftpd-ftp-server.aspx&lt;br /&gt;
&lt;br /&gt;
FTP Issues:&lt;br /&gt;
https://help.ubuntu.com/lts/serverguide/ftp-server.html&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Wordpress_Blog_Site_(Tool)&amp;diff=7978</id>
		<title>Wordpress Blog Site (Tool)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Wordpress_Blog_Site_(Tool)&amp;diff=7978"/>
		<updated>2016-08-05T16:03:04Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: /* Error Logs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Requirements ==&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
== Styling ==&lt;br /&gt;
=== Header===&lt;br /&gt;
=== Sidebar ===&lt;br /&gt;
=== Image Uploads ===&lt;br /&gt;
=== Content ===&lt;br /&gt;
=== Footer === &lt;br /&gt;
=== Blog Posts ===&lt;br /&gt;
====Titles====&lt;br /&gt;
==== Author Info ====&lt;br /&gt;
== Usability Features ==&lt;br /&gt;
===RSS===&lt;br /&gt;
===Subscription Rules===&lt;br /&gt;
&lt;br /&gt;
== User Accounts ==&lt;br /&gt;
&lt;br /&gt;
== Error Logs ==&lt;br /&gt;
&lt;br /&gt;
McNair Center Wordpress blog&lt;br /&gt;
&lt;br /&gt;
Setup:&lt;br /&gt;
Images:&lt;br /&gt;
1. Wordpress currently looks for images in a completely different location than the one it is uploading to.&lt;br /&gt;
2. It also has trouble generating the three standard sizes - thumbnails, etc&lt;br /&gt;
&lt;br /&gt;
Permissions:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Styling:&lt;br /&gt;
Child themes:&lt;br /&gt;
*Usage of child themes when creating custom design with wordpress is recommended.&lt;br /&gt;
*Steps to create:&lt;br /&gt;
**Create a folder in the var/lib/wordpress/wp-content/themes with the title of your choice&lt;br /&gt;
**Into the newly created folder, add the header.php, style.css and functions.php file from the parent theme's folder to the child theme&lt;br /&gt;
**If the child files are blank, then all the parent theme's corresponding code is preserved.&lt;br /&gt;
**Else, if any chunk of code is added to the child theme's file, the code overrides the code in the parent theme's code.&lt;br /&gt;
**The webkit modules that adjust the display for mobile interfaces are best not changed.&lt;br /&gt;
*Once the files are created, to the style.css, add the template section enclosed in '/* ' and '*/' from the parent's style.css file.&lt;br /&gt;
*Go to the Wordpress dashboard, login as admin, and add the theme to wordpress (button should appear on the UI, along with the child theme) in the themes section&lt;br /&gt;
&lt;br /&gt;
Header&lt;br /&gt;
1. Header functions changed: &lt;br /&gt;
* The default header that comes with the twentysixteen has the header set within the same margins that govern the body of the blog.&lt;br /&gt;
* We want for our header to stretch across the UI like a banner.&lt;br /&gt;
* To do so,&lt;br /&gt;
** I removed the header from the div classes from the header.php file.&lt;br /&gt;
** I added some div classes around the header so that we could style &lt;br /&gt;
&lt;br /&gt;
Sidebar&lt;br /&gt;
1. Addition of text widgets&lt;br /&gt;
* We need some text + image based widgets added to the sidebar.&lt;br /&gt;
* These can be added with basic html and css (inline) as a text widget to the sidebar.&lt;br /&gt;
* Fonts changed to : &lt;br /&gt;
* border width reduced.&lt;br /&gt;
&lt;br /&gt;
Custom menus&lt;br /&gt;
Custom menus can be created and registered. Steps:&lt;br /&gt;
1. &lt;br /&gt;
Footer&lt;br /&gt;
&lt;br /&gt;
Helpful Links:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------&lt;br /&gt;
-- Installing FTPS Server on Web Servers&lt;br /&gt;
-------------------------------------------&lt;br /&gt;
&lt;br /&gt;
Objective: Install FTPS server on the web servers on port 26 - test server followed by the production server.&lt;br /&gt;
&lt;br /&gt;
Steps Followed:&lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
Helpful links:&lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout /etc/vsftpd.pem -out /etc/vsftpd.pem&lt;br /&gt;
&lt;br /&gt;
rsa_cert_file=/etc/vsftpd.pem&lt;br /&gt;
rsa_private_key_file=/etc/vsftpd.pem&lt;br /&gt;
&lt;br /&gt;
username: webadmin&lt;br /&gt;
password: 9Million!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
------- Aug 2nd -------------&lt;br /&gt;
&lt;br /&gt;
''' Man page for the vsftpd.conf file '''&lt;br /&gt;
 http://vsftpd.beasts.org/vsftpd_conf.html&lt;br /&gt;
&lt;br /&gt;
Securing the FTP:&lt;br /&gt;
 https://help.ubuntu.com/lts/serverguide/ftp-server.html&lt;br /&gt;
&lt;br /&gt;
'''Customization:'''&lt;br /&gt;
''''Change the port:''''&lt;br /&gt;
Add line to /etc/vsftpd.conf: &lt;br /&gt;
 listen_port=26&lt;br /&gt;
&lt;br /&gt;
Restart the server with the command:&lt;br /&gt;
 sudo vsftpd restart&lt;br /&gt;
&lt;br /&gt;
Check the installation by checking via a browser, the following address:&lt;br /&gt;
http://128.42.44.22:26&lt;br /&gt;
&lt;br /&gt;
''''Add users''''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''''Generate keys for ou website''''&lt;br /&gt;
Generate the key with the following command:&lt;br /&gt;
 openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout /etc/vsftpd.pem -out /etc/vsftpd.pem&lt;br /&gt;
&lt;br /&gt;
Add\Update the following lines in the /etc/vsftpd.conf:&lt;br /&gt;
 rsa_cert_file=/etc/vsftpd.pem&lt;br /&gt;
 rsa_private_key_file=/etc/vsftpd.pem&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 '''' Adding Users''''&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 FTP : Files not accessible:&lt;br /&gt;
 Add the following to wp-config.php&lt;br /&gt;
 if(is_admin()) {&lt;br /&gt;
	add_filter('filesystem_method', create_function('$a', 'return &amp;quot;direct&amp;quot;;' ));&lt;br /&gt;
	define( 'FS_CHMOD_DIR', 0751 );&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
 --- Back Up:&lt;br /&gt;
 &lt;br /&gt;
 Folders:&lt;br /&gt;
 Copy created&lt;br /&gt;
 Database:&lt;br /&gt;
 mysqldump -u mcnair_wp -p wordpress &amp;gt; backup_3Aug2016.sql&lt;br /&gt;
 &lt;br /&gt;
 -- Update:&lt;br /&gt;
 &lt;br /&gt;
 https://codex.wordpress.org/Upgrading_WordPress_Extended#Step_9:_Run_the_WordPress_upgrade_program&lt;br /&gt;
 &lt;br /&gt;
 Error Resolution:&lt;br /&gt;
 https://wordpress.org/support/topic/wordpress-45-error-after-update&lt;br /&gt;
&lt;br /&gt;
''''' in case of errors, try: '''''&lt;br /&gt;
https://help.webcontrolcenter.com/kb/a992/vsftpd-ftp-server.aspx&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Wordpress_Blog_Site_(Tool)&amp;diff=7977</id>
		<title>Wordpress Blog Site (Tool)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Wordpress_Blog_Site_(Tool)&amp;diff=7977"/>
		<updated>2016-08-05T16:01:04Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Requirements ==&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
== Styling ==&lt;br /&gt;
=== Header===&lt;br /&gt;
=== Sidebar ===&lt;br /&gt;
=== Image Uploads ===&lt;br /&gt;
=== Content ===&lt;br /&gt;
=== Footer === &lt;br /&gt;
=== Blog Posts ===&lt;br /&gt;
====Titles====&lt;br /&gt;
==== Author Info ====&lt;br /&gt;
== Usability Features ==&lt;br /&gt;
===RSS===&lt;br /&gt;
===Subscription Rules===&lt;br /&gt;
&lt;br /&gt;
== User Accounts ==&lt;br /&gt;
&lt;br /&gt;
== Error Logs ==&lt;br /&gt;
&lt;br /&gt;
McNair Center Wordpress blog&lt;br /&gt;
&lt;br /&gt;
Setup:&lt;br /&gt;
Images:&lt;br /&gt;
1. Wordpress currently looks for images in a completely different location than the one it is uploading to.&lt;br /&gt;
2. It also has trouble generating the three standard sizes - thumbnails, etc&lt;br /&gt;
&lt;br /&gt;
Permissions:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Styling:&lt;br /&gt;
Child themes:&lt;br /&gt;
*Usage of child themes when creating custom design with wordpress is recommended.&lt;br /&gt;
*Steps to create:&lt;br /&gt;
**Create a folder in the var/lib/wordpress/wp-content/themes with the title of your choice&lt;br /&gt;
**Into the newly created folder, add the header.php, style.css and functions.php file from the parent theme's folder to the child theme&lt;br /&gt;
**If the child files are blank, then all the parent theme's corresponding code is preserved.&lt;br /&gt;
**Else, if any chunk of code is added to the child theme's file, the code overrides the code in the parent theme's code.&lt;br /&gt;
**The webkit modules that adjust the display for mobile interfaces are best not changed.&lt;br /&gt;
*Once the files are created, to the style.css, add the template section enclosed in '/* ' and '*/' from the parent's style.css file.&lt;br /&gt;
*Go to the Wordpress dashboard, login as admin, and add the theme to wordpress (button should appear on the UI, along with the child theme) in the themes section&lt;br /&gt;
&lt;br /&gt;
Header&lt;br /&gt;
1. Header functions changed: &lt;br /&gt;
* The default header that comes with the twentysixteen has the header set within the same margins that govern the body of the blog.&lt;br /&gt;
* We want for our header to stretch across the UI like a banner.&lt;br /&gt;
* To do so,&lt;br /&gt;
** I removed the header from the div classes from the header.php file.&lt;br /&gt;
** I added some div classes around the header so that we could style &lt;br /&gt;
&lt;br /&gt;
Sidebar&lt;br /&gt;
1. Addition of text widgets&lt;br /&gt;
* We need some text + image based widgets added to the sidebar.&lt;br /&gt;
* These can be added with basic html and css (inline) as a text widget to the sidebar.&lt;br /&gt;
* Fonts changed to : &lt;br /&gt;
* border width reduced.&lt;br /&gt;
&lt;br /&gt;
Custom menus&lt;br /&gt;
Custom menus can be created and registered. Steps:&lt;br /&gt;
1. &lt;br /&gt;
Footer&lt;br /&gt;
&lt;br /&gt;
Helpful Links:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------&lt;br /&gt;
-- Installing FTPS Server on Web Servers&lt;br /&gt;
-------------------------------------------&lt;br /&gt;
&lt;br /&gt;
Objective: Install FTPS server on the web servers on port 26 - test server followed by the production server.&lt;br /&gt;
&lt;br /&gt;
Steps Followed:&lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
Helpful links:&lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout /etc/vsftpd.pem -out /etc/vsftpd.pem&lt;br /&gt;
&lt;br /&gt;
rsa_cert_file=/etc/vsftpd.pem&lt;br /&gt;
rsa_private_key_file=/etc/vsftpd.pem&lt;br /&gt;
&lt;br /&gt;
username: webadmin&lt;br /&gt;
password: 9Million!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
------- Aug 2nd -------------&lt;br /&gt;
&lt;br /&gt;
''' Man page for the vsftpd.conf file '''&lt;br /&gt;
 http://vsftpd.beasts.org/vsftpd_conf.html&lt;br /&gt;
&lt;br /&gt;
Securing the FTP:&lt;br /&gt;
 https://help.ubuntu.com/lts/serverguide/ftp-server.html&lt;br /&gt;
&lt;br /&gt;
'''Customization:'''&lt;br /&gt;
''''Change the port:''''&lt;br /&gt;
Add line to /etc/vsftpd.conf: &lt;br /&gt;
 listen_port=26&lt;br /&gt;
&lt;br /&gt;
Restart the server with the command:&lt;br /&gt;
 sudo vsftpd restart&lt;br /&gt;
&lt;br /&gt;
Check the installation by checking via a browser, the following address:&lt;br /&gt;
http://128.42.44.22:26&lt;br /&gt;
&lt;br /&gt;
''''Add users''''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''''Generate keys for ou website''''&lt;br /&gt;
Generate the key with the following command:&lt;br /&gt;
 openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout /etc/vsftpd.pem -out /etc/vsftpd.pem&lt;br /&gt;
&lt;br /&gt;
Add\Update the following lines in the /etc/vsftpd.conf:&lt;br /&gt;
 rsa_cert_file=/etc/vsftpd.pem&lt;br /&gt;
 rsa_private_key_file=/etc/vsftpd.pem&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 '''' Adding Users''''&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 FTP : Files not accessible:&lt;br /&gt;
 Add the following to wp-config.php&lt;br /&gt;
 if(is_admin()) {&lt;br /&gt;
	add_filter('filesystem_method', create_function('$a', 'return &amp;quot;direct&amp;quot;;' ));&lt;br /&gt;
	define( 'FS_CHMOD_DIR', 0751 );&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
 --- Back Up:&lt;br /&gt;
 &lt;br /&gt;
 Folders:&lt;br /&gt;
 Copy created&lt;br /&gt;
 Database:&lt;br /&gt;
 mysqldump -u mcnair_wp -p wordpress &amp;gt; backup_3Aug2016.sql&lt;br /&gt;
 &lt;br /&gt;
 -- Update:&lt;br /&gt;
 &lt;br /&gt;
 https://codex.wordpress.org/Upgrading_WordPress_Extended#Step_9:_Run_the_WordPress_upgrade_program&lt;br /&gt;
 &lt;br /&gt;
 Error Resolution:&lt;br /&gt;
 https://wordpress.org/support/topic/wordpress-45-error-after-update&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=EdEganDotCom:Users_For_Recent_Activity_Email_Notification&amp;diff=7769</id>
		<title>EdEganDotCom:Users For Recent Activity Email Notification</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=EdEganDotCom:Users_For_Recent_Activity_Email_Notification&amp;diff=7769"/>
		<updated>2016-07-28T21:41:15Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; #&amp;lt;!-- leave this line exactly as it is --&amp;gt; &amp;lt;pre&amp;gt; &lt;br /&gt;
# --- Email Notify List---&lt;br /&gt;
# This is a list of users who want to receive an email when wiki activity &lt;br /&gt;
# occurs from new or anonymous users. An email is sent only for an edit by &lt;br /&gt;
# a registered or anonymous user if the registered user is less than 4 hours &lt;br /&gt;
# old, or if an email has not been sent since the last 4 hours. If you'd like &lt;br /&gt;
# to add or remove yourself from this list leave a message on the Talk page. &lt;br /&gt;
# Make sure you have a valid email address set in your Preferences.&lt;br /&gt;
&lt;br /&gt;
Dayton&lt;br /&gt;
&lt;br /&gt;
## end of Email Notify List&lt;br /&gt;
&lt;br /&gt;
 #&amp;lt;/pre&amp;gt; &amp;lt;!-- leave this line exactly as it is --&amp;gt;&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=EdEganDotCom:Users_For_Recent_Activity_Email_Notification&amp;diff=7768</id>
		<title>EdEganDotCom:Users For Recent Activity Email Notification</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=EdEganDotCom:Users_For_Recent_Activity_Email_Notification&amp;diff=7768"/>
		<updated>2016-07-28T21:40:35Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; #&amp;lt;!-- leave this line exactly as it is --&amp;gt; &amp;lt;pre&amp;gt; &lt;br /&gt;
# --- Email Notify List---&lt;br /&gt;
# This is a list of users who want to receive an email when wiki activity &lt;br /&gt;
# occurs from new or anonymous users. An email is sent only for an edit by &lt;br /&gt;
# a registered or anonymous user if the registered user is less than 4 hours &lt;br /&gt;
# old, or if an email has not been sent since the last 4 hours. If you'd like &lt;br /&gt;
# to add or remove yourself from this list leave a message on the Talk page. &lt;br /&gt;
# Make sure you have a valid email address set in your Preferences.&lt;br /&gt;
&lt;br /&gt;
User1&lt;br /&gt;
User2&lt;br /&gt;
User3&lt;br /&gt;
&lt;br /&gt;
## end of Email Notify List&lt;br /&gt;
&lt;br /&gt;
 #&amp;lt;/pre&amp;gt; &amp;lt;!-- leave this line exactly as it is --&amp;gt;&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=EdEganDotCom:Users_For_Recent_Activity_Email_Notification&amp;diff=7767</id>
		<title>EdEganDotCom:Users For Recent Activity Email Notification</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=EdEganDotCom:Users_For_Recent_Activity_Email_Notification&amp;diff=7767"/>
		<updated>2016-07-28T21:39:38Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: Created page with &amp;quot;# --- Email Notify List--- # This is a list of users who want to receive an email when wiki activity  # occurs from new or anonymous users. An email is sent only for an edit b...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;# --- Email Notify List---&lt;br /&gt;
# This is a list of users who want to receive an email when wiki activity &lt;br /&gt;
# occurs from new or anonymous users. An email is sent only for an edit by &lt;br /&gt;
# a registered or anonymous user if the registered user is less than 4 hours &lt;br /&gt;
# old, or if an email has not been sent since the last 4 hours. If you'd like &lt;br /&gt;
# to add or remove yourself from this list leave a message on the Talk page. &lt;br /&gt;
# Make sure you have a valid email address set in your Preferences.&lt;br /&gt;
&lt;br /&gt;
Dayton &lt;br /&gt;
&lt;br /&gt;
## end of Email Notify List&lt;br /&gt;
&lt;br /&gt;
 #&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Wordpress_Blog_Site_(Tool)&amp;diff=7370</id>
		<title>Wordpress Blog Site (Tool)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Wordpress_Blog_Site_(Tool)&amp;diff=7370"/>
		<updated>2016-07-22T15:15:18Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: Created page with &amp;quot;== Requirements ==  == Design ==  == Styling == === Header=== === Sidebar === === Image Uploads === === Content === === Footer ===  === Blog Posts === ====Titles==== ==== Auth...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Requirements ==&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
== Styling ==&lt;br /&gt;
=== Header===&lt;br /&gt;
=== Sidebar ===&lt;br /&gt;
=== Image Uploads ===&lt;br /&gt;
=== Content ===&lt;br /&gt;
=== Footer === &lt;br /&gt;
=== Blog Posts ===&lt;br /&gt;
====Titles====&lt;br /&gt;
==== Author Info ====&lt;br /&gt;
== Usability Features ==&lt;br /&gt;
===RSS===&lt;br /&gt;
===Subscription Rules===&lt;br /&gt;
&lt;br /&gt;
== User Accounts ==&lt;br /&gt;
&lt;br /&gt;
== Error Logs ==&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Ravali_Kruthiventi_(Work_Log)&amp;diff=7312</id>
		<title>Ravali Kruthiventi (Work Log)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Ravali_Kruthiventi_(Work_Log)&amp;diff=7312"/>
		<updated>2016-07-21T16:25:47Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=== June 2016 ===&lt;br /&gt;
06/2016 - Worked on:&lt;br /&gt;
*Setting up wiki, including&lt;br /&gt;
**coloring the wiki links, headers, etc&lt;br /&gt;
**Adding access limitations, confirmation queues - access rules&lt;br /&gt;
**adding extensions that everyone needed&lt;br /&gt;
&lt;br /&gt;
*Setting up a database for merging our patent data from the Harvard dataverse and the patent data that the McNair Center collected from 2010 - 2015&lt;br /&gt;
*Setting up tables as needed for other projects&lt;br /&gt;
*Worked on the test blog site to see how Wordpress can be messed with.&lt;br /&gt;
&lt;br /&gt;
===July 2016 ===&lt;br /&gt;
&lt;br /&gt;
07/2016 - Worked on:&lt;br /&gt;
*Setting up the assignees data from the USPTO into a database into tables that Amir and Marcela can use.&lt;br /&gt;
*worked on cleaning up the patent data and databases (renaming, typecasting, etc)&lt;br /&gt;
*Currently working on the blog.&lt;br /&gt;
&lt;br /&gt;
==== Week 2 ====&lt;br /&gt;
07/14/2016 - Worked on the blog header&lt;br /&gt;
07/15/2016 - Worked on and created my research plan, added html to header. The blocks are now there, they require styling to deal with mobile interfaces.&lt;br /&gt;
&lt;br /&gt;
==== Week 3 ====&lt;br /&gt;
07/18/2016 - Blog&lt;br /&gt;
*Tried to add two posts per category - this seems to require the creation of a new widget\layout. Abandoning as it is likely to take too much time.&lt;br /&gt;
** Possible future revisit&lt;br /&gt;
*Determined how to add custom widgets to the sidebar - was able to add a basic box to the sidebar&lt;br /&gt;
&lt;br /&gt;
07/19/2016 - Blog&lt;br /&gt;
*Added custom widgets to the sidebar of the blog&lt;br /&gt;
*Changed the fonts, separators, footers.&lt;br /&gt;
*Added social media links to the header, rather than the footer (default wordpress location is the footer)&lt;br /&gt;
&lt;br /&gt;
07/20/2016 - Blog&lt;br /&gt;
*Had a quick review of the blog, and uncovered some issues that are apparent on other screen resolutions. Worked on spacing issues on the blog. EOD Update - some spacing issues exist. Will be inserting a table into the header to make the spacing better.&lt;br /&gt;
*Brainstormed changes to uspto assignees data. Will begin work on removing the duplicates tomorrow.&lt;br /&gt;
&lt;br /&gt;
07/21/2016 - Blog, Assignees Data, LinkedIn Account Creation&lt;br /&gt;
*Worked on removing duplicates from the assignees data.&lt;br /&gt;
*Working on wrapping issues&lt;br /&gt;
*Agenda:&lt;br /&gt;
**Fix spacing, insert table into header for lower screen resolutions&lt;br /&gt;
**Set up account for Dylan&lt;br /&gt;
**Get sample content and uploads from Dylan&lt;br /&gt;
**Fix header colors and patterns&lt;br /&gt;
**Get logo up&lt;br /&gt;
**Set up links to Baker and the McNair Center&lt;br /&gt;
**Tie it all up together&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Ravali_Kruthiventi_(Work_Log)&amp;diff=7310</id>
		<title>Ravali Kruthiventi (Work Log)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Ravali_Kruthiventi_(Work_Log)&amp;diff=7310"/>
		<updated>2016-07-21T16:19:13Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
06/2016 - Worked on:&lt;br /&gt;
*Setting up wiki, including&lt;br /&gt;
**coloring the wiki links, headers, etc&lt;br /&gt;
**Adding access limitations, confirmation queues - access rules&lt;br /&gt;
**adding extensions that everyone needed&lt;br /&gt;
&lt;br /&gt;
*Setting up a database for merging our patent data from the Harvard dataverse and the patent data that the McNair Center collected from 2010 - 2015&lt;br /&gt;
*Setting up tables as needed for other projects&lt;br /&gt;
*Worked on the test blog site to see how Wordpress can be messed with.&lt;br /&gt;
&lt;br /&gt;
07/2016 - Worked on:&lt;br /&gt;
*Setting up the assignees data from the USPTO into a database into tables that Amir and Marcela can use.&lt;br /&gt;
*worked on cleaning up the patent data and databases (renaming, typecasting, etc)&lt;br /&gt;
*Currently working on the blog.&lt;br /&gt;
&lt;br /&gt;
07/14/2016 - Worked on the blog header&lt;br /&gt;
07/15/2016 - Worked on and created my research plan, added html to header. The blocks are now there, they require styling to deal with mobile interfaces.&lt;br /&gt;
&lt;br /&gt;
07/18/2016 - Blog&lt;br /&gt;
*Tried to add two posts per category - this seems to require the creation of a new widget\layout. Abandoning as it is likely to take too much time.&lt;br /&gt;
** Possible future revisit&lt;br /&gt;
*Determined how to add custom widgets to the sidebar - was able to add a basic box to the sidebar&lt;br /&gt;
&lt;br /&gt;
07/19/2016 - Blog&lt;br /&gt;
*Added custom widgets to the sidebar of the blog&lt;br /&gt;
*Changed the fonts, separators, footers.&lt;br /&gt;
*Added social media links to the header, rather than the footer (default wordpress location is the footer)&lt;br /&gt;
&lt;br /&gt;
07/20/2016 - Blog&lt;br /&gt;
*Had a quick review of the blog, and uncovered some issues that are apparent on other screen resolutions. Worked on spacing issues on the blog. EOD Update - some spacing issues exist. Will be inserting a table into the header to make the spacing better.&lt;br /&gt;
*Brainstormed changes to uspto assignees data. Will begin work on removing the duplicates tomorrow.&lt;br /&gt;
07/21/2016 - &lt;br /&gt;
*Worked on removing duplicates from the assignees data.&lt;br /&gt;
*Working on wrapping issues&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Ravali_Kruthiventi_(Work_Log)&amp;diff=6717</id>
		<title>Ravali Kruthiventi (Work Log)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Ravali_Kruthiventi_(Work_Log)&amp;diff=6717"/>
		<updated>2016-07-15T17:47:28Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
06/2016 - Worked on:&lt;br /&gt;
*Setting up wiki, including&lt;br /&gt;
**coloring the wiki links, headers, etc&lt;br /&gt;
**Adding access limitations, confirmation queues - access rules&lt;br /&gt;
**adding extensions that everyone needed&lt;br /&gt;
&lt;br /&gt;
*Setting up a database for merging our patent data from the Harvard dataverse and the patent data that the McNair Center collected from 2010 - 2015&lt;br /&gt;
*Setting up tables as needed for other projects&lt;br /&gt;
*Worked on the test blog site to see how Wordpress can be messed with.&lt;br /&gt;
&lt;br /&gt;
07/2016 - Worked on:&lt;br /&gt;
*Setting up the assignees data from the USPTO into a database into tables that Amir and Marcela can use.&lt;br /&gt;
*worked on cleaning up the patent data and databases (renaming, typecasting, etc)&lt;br /&gt;
*Currently working on the blog.&lt;br /&gt;
&lt;br /&gt;
07/14/2016 - Worked on the blog header&lt;br /&gt;
07/15/2016 - Worked on and created my research plan&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Ravali_Kruthiventi_(Research_Plan)&amp;diff=6707</id>
		<title>Ravali Kruthiventi (Research Plan)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Ravali_Kruthiventi_(Research_Plan)&amp;diff=6707"/>
		<updated>2016-07-15T17:39:27Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: /* Project - USPTO Assignees, Patent and Citation Data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
===Project - USPTO Assignees, Patent and Citation Data===&lt;br /&gt;
==== Assignees Data ====&lt;br /&gt;
*Data source: [[Patent Data Processing - SQL Steps | patent database]] (merged data from patent_2015 and patentdata databases)&lt;br /&gt;
**Issues: citations data contains non numeric patent numbers (likely application numbers, etc)&lt;br /&gt;
**Solution: &lt;br /&gt;
***Segregate into smaller tables so that Amir and Marcela can identify patterns&lt;br /&gt;
***link back to appropriate patent numbers from the patent table&lt;br /&gt;
**Time to implement: 1 day&lt;br /&gt;
**Priority:&lt;br /&gt;
**Teams waiting for it:&lt;br /&gt;
*** Marcela and Amir&lt;br /&gt;
****Project : [[ Patent Data Wiki Page | Patent data analysis ]]&lt;br /&gt;
***Jake and James, potentially could need this down the line&lt;br /&gt;
****Project :[[Leveraged Buyout Innovation (Academic Paper)| LBO data]]&lt;br /&gt;
** Deadline:&lt;br /&gt;
&lt;br /&gt;
*Data Source: [[USPTO Assignees Data | USPTO Bulk Data repository]]&lt;br /&gt;
** Issues:&lt;br /&gt;
*** The script inserts copies of data into the tables. &lt;br /&gt;
*** Analysis required on the data to make sure the data was inserted correctly from the XML files.&lt;br /&gt;
*** Analysis is also required to determine whether this data is better than the data we have in the patent database right now.&lt;br /&gt;
**** Action owners : Amir and Marcela&lt;br /&gt;
** Solution:&lt;br /&gt;
*** Amir and Marcela and/or I need to look at the data to determine quality&lt;br /&gt;
**** If they find that any of this data is better than the data we currently have, I will have to figure out a way to integrate this data into our data model for patent data.&lt;br /&gt;
*** Amir and Marcela and/or I will need to delete the copies&lt;br /&gt;
** Time to implement:&lt;br /&gt;
** Priority:&lt;br /&gt;
** Teams waiting for it:&lt;br /&gt;
** Deadline:&lt;br /&gt;
&lt;br /&gt;
===Project - Lex Machina Data===&lt;br /&gt;
*Data Source:&lt;br /&gt;
** Issues:&lt;br /&gt;
** Solution:&lt;br /&gt;
** Time to implement:&lt;br /&gt;
** Priority:&lt;br /&gt;
** Teams waiting for it:&lt;br /&gt;
** Deadline:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project - Pattern Recognition on Patent Data through Machine Learning ===&lt;br /&gt;
&lt;br /&gt;
*Data Source: The patent database.&lt;br /&gt;
** Plan:&lt;br /&gt;
***Technique&lt;br /&gt;
****Determine research question to be asked&lt;br /&gt;
****Scrub data&lt;br /&gt;
****Determine 3-4 mining\machine learning techniques to best extract patterns&lt;br /&gt;
****Train the algorithms&lt;br /&gt;
****Run the algos on sample dataset&lt;br /&gt;
****Determine the algo with best results&lt;br /&gt;
****Implement the &lt;br /&gt;
** Known Issues:&lt;br /&gt;
***Dataset to be cleaned, quality analyzed as specified above.&lt;br /&gt;
**Deliverables&lt;br /&gt;
***Set of patterns to base further research on&lt;br /&gt;
***Research paper (?)&lt;br /&gt;
****Documentation - Wiki page&lt;br /&gt;
** Time to implement:&lt;br /&gt;
** Priority:&lt;br /&gt;
** Teams waiting for it: None&lt;br /&gt;
** Deadline:&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Ravali_Kruthiventi_(Research_Plan)&amp;diff=6703</id>
		<title>Ravali Kruthiventi (Research Plan)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Ravali_Kruthiventi_(Research_Plan)&amp;diff=6703"/>
		<updated>2016-07-15T17:35:27Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: /* Project - Pattern Recognition on Patent Data through Machine Learning */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
===Project - USPTO Assignees, Patent and Citation Data===&lt;br /&gt;
==== Assignees Data ====&lt;br /&gt;
*Data source: [[Patent Data Processing - SQL Steps | patent database]] (merged data from patent_2015 and patentdata databases)&lt;br /&gt;
**Issues: citations data contains non numeric patent numbers (likely application numbers, etc)&lt;br /&gt;
**Solution: &lt;br /&gt;
***Segregate into smaller tables so that Amir and Marcela can identify patterns&lt;br /&gt;
***link back to appropriate patent numbers from the patent table&lt;br /&gt;
**Time to implement: 1 day&lt;br /&gt;
**Priority:&lt;br /&gt;
**Teams waiting for it:&lt;br /&gt;
*** Marcela and Amir&lt;br /&gt;
****Project : [[ Patent Data Wiki Page | Patent data analysis ]]&lt;br /&gt;
***Jake and James, potentially could need this down the line&lt;br /&gt;
****Project :[[Leveraged Buyout Innovation (Academic Paper)| LBO data]]&lt;br /&gt;
** Deadline:&lt;br /&gt;
&lt;br /&gt;
*Data Source: [[USPTO Assignees Data | USPTO Bulk Data repository]]&lt;br /&gt;
** Issues:&lt;br /&gt;
*** The script inserts copies of data into the tables. &lt;br /&gt;
*** Analysis required on the data to make sure the data was inserted correctly from the XML files.&lt;br /&gt;
*** Analysis is also required to determine whether this data is better than the data we have in the patent database right now.&lt;br /&gt;
**** Action owners : Amir and Marcela&lt;br /&gt;
** Solution:&lt;br /&gt;
*** Amir and Marcela and/or I need to look at the data to determine quality&lt;br /&gt;
**** If they find that any of this data is better than the data we currently have, I will have to figure out a way to integrate this data into our data model for patent data.&lt;br /&gt;
*** Amir and Marcela and/or I will need to delete the copies&lt;br /&gt;
&lt;br /&gt;
** Time to implement:&lt;br /&gt;
** Priority:&lt;br /&gt;
** Teams waiting for it:&lt;br /&gt;
** Deadline:&lt;br /&gt;
&lt;br /&gt;
===Project - Lex Machina Data===&lt;br /&gt;
*Data Source:&lt;br /&gt;
** Issues:&lt;br /&gt;
** Solution:&lt;br /&gt;
** Time to implement:&lt;br /&gt;
** Priority:&lt;br /&gt;
** Teams waiting for it:&lt;br /&gt;
** Deadline:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project - Pattern Recognition on Patent Data through Machine Learning ===&lt;br /&gt;
&lt;br /&gt;
*Data Source: The patent database.&lt;br /&gt;
** Plan:&lt;br /&gt;
***Technique&lt;br /&gt;
****Determine research question to be asked&lt;br /&gt;
****Scrub data&lt;br /&gt;
****Determine 3-4 mining\machine learning techniques to best extract patterns&lt;br /&gt;
****Train the algorithms&lt;br /&gt;
****Run the algos on sample dataset&lt;br /&gt;
****Determine the algo with best results&lt;br /&gt;
****Implement the &lt;br /&gt;
** Known Issues:&lt;br /&gt;
***Dataset to be cleaned, quality analyzed as specified above.&lt;br /&gt;
**Deliverables&lt;br /&gt;
***Set of patterns to base further research on&lt;br /&gt;
***Research paper (?)&lt;br /&gt;
****Documentation - Wiki page&lt;br /&gt;
** Time to implement:&lt;br /&gt;
** Priority:&lt;br /&gt;
** Teams waiting for it: None&lt;br /&gt;
** Deadline:&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Ravali_Kruthiventi_(Research_Plan)&amp;diff=6697</id>
		<title>Ravali Kruthiventi (Research Plan)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Ravali_Kruthiventi_(Research_Plan)&amp;diff=6697"/>
		<updated>2016-07-15T17:30:52Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: /* Assignees Data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
===Project - USPTO Assignees, Patent and Citation Data===&lt;br /&gt;
==== Assignees Data ====&lt;br /&gt;
*Data source: [[Patent Data Processing - SQL Steps | patent database]] (merged data from patent_2015 and patentdata databases)&lt;br /&gt;
**Issues: citations data contains non numeric patent numbers (likely application numbers, etc)&lt;br /&gt;
**Solution: &lt;br /&gt;
***Segregate into smaller tables so that Amir and Marcela can identify patterns&lt;br /&gt;
***link back to appropriate patent numbers from the patent table&lt;br /&gt;
**Time to implement: 1 day&lt;br /&gt;
**Priority:&lt;br /&gt;
**Teams waiting for it:&lt;br /&gt;
*** Marcela and Amir&lt;br /&gt;
****Project : [[ Patent Data Wiki Page | Patent data analysis ]]&lt;br /&gt;
***Jake and James, potentially could need this down the line&lt;br /&gt;
****Project :[[Leveraged Buyout Innovation (Academic Paper)| LBO data]]&lt;br /&gt;
** Deadline:&lt;br /&gt;
&lt;br /&gt;
*Data Source: [[USPTO Assignees Data | USPTO Bulk Data repository]]&lt;br /&gt;
** Issues:&lt;br /&gt;
*** The script inserts copies of data into the tables. &lt;br /&gt;
*** Analysis required on the data to make sure the data was inserted correctly from the XML files.&lt;br /&gt;
*** Analysis is also required to determine whether this data is better than the data we have in the patent database right now.&lt;br /&gt;
**** Action owners : Amir and Marcela&lt;br /&gt;
** Solution:&lt;br /&gt;
*** Amir and Marcela and/or I need to look at the data to determine quality&lt;br /&gt;
**** If they find that any of this data is better than the data we currently have, I will have to figure out a way to integrate this data into our data model for patent data.&lt;br /&gt;
*** Amir and Marcela and/or I will need to delete the copies&lt;br /&gt;
&lt;br /&gt;
** Time to implement:&lt;br /&gt;
** Priority:&lt;br /&gt;
** Teams waiting for it:&lt;br /&gt;
** Deadline:&lt;br /&gt;
&lt;br /&gt;
===Project - Lex Machina Data===&lt;br /&gt;
*Data Source:&lt;br /&gt;
** Issues:&lt;br /&gt;
** Solution:&lt;br /&gt;
** Time to implement:&lt;br /&gt;
** Priority:&lt;br /&gt;
** Teams waiting for it:&lt;br /&gt;
** Deadline:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project - Pattern Recognition on Patent Data through Machine Learning ===&lt;br /&gt;
&lt;br /&gt;
*Data Source:&lt;br /&gt;
&lt;br /&gt;
** Plan:&lt;br /&gt;
***Technique&lt;br /&gt;
&lt;br /&gt;
** Known Issues:&lt;br /&gt;
** Solution:&lt;br /&gt;
** Time to implement:&lt;br /&gt;
** Priority:&lt;br /&gt;
** Teams waiting for it:&lt;br /&gt;
** Deadline:&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Ravali_Kruthiventi_(Research_Plan)&amp;diff=6695</id>
		<title>Ravali Kruthiventi (Research Plan)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Ravali_Kruthiventi_(Research_Plan)&amp;diff=6695"/>
		<updated>2016-07-15T17:29:08Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: /* Assignees Data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
===Project - USPTO Assignees, Patent and Citation Data===&lt;br /&gt;
==== Assignees Data ====&lt;br /&gt;
*Data source: [[Patent Data Processing - SQL Steps | patent database]] (merged data from patent_2015 and patentdata databases)&lt;br /&gt;
**Issues: citations data contains non numeric patent numbers (likely application numbers, etc)&lt;br /&gt;
**Solution: &lt;br /&gt;
***Segregate into smaller tables so that Amir and Marcela can identify patterns&lt;br /&gt;
***link back to appropriate patent numbers from the patent table&lt;br /&gt;
**Time to implement: 1 day&lt;br /&gt;
**Priority:&lt;br /&gt;
**Teams waiting for it:&lt;br /&gt;
*** Marcela and Amir&lt;br /&gt;
****Project : [[ Patent Data Wiki Page | Patent data analysis ]]&lt;br /&gt;
***Jake and James, potentially could need this down the line&lt;br /&gt;
****Project :[[Leveraged Buyout Innovation (Academic Paper)| LBO data]]&lt;br /&gt;
** Deadline:&lt;br /&gt;
&lt;br /&gt;
*Data Source: [[USPTO Assignees Data | USPTO Bulk Data repository]]&lt;br /&gt;
** Issues:&lt;br /&gt;
*** The script inserts copies of data into the tables. &lt;br /&gt;
*** Analysis required on the data to make sure the data was inserted correctly from the XML files.&lt;br /&gt;
*** Analysis is also required to determine whether this data is better than the data we have in the patent database right now.&lt;br /&gt;
**** Action owners : Amir and Marcela&lt;br /&gt;
** Solution:&lt;br /&gt;
*** Amir and Marcela and/or I need to look at the data to determine quality&lt;br /&gt;
*** Amir and Marcela and/or I will need to delete the copies&lt;br /&gt;
** Time to implement:&lt;br /&gt;
** Priority:&lt;br /&gt;
** Teams waiting for it:&lt;br /&gt;
** Deadline:&lt;br /&gt;
&lt;br /&gt;
===Project - Lex Machina Data===&lt;br /&gt;
*Data Source:&lt;br /&gt;
** Issues:&lt;br /&gt;
** Solution:&lt;br /&gt;
** Time to implement:&lt;br /&gt;
** Priority:&lt;br /&gt;
** Teams waiting for it:&lt;br /&gt;
** Deadline:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project - Pattern Recognition on Patent Data through Machine Learning ===&lt;br /&gt;
&lt;br /&gt;
*Data Source:&lt;br /&gt;
&lt;br /&gt;
** Plan:&lt;br /&gt;
***Technique&lt;br /&gt;
&lt;br /&gt;
** Known Issues:&lt;br /&gt;
** Solution:&lt;br /&gt;
** Time to implement:&lt;br /&gt;
** Priority:&lt;br /&gt;
** Teams waiting for it:&lt;br /&gt;
** Deadline:&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Ravali_Kruthiventi_(Research_Plan)&amp;diff=6690</id>
		<title>Ravali Kruthiventi (Research Plan)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Ravali_Kruthiventi_(Research_Plan)&amp;diff=6690"/>
		<updated>2016-07-15T17:26:37Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: /* Assignees Data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
===Project - USPTO Assignees, Patent and Citation Data===&lt;br /&gt;
==== Assignees Data ====&lt;br /&gt;
*Data source: [[Patent Data Processing - SQL Steps | patent database]] (merged data from patent_2015 and patentdata databases)&lt;br /&gt;
**Issues: citations data contains non numeric patent numbers (likely application numbers, etc)&lt;br /&gt;
**Solution: &lt;br /&gt;
***Segregate into smaller tables so that Amir and Marcela can identify patterns&lt;br /&gt;
***link back to appropriate patent numbers from the patent table&lt;br /&gt;
**Time to implement: 1 day&lt;br /&gt;
**Priority:&lt;br /&gt;
**Teams waiting for it:&lt;br /&gt;
*** Marcela and Amir&lt;br /&gt;
****Project : Patent data analysis (?)&lt;br /&gt;
***Jake and James, potentially could need this down the line&lt;br /&gt;
****Project : LBO data&lt;br /&gt;
** Deadline:&lt;br /&gt;
&lt;br /&gt;
*Data Source: [[USPTO Assignees Data | USPTO Bulk Data repository]]&lt;br /&gt;
** Issues:&lt;br /&gt;
*** The script inserts copies of data into the tables. &lt;br /&gt;
*** Analysis required on the data to make sure the data was inserted correctly from the XML files.&lt;br /&gt;
*** Analysis is also required to determine whether this data is better than the data we have in the patent database right now.&lt;br /&gt;
**** Action owners : Amir and Marcela&lt;br /&gt;
** Solution:&lt;br /&gt;
*** Amir and Marcela and/or I need to look at the data to determine quality&lt;br /&gt;
*** Amir and Marcela and/or I will need to delete the copies&lt;br /&gt;
** Time to implement:&lt;br /&gt;
** Priority:&lt;br /&gt;
** Teams waiting for it:&lt;br /&gt;
** Deadline:&lt;br /&gt;
&lt;br /&gt;
===Project - Lex Machina Data===&lt;br /&gt;
*Data Source:&lt;br /&gt;
** Issues:&lt;br /&gt;
** Solution:&lt;br /&gt;
** Time to implement:&lt;br /&gt;
** Priority:&lt;br /&gt;
** Teams waiting for it:&lt;br /&gt;
** Deadline:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project - Pattern Recognition on Patent Data through Machine Learning ===&lt;br /&gt;
&lt;br /&gt;
*Data Source:&lt;br /&gt;
&lt;br /&gt;
** Plan:&lt;br /&gt;
***Technique&lt;br /&gt;
&lt;br /&gt;
** Known Issues:&lt;br /&gt;
** Solution:&lt;br /&gt;
** Time to implement:&lt;br /&gt;
** Priority:&lt;br /&gt;
** Teams waiting for it:&lt;br /&gt;
** Deadline:&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Ravali_Kruthiventi_(Research_Plan)&amp;diff=6688</id>
		<title>Ravali Kruthiventi (Research Plan)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Ravali_Kruthiventi_(Research_Plan)&amp;diff=6688"/>
		<updated>2016-07-15T17:24:07Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: /* Assignees Data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
===Project - USPTO Assignees, Patent and Citation Data===&lt;br /&gt;
==== Assignees Data ====&lt;br /&gt;
*Data source: [[Patent Data Processing - SQL Steps | patent database]] (merged data from patent_2015 and patentdata databases)&lt;br /&gt;
**Issues: citations data contains non numeric patent numbers (likely application numbers, etc)&lt;br /&gt;
**Solution: &lt;br /&gt;
***Segregate into smaller tables so that Amir and Marcela can identify patterns&lt;br /&gt;
***link back to appropriate patent numbers from the patent table&lt;br /&gt;
**Time to implement: 1 day&lt;br /&gt;
**Priority:&lt;br /&gt;
**Teams waiting for it:&lt;br /&gt;
*** Marcela and Amir&lt;br /&gt;
****Project : Patent data analysis (?)&lt;br /&gt;
***Jake and James, potentially could need this down the line&lt;br /&gt;
****Project : LBO data&lt;br /&gt;
** Deadline:&lt;br /&gt;
&lt;br /&gt;
*Data Source: USPTO Bulk Data repository&lt;br /&gt;
** Issues:&lt;br /&gt;
*** The script inserts copies of data into the tables. &lt;br /&gt;
*** Analysis required on the data to make sure the data was inserted correctly from the XML files.&lt;br /&gt;
*** Analysis is also required to determine whether this data is better than the data we have in the patent database right now.&lt;br /&gt;
**** Action owners : Amir and Marcela&lt;br /&gt;
** Solution:&lt;br /&gt;
*** Amir and Marcela and/or I need to look at the data to determine quality&lt;br /&gt;
*** Amir and Marcela and/or I will need to delete the copies&lt;br /&gt;
** Time to implement:&lt;br /&gt;
** Priority:&lt;br /&gt;
** Teams waiting for it:&lt;br /&gt;
** Deadline:&lt;br /&gt;
&lt;br /&gt;
===Project - Lex Machina Data===&lt;br /&gt;
*Data Source:&lt;br /&gt;
** Issues:&lt;br /&gt;
** Solution:&lt;br /&gt;
** Time to implement:&lt;br /&gt;
** Priority:&lt;br /&gt;
** Teams waiting for it:&lt;br /&gt;
** Deadline:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project - Pattern Recognition on Patent Data through Machine Learning ===&lt;br /&gt;
&lt;br /&gt;
*Data Source:&lt;br /&gt;
&lt;br /&gt;
** Plan:&lt;br /&gt;
***Technique&lt;br /&gt;
&lt;br /&gt;
** Known Issues:&lt;br /&gt;
** Solution:&lt;br /&gt;
** Time to implement:&lt;br /&gt;
** Priority:&lt;br /&gt;
** Teams waiting for it:&lt;br /&gt;
** Deadline:&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Ravali_Kruthiventi_(Research_Plan)&amp;diff=6683</id>
		<title>Ravali Kruthiventi (Research Plan)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Ravali_Kruthiventi_(Research_Plan)&amp;diff=6683"/>
		<updated>2016-07-15T17:18:16Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: /* Assignees Data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
===Project - USPTO Assignees, Patent and Citation Data===&lt;br /&gt;
==== Assignees Data ====&lt;br /&gt;
*Data source: patent database (merged data from patent_2015 and patentdata databases)&lt;br /&gt;
**Issues: citations data contains non numeric patent numbers (likely application numbers, etc)&lt;br /&gt;
**Solution: &lt;br /&gt;
***Segregate into smaller tables so that Amir and Marcela can identify patterns&lt;br /&gt;
***link back to appropriate patent numbers from the patent table&lt;br /&gt;
**Time to implement: 1 day&lt;br /&gt;
**Priority:&lt;br /&gt;
**Teams waiting for it:&lt;br /&gt;
*** Marcela and Amir&lt;br /&gt;
****Project : Patent data analysis (?)&lt;br /&gt;
***Jake and James, potentially could need this down the line&lt;br /&gt;
****Project : LBO data&lt;br /&gt;
** Deadline:&lt;br /&gt;
&lt;br /&gt;
*Data Source: USPTO Bulk Data repository&lt;br /&gt;
** Issues:&lt;br /&gt;
*** The script inserts copies of data into the tables. &lt;br /&gt;
*** Analysis required on the data to make sure the data was inserted correctly from the XML files.&lt;br /&gt;
*** Analysis is also required to determine whether this data is better than the data we have in the patent database right now.&lt;br /&gt;
**** Action owners : Amir and Marcela&lt;br /&gt;
** Solution:&lt;br /&gt;
*** Amir and Marcela and/or I need to look at the data to determine quality&lt;br /&gt;
*** Amir and Marcela and/or I will need to delete the copies&lt;br /&gt;
** Time to implement:&lt;br /&gt;
** Priority:&lt;br /&gt;
** Teams waiting for it:&lt;br /&gt;
** Deadline:&lt;br /&gt;
&lt;br /&gt;
===Project - Lex Machina Data===&lt;br /&gt;
*Data Source:&lt;br /&gt;
** Issues:&lt;br /&gt;
** Solution:&lt;br /&gt;
** Time to implement:&lt;br /&gt;
** Priority:&lt;br /&gt;
** Teams waiting for it:&lt;br /&gt;
** Deadline:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project - Pattern Recognition on Patent Data through Machine Learning ===&lt;br /&gt;
&lt;br /&gt;
*Data Source:&lt;br /&gt;
&lt;br /&gt;
** Plan:&lt;br /&gt;
***Technique&lt;br /&gt;
&lt;br /&gt;
** Known Issues:&lt;br /&gt;
** Solution:&lt;br /&gt;
** Time to implement:&lt;br /&gt;
** Priority:&lt;br /&gt;
** Teams waiting for it:&lt;br /&gt;
** Deadline:&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Ravali_Kruthiventi_(Research_Plan)&amp;diff=6682</id>
		<title>Ravali Kruthiventi (Research Plan)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Ravali_Kruthiventi_(Research_Plan)&amp;diff=6682"/>
		<updated>2016-07-15T17:17:44Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: /* Assignees Data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
===Project - USPTO Assignees, Patent and Citation Data===&lt;br /&gt;
==== Assignees Data ====&lt;br /&gt;
*Data source: patent database (merged data from patent_2015 and patentdata databases)&lt;br /&gt;
**Issues: citations data contains non numeric patent numbers (likely application numbers, etc)&lt;br /&gt;
&lt;br /&gt;
**Solution: &lt;br /&gt;
***Segregate into smaller tables so that Amir and Marcela can identify patterns&lt;br /&gt;
***link back to appropriate patent numbers from the patent table&lt;br /&gt;
**Time to implement: 1 day&lt;br /&gt;
**Priority:&lt;br /&gt;
**Teams waiting for it:&lt;br /&gt;
*** Marcela and Amir&lt;br /&gt;
****Project : Patent data analysis (?)&lt;br /&gt;
***Jake and James, potentially could need this down the line&lt;br /&gt;
****Project : LBO data&lt;br /&gt;
** Deadline:&lt;br /&gt;
*Data Source: USPTO Bulk Data repository&lt;br /&gt;
** Issues:&lt;br /&gt;
*** The script inserts copies of data into the tables. &lt;br /&gt;
*** Analysis required on the data to make sure the data was inserted correctly from the XML files.&lt;br /&gt;
*** Analysis is also required to determine whether this data is better than the data we have in the patent database right now.&lt;br /&gt;
**** Action owners : Amir and Marcela&lt;br /&gt;
** Solution:&lt;br /&gt;
*** Amir and Marcela and/or I need to look at the data to determine quality&lt;br /&gt;
*** Amir and Marcela and/or I will need to delete the copies&lt;br /&gt;
** Time to implement:&lt;br /&gt;
** Priority:&lt;br /&gt;
** Teams waiting for it:&lt;br /&gt;
** Deadline:&lt;br /&gt;
&lt;br /&gt;
===Project - Lex Machina Data===&lt;br /&gt;
*Data Source:&lt;br /&gt;
** Issues:&lt;br /&gt;
** Solution:&lt;br /&gt;
** Time to implement:&lt;br /&gt;
** Priority:&lt;br /&gt;
** Teams waiting for it:&lt;br /&gt;
** Deadline:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project - Pattern Recognition on Patent Data through Machine Learning ===&lt;br /&gt;
&lt;br /&gt;
*Data Source:&lt;br /&gt;
&lt;br /&gt;
** Plan:&lt;br /&gt;
***Technique&lt;br /&gt;
&lt;br /&gt;
** Known Issues:&lt;br /&gt;
** Solution:&lt;br /&gt;
** Time to implement:&lt;br /&gt;
** Priority:&lt;br /&gt;
** Teams waiting for it:&lt;br /&gt;
** Deadline:&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Ravali_Kruthiventi_(Research_Plan)&amp;diff=6679</id>
		<title>Ravali Kruthiventi (Research Plan)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Ravali_Kruthiventi_(Research_Plan)&amp;diff=6679"/>
		<updated>2016-07-15T17:15:33Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
===Project - USPTO Assignees, Patent and Citation Data===&lt;br /&gt;
==== Assignees Data ====&lt;br /&gt;
*Data source: patent database (merged data from patent_2015 and patentdata databases)&lt;br /&gt;
**Issues: citations data contains non numeric patent numbers (likely application numbers, etc)&lt;br /&gt;
&lt;br /&gt;
**Solution: &lt;br /&gt;
***Segregate into smaller tables so that Amir and Marcela can identify patterns&lt;br /&gt;
***link back to appropriate patent numbers from the patent table&lt;br /&gt;
&lt;br /&gt;
**Time to implement: 1 day&lt;br /&gt;
&lt;br /&gt;
**Priority:&lt;br /&gt;
&lt;br /&gt;
**Teams waiting for it:&lt;br /&gt;
*** Marcela and Amir&lt;br /&gt;
****Project : Patent data analysis (?)&lt;br /&gt;
***Jake and James, potentially could need this down the line&lt;br /&gt;
****Project : LBO data&lt;br /&gt;
&lt;br /&gt;
** Deadline:&lt;br /&gt;
&lt;br /&gt;
*Data Source: USPTO Bulk Data repository&lt;br /&gt;
** Issues:&lt;br /&gt;
*** The script inserts copies of data into the tables. &lt;br /&gt;
*** Analysis required on the data to make sure the data was inserted correctly from the XML files.&lt;br /&gt;
*** Analysis is also required to determine whether this data is better than the data we have in the patent database right now.&lt;br /&gt;
**** Action owners : Amir and Marcela&lt;br /&gt;
&lt;br /&gt;
** Solution:&lt;br /&gt;
*** Amir and Marcela and/or I need to look at the data to determine quality&lt;br /&gt;
*** Amir and Marcela and/or I will need to delete the copies&lt;br /&gt;
&lt;br /&gt;
** Time to implement:&lt;br /&gt;
** Priority:&lt;br /&gt;
** Teams waiting for it:&lt;br /&gt;
** Deadline:&lt;br /&gt;
&lt;br /&gt;
===Project - Lex Machina Data===&lt;br /&gt;
*Data Source:&lt;br /&gt;
** Issues:&lt;br /&gt;
** Solution:&lt;br /&gt;
** Time to implement:&lt;br /&gt;
** Priority:&lt;br /&gt;
** Teams waiting for it:&lt;br /&gt;
** Deadline:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project - Pattern Recognition on Patent Data through Machine Learning ===&lt;br /&gt;
&lt;br /&gt;
*Data Source:&lt;br /&gt;
&lt;br /&gt;
** Plan:&lt;br /&gt;
***Technique&lt;br /&gt;
&lt;br /&gt;
** Known Issues:&lt;br /&gt;
** Solution:&lt;br /&gt;
** Time to implement:&lt;br /&gt;
** Priority:&lt;br /&gt;
** Teams waiting for it:&lt;br /&gt;
** Deadline:&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Ravali_Kruthiventi_(Research_Plan)&amp;diff=6675</id>
		<title>Ravali Kruthiventi (Research Plan)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Ravali_Kruthiventi_(Research_Plan)&amp;diff=6675"/>
		<updated>2016-07-15T17:14:26Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: /* Project - USPTO Assignees, Patent and Citation Data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
===Project - USPTO Assignees, Patent and Citation Data===&lt;br /&gt;
==== Assignees Data ====&lt;br /&gt;
*Data source: patent database (merged data from patent_2015 and patentdata databases)&lt;br /&gt;
** Issues: citations data contains non numeric patent numbers (likely application numbers, etc)&lt;br /&gt;
&lt;br /&gt;
** Solution: &lt;br /&gt;
*** Segregate into smaller tables so that Amir and Marcela can identify patterns&lt;br /&gt;
*** link back to appropriate patent numbers from the patent table&lt;br /&gt;
&lt;br /&gt;
** Time to implement: 1 day&lt;br /&gt;
&lt;br /&gt;
** Priority:&lt;br /&gt;
&lt;br /&gt;
** Teams waiting for it:&lt;br /&gt;
*** Marcela and Amair&lt;br /&gt;
****Project : Patent data analysis (?)&lt;br /&gt;
*** Jake and James, potentially could need this down the line&lt;br /&gt;
**** Project : LBO data&lt;br /&gt;
&lt;br /&gt;
** Deadline:&lt;br /&gt;
&lt;br /&gt;
*Data Source: USPTO Bulk Data repository&lt;br /&gt;
** Issues:&lt;br /&gt;
*** The script inserts copies of data into the tables. &lt;br /&gt;
*** Analysis required on the data to make sure the data was inserted correctly from the XML files.&lt;br /&gt;
*** Analysis is also required to determine whether this data is better than the data we have in the patent database right now.&lt;br /&gt;
**** Action owners : Amir and Marcela&lt;br /&gt;
&lt;br /&gt;
** Solution:&lt;br /&gt;
*** Amir and Marcela and/or I need to look at the data to determine quality&lt;br /&gt;
*** Amir and Marcela and/or I will need to delete the copies&lt;br /&gt;
&lt;br /&gt;
** Time to implement:&lt;br /&gt;
** Priority:&lt;br /&gt;
** Teams waiting for it:&lt;br /&gt;
** Deadline:&lt;br /&gt;
&lt;br /&gt;
===Project - Lex Machina Data===&lt;br /&gt;
*Data Source:&lt;br /&gt;
** Issues:&lt;br /&gt;
** Solution:&lt;br /&gt;
** Time to implement:&lt;br /&gt;
** Priority:&lt;br /&gt;
** Teams waiting for it:&lt;br /&gt;
** Deadline:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project - Pattern Recognition on Patent Data through Machine Learning ===&lt;br /&gt;
&lt;br /&gt;
*Data Source:&lt;br /&gt;
&lt;br /&gt;
** Plan:&lt;br /&gt;
***Technique&lt;br /&gt;
&lt;br /&gt;
** Known Issues:&lt;br /&gt;
** Solution:&lt;br /&gt;
** Time to implement:&lt;br /&gt;
** Priority:&lt;br /&gt;
** Teams waiting for it:&lt;br /&gt;
** Deadline:&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Ravali_Kruthiventi_(Research_Plan)&amp;diff=6659</id>
		<title>Ravali Kruthiventi (Research Plan)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Ravali_Kruthiventi_(Research_Plan)&amp;diff=6659"/>
		<updated>2016-07-15T17:03:08Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: Created page with &amp;quot; ===Project - USPTO Assignees, Patent and Citation Data=== ==== Assignees Data ==== *Data source: ** Issues: ** Solution: ** Time to implement: ** Priority: ** Teams waiting f...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
===Project - USPTO Assignees, Patent and Citation Data===&lt;br /&gt;
==== Assignees Data ====&lt;br /&gt;
*Data source:&lt;br /&gt;
** Issues:&lt;br /&gt;
** Solution:&lt;br /&gt;
** Time to implement:&lt;br /&gt;
** Priority:&lt;br /&gt;
** Teams waiting for it:&lt;br /&gt;
** Deadline:&lt;br /&gt;
&lt;br /&gt;
*Data Source:&lt;br /&gt;
** Issues:&lt;br /&gt;
** Solution:&lt;br /&gt;
** Time to implement:&lt;br /&gt;
** Priority:&lt;br /&gt;
** Teams waiting for it:&lt;br /&gt;
** Deadline:&lt;br /&gt;
&lt;br /&gt;
===Project - Lex Machina Data===&lt;br /&gt;
*Data Source:&lt;br /&gt;
** Issues:&lt;br /&gt;
** Solution:&lt;br /&gt;
** Time to implement:&lt;br /&gt;
** Priority:&lt;br /&gt;
** Teams waiting for it:&lt;br /&gt;
** Deadline:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project - Pattern Recognition on Patent Data through Machine Learning ===&lt;br /&gt;
&lt;br /&gt;
*Data Source:&lt;br /&gt;
&lt;br /&gt;
** Plan:&lt;br /&gt;
***Technique&lt;br /&gt;
&lt;br /&gt;
** Known Issues:&lt;br /&gt;
** Solution:&lt;br /&gt;
** Time to implement:&lt;br /&gt;
** Priority:&lt;br /&gt;
** Teams waiting for it:&lt;br /&gt;
** Deadline:&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Ravali_Kruthiventi_(Work_Log)&amp;diff=6654</id>
		<title>Ravali Kruthiventi (Work Log)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Ravali_Kruthiventi_(Work_Log)&amp;diff=6654"/>
		<updated>2016-07-15T16:55:42Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: Created page with &amp;quot;07/14/2016 - Worked on the blog header 07/15/2016 - Worked on and created my research plan&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;07/14/2016 - Worked on the blog header&lt;br /&gt;
07/15/2016 - Worked on and created my research plan&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Patent_Data_Cleanup_(June_2016)&amp;diff=4527</id>
		<title>Patent Data Cleanup (June 2016)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Patent_Data_Cleanup_(June_2016)&amp;diff=4527"/>
		<updated>2016-07-07T16:33:22Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: /* About this Page */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About this Page ==&lt;br /&gt;
&lt;br /&gt;
This page contains the script that was used to clean up the patents and assignees tables in allpatent.&lt;br /&gt;
&lt;br /&gt;
Cleaning up includes:&lt;br /&gt;
* Cleaning 'NULL' string and -1 inserts : at the time of merging the patentdata and patent_2015 databases, I inserted 'NULL' strings and -1 in integer columns to differentiate between NULLs that came from the vendor, and 'NULL's that I inserted because of no column overlap.&lt;br /&gt;
** The 'NULL's got replaced with NULL&lt;br /&gt;
** The -1s got replaced with NULL as well.&lt;br /&gt;
&lt;br /&gt;
* Merging some more columns, and dropping unnecessary columns:&lt;br /&gt;
** At the time of merging the tables, some columns, particularly in the patent table, were not merged as they should have been.&lt;br /&gt;
** The script that follows merges those columns as well.&lt;br /&gt;
 NOTE: The patent data page detailing the SQL steps followed to merge the data now has the updated table structures. The script on this page can be used as a reference when trying to debug any (unlikely) merging errors&lt;br /&gt;
&lt;br /&gt;
* Renaming tables and columns&lt;br /&gt;
** Table names and column names have been standardized.&lt;br /&gt;
** General rule of thumb is : short column names, singular table names (for example : patent and not patents)&lt;br /&gt;
&lt;br /&gt;
== Script ==&lt;br /&gt;
 ALTER TABLE patents&lt;br /&gt;
 RENAME COLUMN patentnumber TO patent;&lt;br /&gt;
&lt;br /&gt;
 ALTER TABLE patents&lt;br /&gt;
  DROP COLUMN kind,&lt;br /&gt;
  DROP COLUMN title,&lt;br /&gt;
  DROP COLUMN ussubclass, **&lt;br /&gt;
  DROP COLUMN maingroup, --&lt;br /&gt;
  DROP COLUMN subgroup,--&lt;br /&gt;
  DROP COLUMN cpcsubclass, ++&lt;br /&gt;
  DROP COLUMN cpcmaingroup, ++&lt;br /&gt;
  DROP COLUMN classificationnationalcountry,&lt;br /&gt;
  DROP COLUMN classificationnationalclass,** (?)&lt;br /&gt;
  DROP COLUMN primaryexaminerfirstname,&lt;br /&gt;
  DROP COLUMN primaryexaminerlastname,&lt;br /&gt;
  DROP COLUMN primaryexaminerdepartment,&lt;br /&gt;
  DROP COLUMN filename;&lt;br /&gt;
&lt;br /&gt;
 UPDATE patents&lt;br /&gt;
  SET type = '2015'&lt;br /&gt;
  WHERE type != 'NULL';&lt;br /&gt;
&lt;br /&gt;
 -- RESULT : UPDATE 1646225&lt;br /&gt;
&lt;br /&gt;
 UPDATE patents&lt;br /&gt;
  SET type = '2010'&lt;br /&gt;
  WHERE type = 'NULL';&lt;br /&gt;
 -- RESULT : UPDATE 3764926&lt;br /&gt;
&lt;br /&gt;
 /* Join the historical patent data from the US PTO with the patents table */&lt;br /&gt;
&lt;br /&gt;
 ALTER TABLE PATENTS&lt;br /&gt;
  ADD COLUMN nber INT,&lt;br /&gt;
  ADD COLUMN uspc varchar,&lt;br /&gt;
  ADD COLUMN uspc_sub varchar;&lt;br /&gt;
&lt;br /&gt;
 UPDATE patents p&lt;br /&gt;
  SET nber = hp.nber,&lt;br /&gt;
  uspc = hp.uspc,&lt;br /&gt;
  uspc_sub = hp.uspc&lt;br /&gt;
   FROM historicalpatentdata hp&lt;br /&gt;
   WHERE hp.patentnumber = CAST(p.patent AS varchar);&lt;br /&gt;
&lt;br /&gt;
 -- RESULT : UPDATE 5113655&lt;br /&gt;
&lt;br /&gt;
 /* Mergeing some columns - claims and number of claims - column name : claims*/&lt;br /&gt;
 UPDATE patents&lt;br /&gt;
  SET claims = numberofclaims&lt;br /&gt;
  WHERE claims = -1;&lt;br /&gt;
 -- RESULTS : UPDATE 1646225&lt;br /&gt;
&lt;br /&gt;
 /* Merging columns - &lt;br /&gt;
 UPDATE patents&lt;br /&gt;
  SET appnum = CAST (applicationnumber AS INT)&lt;br /&gt;
  where appnum = -1;&lt;br /&gt;
 -- RESULT : UPDATE 1646225&lt;br /&gt;
&lt;br /&gt;
 UPDATE patents&lt;br /&gt;
  SET appdate = filingdate&lt;br /&gt;
  where appdate = '0001-01-01 BC'&lt;br /&gt;
  OR filingdate is not NULL;&lt;br /&gt;
&lt;br /&gt;
 -- RESULT UPDATE 1646225&lt;br /&gt;
&lt;br /&gt;
 ALTER TABLE patents&lt;br /&gt;
  DROP COLUMN apptype;&lt;br /&gt;
&lt;br /&gt;
 /* Generating GYear and AppYear from the dates */&lt;br /&gt;
 UPDATE patents&lt;br /&gt;
  SET gyear = EXTRACT(year from grantdate)&lt;br /&gt;
  WHERE gyear = -1&lt;br /&gt;
  AND grantdate IS NOT NULL;&lt;br /&gt;
 UPDATE 1646225&lt;br /&gt;
&lt;br /&gt;
 UPDATE patents&lt;br /&gt;
  SET appyear = EXTRACT(year from appdate)&lt;br /&gt;
  WHERE appyear = -1 &lt;br /&gt;
  AND appdate is not null;&lt;br /&gt;
 -- RESULT UPDATE 1646225&lt;br /&gt;
&lt;br /&gt;
 /* Test Script */&lt;br /&gt;
 SELECT patentnumber, ussubclass, maingroup, subgroup, cpcsubclass, cpcmaingroup, cpcsubgroup, classificationnationalcountry, classificationnationalclass FROM Patents LIMIT 100;&lt;br /&gt;
&lt;br /&gt;
 patent               | integer           | not null&lt;br /&gt;
  grantdate            | date              |&lt;br /&gt;
  type                 | character varying |&lt;br /&gt;
  applicationnumber    | character varying |&lt;br /&gt;
  filingdate           | date              |&lt;br /&gt;
  prioritydate         | date              |&lt;br /&gt;
  prioritycountry      | character varying |&lt;br /&gt;
  prioritypatentnumber | character varying |&lt;br /&gt;
  cpcsubgroup          | character varying |&lt;br /&gt;
  numberofclaims       | integer           |&lt;br /&gt;
  pctpatentnumber      | character varying |&lt;br /&gt;
  claims               | integer           |&lt;br /&gt;
  appnum               | integer           |&lt;br /&gt;
  gyear                | integer           |&lt;br /&gt;
  appdate              | date              |&lt;br /&gt;
  appyear              | integer           |&lt;br /&gt;
  nber                 | integer           |&lt;br /&gt;
  uspc                 | character varying |&lt;br /&gt;
  uspc_sub             | character varying &lt;br /&gt;
&lt;br /&gt;
 /* Drop the merged columns */&lt;br /&gt;
&lt;br /&gt;
 ALTER TABLE patents&lt;br /&gt;
  DROP COLUMN numberofclaims,&lt;br /&gt;
  DROP COLUMN filingdate,&lt;br /&gt;
  DROP COLUMN applicationnumber,&lt;br /&gt;
  DROP COLUMN type;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 UPDATE patents&lt;br /&gt;
  SET prioritycountry = NULL&lt;br /&gt;
  WHERE prioritycountry = 'NULL';&lt;br /&gt;
&lt;br /&gt;
 UPDATE patents&lt;br /&gt;
  SET pctpatentnumber = NULL&lt;br /&gt;
  WHERE pctpatentnumber = 'NULL';&lt;br /&gt;
&lt;br /&gt;
 UPDATE patents&lt;br /&gt;
  SET prioritypatentnumber = NULL&lt;br /&gt;
  WHERE prioritypatentnumber = 'NULL';&lt;br /&gt;
&lt;br /&gt;
 UPDATE patents&lt;br /&gt;
  SET cpcsubgroup = NULL&lt;br /&gt;
  WHERE cpcsubgroup = 'NULL';&lt;br /&gt;
&lt;br /&gt;
 UPDATE patents&lt;br /&gt;
  SET appnum = NULL&lt;br /&gt;
  WHERE appnum = -1;&lt;br /&gt;
&lt;br /&gt;
 UPDATE patents&lt;br /&gt;
  SET gyear = NULL&lt;br /&gt;
  WHERE gyear = -1;&lt;br /&gt;
&lt;br /&gt;
 UPDATE patents&lt;br /&gt;
&lt;br /&gt;
  SET appyear = NULL&lt;br /&gt;
  WHERE appyear = -1;&lt;br /&gt;
&lt;br /&gt;
 Results:&lt;br /&gt;
&lt;br /&gt;
 allpatent=# ALTER TABLE patents&lt;br /&gt;
 allpatent-# DROP COLUMN numberofclaims,&lt;br /&gt;
 allpatent-# DROP COLUMN filingdate,&lt;br /&gt;
 allpatent-# DROP COLUMN applicationnumber,&lt;br /&gt;
 allpatent-# DROP COLUMN type;&lt;br /&gt;
 ALTER TABLE&lt;br /&gt;
 allpatent=#&lt;br /&gt;
 allpatent=#&lt;br /&gt;
 allpatent=# UPDATE patents&lt;br /&gt;
 allpatent-# SET prioritycountry = NULL&lt;br /&gt;
 allpatent-# WHERE prioritycountry = 'NULL';&lt;br /&gt;
 ^[[BUPDATE 3764926&lt;br /&gt;
 allpatent=#&lt;br /&gt;
 allpatent=# UPDATE patents&lt;br /&gt;
 allpatent-# SET pctpatentnumber = NULL&lt;br /&gt;
 allpatent-# WHERE pctpatentnumber = 'NULL';&lt;br /&gt;
 UPDATE 3764926&lt;br /&gt;
 allpatent=#&lt;br /&gt;
 allpatent=# UPDATE patents&lt;br /&gt;
 allpatent-# SET prioritypatentnumber = NULL&lt;br /&gt;
 allpatent-# WHERE prioritypatentnumber = 'NULL';&lt;br /&gt;
 UPDATE 3764926&lt;br /&gt;
 allpatent=#&lt;br /&gt;
 allpatent=# UPDATE patents&lt;br /&gt;
 allpatent-# SET cpcsubgroup = NULL&lt;br /&gt;
 allpatent-# WHERE cpcsubgroup = 'NULL';&lt;br /&gt;
 UPDATE 3764926&lt;br /&gt;
 allpatent=#&lt;br /&gt;
 allpatent=# UPDATE patents&lt;br /&gt;
 allpatent-# SET appnum = NULL&lt;br /&gt;
 allpatent-# WHERE appnum = -1;&lt;br /&gt;
 UPDATE 0&lt;br /&gt;
 allpatent=#&lt;br /&gt;
 allpatent=# UPDATE patents&lt;br /&gt;
 allpatent-# SET gyear = NULL&lt;br /&gt;
 allpatent-# WHERE gyear = -1;&lt;br /&gt;
 UPDATE 0&lt;br /&gt;
 allpatent=#&lt;br /&gt;
 allpatent=# UPDATE patents&lt;br /&gt;
 allpatent-# SET appyear = NULL&lt;br /&gt;
 allpatent-# WHERE appyear = -1;&lt;br /&gt;
 UPDATE 0&lt;br /&gt;
 allpatent=#&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 UPDATE assignees&lt;br /&gt;
  SET lastname = NULL&lt;br /&gt;
  WHERE lastname = 'null';&lt;br /&gt;
&lt;br /&gt;
 UPDATE assignees&lt;br /&gt;
  SET firstname = NULL&lt;br /&gt;
  WHERE firstname = 'null';&lt;br /&gt;
&lt;br /&gt;
 UPDATE assignees&lt;br /&gt;
  SET address = NULL&lt;br /&gt;
  WHERE address = 'null';&lt;br /&gt;
&lt;br /&gt;
 UPDATE assignees&lt;br /&gt;
  SET postcode = NULL&lt;br /&gt;
  WHERE   postcode = 'null';&lt;br /&gt;
&lt;br /&gt;
 UPDATE assignees&lt;br /&gt;
  SET patentcountry = NULL&lt;br /&gt;
  WHERE patentcountry = 'null';&lt;br /&gt;
&lt;br /&gt;
 UPDATE assignees&lt;br /&gt;
  SET nationality2 = NULL&lt;br /&gt;
  WHERE nationality2 = 'null';&lt;br /&gt;
&lt;br /&gt;
 UPDATE assignees&lt;br /&gt;
  SET residence = NULL&lt;br /&gt;
  WHERE residence = 'null';&lt;br /&gt;
&lt;br /&gt;
 UPDATE assignees&lt;br /&gt;
  SET asgseq = NULL&lt;br /&gt;
  WHERE asgseq= -1;&lt;br /&gt;
&lt;br /&gt;
 UPDATE assignees&lt;br /&gt;
  SET asgtype = NULL&lt;br /&gt;
  WHERE asgtype = -1;&lt;br /&gt;
&lt;br /&gt;
 RESULTS:&lt;br /&gt;
&lt;br /&gt;
 UPDATE assignees&lt;br /&gt;
 allpatent-# SET lastname = NULL&lt;br /&gt;
 allpatent-# WHERE lastname = 'null';&lt;br /&gt;
&lt;br /&gt;
 UPDATE 3818842&lt;br /&gt;
 allpatent=#&lt;br /&gt;
 allpatent=# UPDATE assignees&lt;br /&gt;
 allpatent-# SET firstname = NULL&lt;br /&gt;
 allpatent-# WHERE firstname = 'null';&lt;br /&gt;
 UPDATE 3818842&lt;br /&gt;
 allpatent=#&lt;br /&gt;
 allpatent=# UPDATE assignees&lt;br /&gt;
 allpatent-# SET address = NULL&lt;br /&gt;
 allpatent-# WHERE address = 'null';&lt;br /&gt;
 UPDATE 3818842&lt;br /&gt;
 allpatent=#&lt;br /&gt;
 allpatent=# UPDATE assignees&lt;br /&gt;
 allpatent-# SET postcode = NULL&lt;br /&gt;
 allpatent-# WHERE   postcode = 'null';&lt;br /&gt;
 UPDATE 3818842&lt;br /&gt;
 allpatent=#&lt;br /&gt;
 allpatent=# UPDATE assignees&lt;br /&gt;
 allpatent-# SET patentcountry = NULL&lt;br /&gt;
 allpatent-# WHERE patentcountry = 'null';&lt;br /&gt;
 UPDATE 3818842&lt;br /&gt;
 allpatent=#&lt;br /&gt;
 allpatent=# UPDATE assignees&lt;br /&gt;
 allpatent-# SET nationality2 = NULL&lt;br /&gt;
 allpatent-# WHERE nationality2 = 'null';&lt;br /&gt;
 UPDATE 1607714&lt;br /&gt;
 allpatent=#&lt;br /&gt;
 allpatent=# UPDATE assignees&lt;br /&gt;
 allpatent-# SET residence = NULL&lt;br /&gt;
 allpatent-# WHERE residence = 'null';&lt;br /&gt;
 UPDATE 1607714&lt;br /&gt;
 allpatent=#&lt;br /&gt;
 allpatent=# UPDATE assignees&lt;br /&gt;
 allpatent-# SET asgseq = NULL&lt;br /&gt;
 allpatent-# WHERE asgseq= -1;&lt;br /&gt;
 UPDATE 1607714&lt;br /&gt;
 allpatent=#&lt;br /&gt;
 allpatent=# UPDATE assignees&lt;br /&gt;
 allpatent-# SET asgtype = NULL&lt;br /&gt;
 allpatent-# WHERE asgtype = -1;&lt;br /&gt;
 UPDATE 1607714&lt;br /&gt;
 allpatent=#&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 CREATE DATABASE allpatent_clone WITH TEMPLATE allpatent OWNER dbuser;&lt;br /&gt;
&lt;br /&gt;
== Renaming Tables and Columns ==&lt;br /&gt;
&lt;br /&gt;
To standardize table and column names, and to make them as user-friendly as possible, a few tables and columns have been renamed.&lt;br /&gt;
* '''allpatent''' database -&amp;gt; '''patent'''&lt;br /&gt;
* assignees -&amp;gt; assignee&lt;br /&gt;
* judges -&amp;gt; judge&lt;br /&gt;
* citations -&amp;gt; citation&lt;br /&gt;
* matchassignees -&amp;gt; MatchOrgNames&lt;br /&gt;
* patents -&amp;gt; patent&lt;br /&gt;
* assignees -&amp;gt; ptoassignee&lt;br /&gt;
* assignments -&amp;gt; ptoassignment&lt;br /&gt;
* assignors -&amp;gt; ptoassignor&lt;br /&gt;
* patentassignment -&amp;gt; ptopatentfile&lt;br /&gt;
* properties -&amp;gt; ptoproperty&lt;br /&gt;
* mslfee -&amp;gt; feestatus&lt;br /&gt;
* patentmaintenancefee -&amp;gt; fee&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Patent_Data_Cleanup_(June_2016)&amp;diff=4515</id>
		<title>Patent Data Cleanup (June 2016)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Patent_Data_Cleanup_(June_2016)&amp;diff=4515"/>
		<updated>2016-07-07T15:45:52Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About this Page ==&lt;br /&gt;
&lt;br /&gt;
This page contains the script that was used to clean up the patents and assignees tables in allpatent.&lt;br /&gt;
&lt;br /&gt;
== Script ==&lt;br /&gt;
 ALTER TABLE patents&lt;br /&gt;
 RENAME COLUMN patentnumber TO patent;&lt;br /&gt;
&lt;br /&gt;
 ALTER TABLE patents&lt;br /&gt;
  DROP COLUMN kind,&lt;br /&gt;
  DROP COLUMN title,&lt;br /&gt;
  DROP COLUMN ussubclass, **&lt;br /&gt;
  DROP COLUMN maingroup, --&lt;br /&gt;
  DROP COLUMN subgroup,--&lt;br /&gt;
  DROP COLUMN cpcsubclass, ++&lt;br /&gt;
  DROP COLUMN cpcmaingroup, ++&lt;br /&gt;
  DROP COLUMN classificationnationalcountry,&lt;br /&gt;
  DROP COLUMN classificationnationalclass,** (?)&lt;br /&gt;
  DROP COLUMN primaryexaminerfirstname,&lt;br /&gt;
  DROP COLUMN primaryexaminerlastname,&lt;br /&gt;
  DROP COLUMN primaryexaminerdepartment,&lt;br /&gt;
  DROP COLUMN filename;&lt;br /&gt;
&lt;br /&gt;
 UPDATE patents&lt;br /&gt;
  SET type = '2015'&lt;br /&gt;
  WHERE type != 'NULL';&lt;br /&gt;
&lt;br /&gt;
 -- RESULT : UPDATE 1646225&lt;br /&gt;
&lt;br /&gt;
 UPDATE patents&lt;br /&gt;
  SET type = '2010'&lt;br /&gt;
  WHERE type = 'NULL';&lt;br /&gt;
 -- RESULT : UPDATE 3764926&lt;br /&gt;
&lt;br /&gt;
 /* Join the historical patent data from the US PTO with the patents table */&lt;br /&gt;
&lt;br /&gt;
 ALTER TABLE PATENTS&lt;br /&gt;
  ADD COLUMN nber INT,&lt;br /&gt;
  ADD COLUMN uspc varchar,&lt;br /&gt;
  ADD COLUMN uspc_sub varchar;&lt;br /&gt;
&lt;br /&gt;
 UPDATE patents p&lt;br /&gt;
  SET nber = hp.nber,&lt;br /&gt;
  uspc = hp.uspc,&lt;br /&gt;
  uspc_sub = hp.uspc&lt;br /&gt;
   FROM historicalpatentdata hp&lt;br /&gt;
   WHERE hp.patentnumber = CAST(p.patent AS varchar);&lt;br /&gt;
&lt;br /&gt;
 -- RESULT : UPDATE 5113655&lt;br /&gt;
&lt;br /&gt;
 /* Mergeing some columns - claims and number of claims - column name : claims*/&lt;br /&gt;
 UPDATE patents&lt;br /&gt;
  SET claims = numberofclaims&lt;br /&gt;
  WHERE claims = -1;&lt;br /&gt;
 -- RESULTS : UPDATE 1646225&lt;br /&gt;
&lt;br /&gt;
 /* Merging columns - &lt;br /&gt;
 UPDATE patents&lt;br /&gt;
  SET appnum = CAST (applicationnumber AS INT)&lt;br /&gt;
  where appnum = -1;&lt;br /&gt;
 -- RESULT : UPDATE 1646225&lt;br /&gt;
&lt;br /&gt;
 UPDATE patents&lt;br /&gt;
  SET appdate = filingdate&lt;br /&gt;
  where appdate = '0001-01-01 BC'&lt;br /&gt;
  OR filingdate is not NULL;&lt;br /&gt;
&lt;br /&gt;
 -- RESULT UPDATE 1646225&lt;br /&gt;
&lt;br /&gt;
 ALTER TABLE patents&lt;br /&gt;
  DROP COLUMN apptype;&lt;br /&gt;
&lt;br /&gt;
 /* Generating GYear and AppYear from the dates */&lt;br /&gt;
 UPDATE patents&lt;br /&gt;
  SET gyear = EXTRACT(year from grantdate)&lt;br /&gt;
  WHERE gyear = -1&lt;br /&gt;
  AND grantdate IS NOT NULL;&lt;br /&gt;
 UPDATE 1646225&lt;br /&gt;
&lt;br /&gt;
 UPDATE patents&lt;br /&gt;
  SET appyear = EXTRACT(year from appdate)&lt;br /&gt;
  WHERE appyear = -1 &lt;br /&gt;
  AND appdate is not null;&lt;br /&gt;
 -- RESULT UPDATE 1646225&lt;br /&gt;
&lt;br /&gt;
 /* Test Script */&lt;br /&gt;
 SELECT patentnumber, ussubclass, maingroup, subgroup, cpcsubclass, cpcmaingroup, cpcsubgroup, classificationnationalcountry, classificationnationalclass FROM Patents LIMIT 100;&lt;br /&gt;
&lt;br /&gt;
 patent               | integer           | not null&lt;br /&gt;
  grantdate            | date              |&lt;br /&gt;
  type                 | character varying |&lt;br /&gt;
  applicationnumber    | character varying |&lt;br /&gt;
  filingdate           | date              |&lt;br /&gt;
  prioritydate         | date              |&lt;br /&gt;
  prioritycountry      | character varying |&lt;br /&gt;
  prioritypatentnumber | character varying |&lt;br /&gt;
  cpcsubgroup          | character varying |&lt;br /&gt;
  numberofclaims       | integer           |&lt;br /&gt;
  pctpatentnumber      | character varying |&lt;br /&gt;
  claims               | integer           |&lt;br /&gt;
  appnum               | integer           |&lt;br /&gt;
  gyear                | integer           |&lt;br /&gt;
  appdate              | date              |&lt;br /&gt;
  appyear              | integer           |&lt;br /&gt;
  nber                 | integer           |&lt;br /&gt;
  uspc                 | character varying |&lt;br /&gt;
  uspc_sub             | character varying &lt;br /&gt;
&lt;br /&gt;
 /* Drop the merged columns */&lt;br /&gt;
&lt;br /&gt;
 ALTER TABLE patents&lt;br /&gt;
  DROP COLUMN numberofclaims,&lt;br /&gt;
  DROP COLUMN filingdate,&lt;br /&gt;
  DROP COLUMN applicationnumber,&lt;br /&gt;
  DROP COLUMN type;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 UPDATE patents&lt;br /&gt;
  SET prioritycountry = NULL&lt;br /&gt;
  WHERE prioritycountry = 'NULL';&lt;br /&gt;
&lt;br /&gt;
 UPDATE patents&lt;br /&gt;
  SET pctpatentnumber = NULL&lt;br /&gt;
  WHERE pctpatentnumber = 'NULL';&lt;br /&gt;
&lt;br /&gt;
 UPDATE patents&lt;br /&gt;
  SET prioritypatentnumber = NULL&lt;br /&gt;
  WHERE prioritypatentnumber = 'NULL';&lt;br /&gt;
&lt;br /&gt;
 UPDATE patents&lt;br /&gt;
  SET cpcsubgroup = NULL&lt;br /&gt;
  WHERE cpcsubgroup = 'NULL';&lt;br /&gt;
&lt;br /&gt;
 UPDATE patents&lt;br /&gt;
  SET appnum = NULL&lt;br /&gt;
  WHERE appnum = -1;&lt;br /&gt;
&lt;br /&gt;
 UPDATE patents&lt;br /&gt;
  SET gyear = NULL&lt;br /&gt;
  WHERE gyear = -1;&lt;br /&gt;
&lt;br /&gt;
 UPDATE patents&lt;br /&gt;
&lt;br /&gt;
  SET appyear = NULL&lt;br /&gt;
  WHERE appyear = -1;&lt;br /&gt;
&lt;br /&gt;
 Results:&lt;br /&gt;
&lt;br /&gt;
 allpatent=# ALTER TABLE patents&lt;br /&gt;
 allpatent-# DROP COLUMN numberofclaims,&lt;br /&gt;
 allpatent-# DROP COLUMN filingdate,&lt;br /&gt;
 allpatent-# DROP COLUMN applicationnumber,&lt;br /&gt;
 allpatent-# DROP COLUMN type;&lt;br /&gt;
 ALTER TABLE&lt;br /&gt;
 allpatent=#&lt;br /&gt;
 allpatent=#&lt;br /&gt;
 allpatent=# UPDATE patents&lt;br /&gt;
 allpatent-# SET prioritycountry = NULL&lt;br /&gt;
 allpatent-# WHERE prioritycountry = 'NULL';&lt;br /&gt;
 ^[[BUPDATE 3764926&lt;br /&gt;
 allpatent=#&lt;br /&gt;
 allpatent=# UPDATE patents&lt;br /&gt;
 allpatent-# SET pctpatentnumber = NULL&lt;br /&gt;
 allpatent-# WHERE pctpatentnumber = 'NULL';&lt;br /&gt;
 UPDATE 3764926&lt;br /&gt;
 allpatent=#&lt;br /&gt;
 allpatent=# UPDATE patents&lt;br /&gt;
 allpatent-# SET prioritypatentnumber = NULL&lt;br /&gt;
 allpatent-# WHERE prioritypatentnumber = 'NULL';&lt;br /&gt;
 UPDATE 3764926&lt;br /&gt;
 allpatent=#&lt;br /&gt;
 allpatent=# UPDATE patents&lt;br /&gt;
 allpatent-# SET cpcsubgroup = NULL&lt;br /&gt;
 allpatent-# WHERE cpcsubgroup = 'NULL';&lt;br /&gt;
 UPDATE 3764926&lt;br /&gt;
 allpatent=#&lt;br /&gt;
 allpatent=# UPDATE patents&lt;br /&gt;
 allpatent-# SET appnum = NULL&lt;br /&gt;
 allpatent-# WHERE appnum = -1;&lt;br /&gt;
 UPDATE 0&lt;br /&gt;
 allpatent=#&lt;br /&gt;
 allpatent=# UPDATE patents&lt;br /&gt;
 allpatent-# SET gyear = NULL&lt;br /&gt;
 allpatent-# WHERE gyear = -1;&lt;br /&gt;
 UPDATE 0&lt;br /&gt;
 allpatent=#&lt;br /&gt;
 allpatent=# UPDATE patents&lt;br /&gt;
 allpatent-# SET appyear = NULL&lt;br /&gt;
 allpatent-# WHERE appyear = -1;&lt;br /&gt;
 UPDATE 0&lt;br /&gt;
 allpatent=#&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 UPDATE assignees&lt;br /&gt;
  SET lastname = NULL&lt;br /&gt;
  WHERE lastname = 'null';&lt;br /&gt;
&lt;br /&gt;
 UPDATE assignees&lt;br /&gt;
  SET firstname = NULL&lt;br /&gt;
  WHERE firstname = 'null';&lt;br /&gt;
&lt;br /&gt;
 UPDATE assignees&lt;br /&gt;
  SET address = NULL&lt;br /&gt;
  WHERE address = 'null';&lt;br /&gt;
&lt;br /&gt;
 UPDATE assignees&lt;br /&gt;
  SET postcode = NULL&lt;br /&gt;
  WHERE   postcode = 'null';&lt;br /&gt;
&lt;br /&gt;
 UPDATE assignees&lt;br /&gt;
  SET patentcountry = NULL&lt;br /&gt;
  WHERE patentcountry = 'null';&lt;br /&gt;
&lt;br /&gt;
 UPDATE assignees&lt;br /&gt;
  SET nationality2 = NULL&lt;br /&gt;
  WHERE nationality2 = 'null';&lt;br /&gt;
&lt;br /&gt;
 UPDATE assignees&lt;br /&gt;
  SET residence = NULL&lt;br /&gt;
  WHERE residence = 'null';&lt;br /&gt;
&lt;br /&gt;
 UPDATE assignees&lt;br /&gt;
  SET asgseq = NULL&lt;br /&gt;
  WHERE asgseq= -1;&lt;br /&gt;
&lt;br /&gt;
 UPDATE assignees&lt;br /&gt;
  SET asgtype = NULL&lt;br /&gt;
  WHERE asgtype = -1;&lt;br /&gt;
&lt;br /&gt;
 RESULTS:&lt;br /&gt;
&lt;br /&gt;
 UPDATE assignees&lt;br /&gt;
 allpatent-# SET lastname = NULL&lt;br /&gt;
 allpatent-# WHERE lastname = 'null';&lt;br /&gt;
&lt;br /&gt;
 UPDATE 3818842&lt;br /&gt;
 allpatent=#&lt;br /&gt;
 allpatent=# UPDATE assignees&lt;br /&gt;
 allpatent-# SET firstname = NULL&lt;br /&gt;
 allpatent-# WHERE firstname = 'null';&lt;br /&gt;
 UPDATE 3818842&lt;br /&gt;
 allpatent=#&lt;br /&gt;
 allpatent=# UPDATE assignees&lt;br /&gt;
 allpatent-# SET address = NULL&lt;br /&gt;
 allpatent-# WHERE address = 'null';&lt;br /&gt;
 UPDATE 3818842&lt;br /&gt;
 allpatent=#&lt;br /&gt;
 allpatent=# UPDATE assignees&lt;br /&gt;
 allpatent-# SET postcode = NULL&lt;br /&gt;
 allpatent-# WHERE   postcode = 'null';&lt;br /&gt;
 UPDATE 3818842&lt;br /&gt;
 allpatent=#&lt;br /&gt;
 allpatent=# UPDATE assignees&lt;br /&gt;
 allpatent-# SET patentcountry = NULL&lt;br /&gt;
 allpatent-# WHERE patentcountry = 'null';&lt;br /&gt;
 UPDATE 3818842&lt;br /&gt;
 allpatent=#&lt;br /&gt;
 allpatent=# UPDATE assignees&lt;br /&gt;
 allpatent-# SET nationality2 = NULL&lt;br /&gt;
 allpatent-# WHERE nationality2 = 'null';&lt;br /&gt;
 UPDATE 1607714&lt;br /&gt;
 allpatent=#&lt;br /&gt;
 allpatent=# UPDATE assignees&lt;br /&gt;
 allpatent-# SET residence = NULL&lt;br /&gt;
 allpatent-# WHERE residence = 'null';&lt;br /&gt;
 UPDATE 1607714&lt;br /&gt;
 allpatent=#&lt;br /&gt;
 allpatent=# UPDATE assignees&lt;br /&gt;
 allpatent-# SET asgseq = NULL&lt;br /&gt;
 allpatent-# WHERE asgseq= -1;&lt;br /&gt;
 UPDATE 1607714&lt;br /&gt;
 allpatent=#&lt;br /&gt;
 allpatent=# UPDATE assignees&lt;br /&gt;
 allpatent-# SET asgtype = NULL&lt;br /&gt;
 allpatent-# WHERE asgtype = -1;&lt;br /&gt;
 UPDATE 1607714&lt;br /&gt;
 allpatent=#&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 CREATE DATABASE allpatent_clone WITH TEMPLATE allpatent OWNER dbuser;&lt;br /&gt;
&lt;br /&gt;
== Renaming Tables and Columns ==&lt;br /&gt;
&lt;br /&gt;
To standardize table and column names, and to make them as user-friendly as possible, a few tables and columns have been renamed.&lt;br /&gt;
* '''allpatent''' database -&amp;gt; '''patent'''&lt;br /&gt;
* assignees -&amp;gt; assignee&lt;br /&gt;
* judges -&amp;gt; judge&lt;br /&gt;
* citations -&amp;gt; citation&lt;br /&gt;
* matchassignees -&amp;gt; MatchOrgNames&lt;br /&gt;
* patents -&amp;gt; patent&lt;br /&gt;
* assignees -&amp;gt; ptoassignee&lt;br /&gt;
* assignments -&amp;gt; ptoassignment&lt;br /&gt;
* assignors -&amp;gt; ptoassignor&lt;br /&gt;
* patentassignment -&amp;gt; ptopatentfile&lt;br /&gt;
* properties -&amp;gt; ptoproperty&lt;br /&gt;
* mslfee -&amp;gt; feestatus&lt;br /&gt;
* patentmaintenancefee -&amp;gt; fee&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Patent_Data_Cleanup_(June_2016)&amp;diff=4512</id>
		<title>Patent Data Cleanup (June 2016)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Patent_Data_Cleanup_(June_2016)&amp;diff=4512"/>
		<updated>2016-07-07T15:41:46Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: /* Script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About this Page ==&lt;br /&gt;
&lt;br /&gt;
This page contains the script that was used to clean up the patents and assignees tables in allpatent.&lt;br /&gt;
&lt;br /&gt;
== Script ==&lt;br /&gt;
 ALTER TABLE patents&lt;br /&gt;
 RENAME COLUMN patentnumber TO patent;&lt;br /&gt;
&lt;br /&gt;
 ALTER TABLE patents&lt;br /&gt;
  DROP COLUMN kind,&lt;br /&gt;
  DROP COLUMN title,&lt;br /&gt;
  DROP COLUMN ussubclass, **&lt;br /&gt;
  DROP COLUMN maingroup, --&lt;br /&gt;
  DROP COLUMN subgroup,--&lt;br /&gt;
  DROP COLUMN cpcsubclass, ++&lt;br /&gt;
  DROP COLUMN cpcmaingroup, ++&lt;br /&gt;
  DROP COLUMN classificationnationalcountry,&lt;br /&gt;
  DROP COLUMN classificationnationalclass,** (?)&lt;br /&gt;
  DROP COLUMN primaryexaminerfirstname,&lt;br /&gt;
  DROP COLUMN primaryexaminerlastname,&lt;br /&gt;
  DROP COLUMN primaryexaminerdepartment,&lt;br /&gt;
  DROP COLUMN filename;&lt;br /&gt;
&lt;br /&gt;
 UPDATE patents&lt;br /&gt;
  SET type = '2015'&lt;br /&gt;
  WHERE type != 'NULL';&lt;br /&gt;
&lt;br /&gt;
 -- RESULT : UPDATE 1646225&lt;br /&gt;
&lt;br /&gt;
 UPDATE patents&lt;br /&gt;
  SET type = '2010'&lt;br /&gt;
  WHERE type = 'NULL';&lt;br /&gt;
 -- RESULT : UPDATE 3764926&lt;br /&gt;
&lt;br /&gt;
 /* Join the historical patent data from the US PTO with the patents table */&lt;br /&gt;
&lt;br /&gt;
 ALTER TABLE PATENTS&lt;br /&gt;
  ADD COLUMN nber INT,&lt;br /&gt;
  ADD COLUMN uspc varchar,&lt;br /&gt;
  ADD COLUMN uspc_sub varchar;&lt;br /&gt;
&lt;br /&gt;
 UPDATE patents p&lt;br /&gt;
  SET nber = hp.nber,&lt;br /&gt;
  uspc = hp.uspc,&lt;br /&gt;
  uspc_sub = hp.uspc&lt;br /&gt;
   FROM historicalpatentdata hp&lt;br /&gt;
   WHERE hp.patentnumber = CAST(p.patent AS varchar);&lt;br /&gt;
&lt;br /&gt;
 -- RESULT : UPDATE 5113655&lt;br /&gt;
&lt;br /&gt;
 /* Mergeing some columns - claims and number of claims - column name : claims*/&lt;br /&gt;
 UPDATE patents&lt;br /&gt;
  SET claims = numberofclaims&lt;br /&gt;
  WHERE claims = -1;&lt;br /&gt;
 -- RESULTS : UPDATE 1646225&lt;br /&gt;
&lt;br /&gt;
 /* Merging columns - &lt;br /&gt;
 UPDATE patents&lt;br /&gt;
  SET appnum = CAST (applicationnumber AS INT)&lt;br /&gt;
  where appnum = -1;&lt;br /&gt;
 -- RESULT : UPDATE 1646225&lt;br /&gt;
&lt;br /&gt;
 UPDATE patents&lt;br /&gt;
  SET appdate = filingdate&lt;br /&gt;
  where appdate = '0001-01-01 BC'&lt;br /&gt;
  OR filingdate is not NULL;&lt;br /&gt;
&lt;br /&gt;
 -- RESULT UPDATE 1646225&lt;br /&gt;
&lt;br /&gt;
 ALTER TABLE patents&lt;br /&gt;
  DROP COLUMN apptype;&lt;br /&gt;
&lt;br /&gt;
 /* Generating GYear and AppYear from the dates */&lt;br /&gt;
 UPDATE patents&lt;br /&gt;
  SET gyear = EXTRACT(year from grantdate)&lt;br /&gt;
  WHERE gyear = -1&lt;br /&gt;
  AND grantdate IS NOT NULL;&lt;br /&gt;
 UPDATE 1646225&lt;br /&gt;
&lt;br /&gt;
 UPDATE patents&lt;br /&gt;
  SET appyear = EXTRACT(year from appdate)&lt;br /&gt;
  WHERE appyear = -1 &lt;br /&gt;
  AND appdate is not null;&lt;br /&gt;
 -- RESULT UPDATE 1646225&lt;br /&gt;
&lt;br /&gt;
 /* Test Script */&lt;br /&gt;
 SELECT patentnumber, ussubclass, maingroup, subgroup, cpcsubclass, cpcmaingroup, cpcsubgroup, classificationnationalcountry, classificationnationalclass FROM Patents LIMIT 100;&lt;br /&gt;
&lt;br /&gt;
 patent               | integer           | not null&lt;br /&gt;
  grantdate            | date              |&lt;br /&gt;
  type                 | character varying |&lt;br /&gt;
  applicationnumber    | character varying |&lt;br /&gt;
  filingdate           | date              |&lt;br /&gt;
  prioritydate         | date              |&lt;br /&gt;
  prioritycountry      | character varying |&lt;br /&gt;
  prioritypatentnumber | character varying |&lt;br /&gt;
  cpcsubgroup          | character varying |&lt;br /&gt;
  numberofclaims       | integer           |&lt;br /&gt;
  pctpatentnumber      | character varying |&lt;br /&gt;
  claims               | integer           |&lt;br /&gt;
  appnum               | integer           |&lt;br /&gt;
  gyear                | integer           |&lt;br /&gt;
  appdate              | date              |&lt;br /&gt;
  appyear              | integer           |&lt;br /&gt;
  nber                 | integer           |&lt;br /&gt;
  uspc                 | character varying |&lt;br /&gt;
  uspc_sub             | character varying &lt;br /&gt;
&lt;br /&gt;
 /* Drop the merged columns */&lt;br /&gt;
&lt;br /&gt;
 ALTER TABLE patents&lt;br /&gt;
  DROP COLUMN numberofclaims,&lt;br /&gt;
  DROP COLUMN filingdate,&lt;br /&gt;
  DROP COLUMN applicationnumber,&lt;br /&gt;
  DROP COLUMN type;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 UPDATE patents&lt;br /&gt;
  SET prioritycountry = NULL&lt;br /&gt;
  WHERE prioritycountry = 'NULL';&lt;br /&gt;
&lt;br /&gt;
 UPDATE patents&lt;br /&gt;
  SET pctpatentnumber = NULL&lt;br /&gt;
  WHERE pctpatentnumber = 'NULL';&lt;br /&gt;
&lt;br /&gt;
 UPDATE patents&lt;br /&gt;
  SET prioritypatentnumber = NULL&lt;br /&gt;
  WHERE prioritypatentnumber = 'NULL';&lt;br /&gt;
&lt;br /&gt;
 UPDATE patents&lt;br /&gt;
  SET cpcsubgroup = NULL&lt;br /&gt;
  WHERE cpcsubgroup = 'NULL';&lt;br /&gt;
&lt;br /&gt;
 UPDATE patents&lt;br /&gt;
  SET appnum = NULL&lt;br /&gt;
  WHERE appnum = -1;&lt;br /&gt;
&lt;br /&gt;
 UPDATE patents&lt;br /&gt;
  SET gyear = NULL&lt;br /&gt;
  WHERE gyear = -1;&lt;br /&gt;
&lt;br /&gt;
 UPDATE patents&lt;br /&gt;
&lt;br /&gt;
  SET appyear = NULL&lt;br /&gt;
  WHERE appyear = -1;&lt;br /&gt;
&lt;br /&gt;
 Results:&lt;br /&gt;
&lt;br /&gt;
 allpatent=# ALTER TABLE patents&lt;br /&gt;
 allpatent-# DROP COLUMN numberofclaims,&lt;br /&gt;
 allpatent-# DROP COLUMN filingdate,&lt;br /&gt;
 allpatent-# DROP COLUMN applicationnumber,&lt;br /&gt;
 allpatent-# DROP COLUMN type;&lt;br /&gt;
 ALTER TABLE&lt;br /&gt;
 allpatent=#&lt;br /&gt;
 allpatent=#&lt;br /&gt;
 allpatent=# UPDATE patents&lt;br /&gt;
 allpatent-# SET prioritycountry = NULL&lt;br /&gt;
 allpatent-# WHERE prioritycountry = 'NULL';&lt;br /&gt;
 ^[[BUPDATE 3764926&lt;br /&gt;
 allpatent=#&lt;br /&gt;
 allpatent=# UPDATE patents&lt;br /&gt;
 allpatent-# SET pctpatentnumber = NULL&lt;br /&gt;
 allpatent-# WHERE pctpatentnumber = 'NULL';&lt;br /&gt;
 UPDATE 3764926&lt;br /&gt;
 allpatent=#&lt;br /&gt;
 allpatent=# UPDATE patents&lt;br /&gt;
 allpatent-# SET prioritypatentnumber = NULL&lt;br /&gt;
 allpatent-# WHERE prioritypatentnumber = 'NULL';&lt;br /&gt;
 UPDATE 3764926&lt;br /&gt;
 allpatent=#&lt;br /&gt;
 allpatent=# UPDATE patents&lt;br /&gt;
 allpatent-# SET cpcsubgroup = NULL&lt;br /&gt;
 allpatent-# WHERE cpcsubgroup = 'NULL';&lt;br /&gt;
 UPDATE 3764926&lt;br /&gt;
 allpatent=#&lt;br /&gt;
 allpatent=# UPDATE patents&lt;br /&gt;
 allpatent-# SET appnum = NULL&lt;br /&gt;
 allpatent-# WHERE appnum = -1;&lt;br /&gt;
 UPDATE 0&lt;br /&gt;
 allpatent=#&lt;br /&gt;
 allpatent=# UPDATE patents&lt;br /&gt;
 allpatent-# SET gyear = NULL&lt;br /&gt;
 allpatent-# WHERE gyear = -1;&lt;br /&gt;
 UPDATE 0&lt;br /&gt;
 allpatent=#&lt;br /&gt;
 allpatent=# UPDATE patents&lt;br /&gt;
 allpatent-# SET appyear = NULL&lt;br /&gt;
 allpatent-# WHERE appyear = -1;&lt;br /&gt;
 UPDATE 0&lt;br /&gt;
 allpatent=#&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 UPDATE assignees&lt;br /&gt;
  SET lastname = NULL&lt;br /&gt;
  WHERE lastname = 'null';&lt;br /&gt;
&lt;br /&gt;
 UPDATE assignees&lt;br /&gt;
  SET firstname = NULL&lt;br /&gt;
  WHERE firstname = 'null';&lt;br /&gt;
&lt;br /&gt;
 UPDATE assignees&lt;br /&gt;
  SET address = NULL&lt;br /&gt;
  WHERE address = 'null';&lt;br /&gt;
&lt;br /&gt;
 UPDATE assignees&lt;br /&gt;
  SET postcode = NULL&lt;br /&gt;
  WHERE   postcode = 'null';&lt;br /&gt;
&lt;br /&gt;
 UPDATE assignees&lt;br /&gt;
  SET patentcountry = NULL&lt;br /&gt;
  WHERE patentcountry = 'null';&lt;br /&gt;
&lt;br /&gt;
 UPDATE assignees&lt;br /&gt;
  SET nationality2 = NULL&lt;br /&gt;
  WHERE nationality2 = 'null';&lt;br /&gt;
&lt;br /&gt;
 UPDATE assignees&lt;br /&gt;
  SET residence = NULL&lt;br /&gt;
  WHERE residence = 'null';&lt;br /&gt;
&lt;br /&gt;
 UPDATE assignees&lt;br /&gt;
  SET asgseq = NULL&lt;br /&gt;
  WHERE asgseq= -1;&lt;br /&gt;
&lt;br /&gt;
 UPDATE assignees&lt;br /&gt;
  SET asgtype = NULL&lt;br /&gt;
  WHERE asgtype = -1;&lt;br /&gt;
&lt;br /&gt;
 RESULTS:&lt;br /&gt;
&lt;br /&gt;
 UPDATE assignees&lt;br /&gt;
 allpatent-# SET lastname = NULL&lt;br /&gt;
 allpatent-# WHERE lastname = 'null';&lt;br /&gt;
&lt;br /&gt;
 UPDATE 3818842&lt;br /&gt;
 allpatent=#&lt;br /&gt;
 allpatent=# UPDATE assignees&lt;br /&gt;
 allpatent-# SET firstname = NULL&lt;br /&gt;
 allpatent-# WHERE firstname = 'null';&lt;br /&gt;
 UPDATE 3818842&lt;br /&gt;
 allpatent=#&lt;br /&gt;
 allpatent=# UPDATE assignees&lt;br /&gt;
 allpatent-# SET address = NULL&lt;br /&gt;
 allpatent-# WHERE address = 'null';&lt;br /&gt;
 UPDATE 3818842&lt;br /&gt;
 allpatent=#&lt;br /&gt;
 allpatent=# UPDATE assignees&lt;br /&gt;
 allpatent-# SET postcode = NULL&lt;br /&gt;
 allpatent-# WHERE   postcode = 'null';&lt;br /&gt;
 UPDATE 3818842&lt;br /&gt;
 allpatent=#&lt;br /&gt;
 allpatent=# UPDATE assignees&lt;br /&gt;
 allpatent-# SET patentcountry = NULL&lt;br /&gt;
 allpatent-# WHERE patentcountry = 'null';&lt;br /&gt;
 UPDATE 3818842&lt;br /&gt;
 allpatent=#&lt;br /&gt;
 allpatent=# UPDATE assignees&lt;br /&gt;
 allpatent-# SET nationality2 = NULL&lt;br /&gt;
 allpatent-# WHERE nationality2 = 'null';&lt;br /&gt;
 UPDATE 1607714&lt;br /&gt;
 allpatent=#&lt;br /&gt;
 allpatent=# UPDATE assignees&lt;br /&gt;
 allpatent-# SET residence = NULL&lt;br /&gt;
 allpatent-# WHERE residence = 'null';&lt;br /&gt;
 UPDATE 1607714&lt;br /&gt;
 allpatent=#&lt;br /&gt;
 allpatent=# UPDATE assignees&lt;br /&gt;
 allpatent-# SET asgseq = NULL&lt;br /&gt;
 allpatent-# WHERE asgseq= -1;&lt;br /&gt;
 UPDATE 1607714&lt;br /&gt;
 allpatent=#&lt;br /&gt;
 allpatent=# UPDATE assignees&lt;br /&gt;
 allpatent-# SET asgtype = NULL&lt;br /&gt;
 allpatent-# WHERE asgtype = -1;&lt;br /&gt;
 UPDATE 1607714&lt;br /&gt;
 allpatent=#&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 CREATE DATABASE allpatent_clone WITH TEMPLATE allpatent OWNER dbuser;&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Patent_Data_Processing_-_SQL_Steps&amp;diff=4462</id>
		<title>Patent Data Processing - SQL Steps</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Patent_Data_Processing_-_SQL_Steps&amp;diff=4462"/>
		<updated>2016-07-06T17:51:25Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: /* USPTO Consolidated Patent Data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Internal]]&lt;br /&gt;
[[Internal Classification::Legacy| ]]&lt;br /&gt;
&lt;br /&gt;
== Objective ==&lt;br /&gt;
The McNair Center owns two sets of patent data - one set that is inherited from Harvard, the Harvard dataverse, which is stored in the database patentdata and another that is generated by crawlers pulling data from the USPTO website, which is stored in the database '''patent_2015'''.&lt;br /&gt;
&lt;br /&gt;
We are now merging and cleaning the two data sets, and storing them in a schema that is amalgamation of the two underlying schema for the citations tables, assignees tables, and patents tables. The destination schema is '''allpatent'''.&lt;br /&gt;
&lt;br /&gt;
== Assignees Data==&lt;br /&gt;
&lt;br /&gt;
The schema for the assignees table in '''patentdata''' database is:&lt;br /&gt;
&lt;br /&gt;
    Column    |       Type        | Modifiers&lt;br /&gt;
 -------------+-------------------+-----------&lt;br /&gt;
  patent      | integer           |&lt;br /&gt;
  asgtype     | integer           |&lt;br /&gt;
  assignee    | character varying |&lt;br /&gt;
  city        | character varying |&lt;br /&gt;
  state       | character varying |&lt;br /&gt;
  country     | character varying |&lt;br /&gt;
  nationality | character varying |&lt;br /&gt;
  residence   | character varying |&lt;br /&gt;
  asgseq      | integer           |&lt;br /&gt;
&lt;br /&gt;
The schema for the assignees table in patent_2015 is :&lt;br /&gt;
&lt;br /&gt;
    Column     |  Type   | Modifiers&lt;br /&gt;
 --------------+---------+-----------&lt;br /&gt;
 lastname      | text    |&lt;br /&gt;
 firstname     | text    |&lt;br /&gt;
 orgname       | text    |&lt;br /&gt;
 city          | text    |&lt;br /&gt;
 country       | text    |&lt;br /&gt;
 patentcountry | text    |&lt;br /&gt;
 patentnumber  | integer |&lt;br /&gt;
 state         | text    |&lt;br /&gt;
 address       | text    |&lt;br /&gt;
 postcode      | text    |&lt;br /&gt;
&lt;br /&gt;
To merge both schemas, we have some columns that overlap, and some columns that don't.&lt;br /&gt;
&lt;br /&gt;
'''Overlapping Columns'''&lt;br /&gt;
&lt;br /&gt;
  patent_2015  | patentdata&lt;br /&gt;
 --------------+--------------&lt;br /&gt;
  orgname      | assignee &lt;br /&gt;
  city         | city &lt;br /&gt;
  country      | country&lt;br /&gt;
  patentnumber | patent &lt;br /&gt;
  state        | state&lt;br /&gt;
&lt;br /&gt;
These columns will have entries for most rows in the table, because they exist in both tables. The rest of the columns will be populated based on which table the row is coming from.&lt;br /&gt;
&lt;br /&gt;
'''Final Schema'''&lt;br /&gt;
&lt;br /&gt;
         Table &amp;quot;public.assignees&amp;quot;&lt;br /&gt;
     Column     |       Type        | Modifiers&lt;br /&gt;
 ---------------+-------------------+-----------&lt;br /&gt;
  lastname      | character varying |&lt;br /&gt;
  firstname     | character varying |&lt;br /&gt;
  address       | character varying |&lt;br /&gt;
  postcode      | character varying |&lt;br /&gt;
  orgname       | character varying |&lt;br /&gt;
  city          | character varying |&lt;br /&gt;
  country       | character varying |&lt;br /&gt;
  patentnumber  | integer           |&lt;br /&gt;
  state         | character varying |&lt;br /&gt;
  patentcountry | character varying |&lt;br /&gt;
  nationality2  | character varying |&lt;br /&gt;
  residence     | character varying |&lt;br /&gt;
  asgseq        | integer           |&lt;br /&gt;
  asgtype       | integer           |&lt;br /&gt;
&lt;br /&gt;
'''Non-overlapping Columns'''&lt;br /&gt;
These are the columns that belong to either one of the assignees tables, and not to both. For these cases, to help users understand where the row is coming from, the following insert rules have been followed:&lt;br /&gt;
&lt;br /&gt;
*For columns of type int, insert -1&lt;br /&gt;
*For columns of type string (character varying), the string 'null' has been inserted.&lt;br /&gt;
&lt;br /&gt;
Therefore, if a row has appropriate values for orgname, state, city ,etc, but 'null' values for lastname, firstname, address and postcode, the row has come from the patentdata table.&lt;br /&gt;
&lt;br /&gt;
==== Index ====&lt;br /&gt;
Since the table is relatively large, and is likely to be searched often, an index has been imposed on the table.&lt;br /&gt;
&lt;br /&gt;
  allpatent=# CREATE INDEX ON assignees (orgname);&lt;br /&gt;
  CREATE INDEX&lt;br /&gt;
&lt;br /&gt;
====Sample insert and copy commands ====&lt;br /&gt;
	INSERT INTO assignees_merge&lt;br /&gt;
	(&lt;br /&gt;
	SELECT&lt;br /&gt;
	'null',&lt;br /&gt;
	'null',&lt;br /&gt;
	'null',&lt;br /&gt;
	'null',&lt;br /&gt;
	a.assignee,&lt;br /&gt;
	a.city,&lt;br /&gt;
	a.country,&lt;br /&gt;
	a.patent,&lt;br /&gt;
	a.state,&lt;br /&gt;
	'null',&lt;br /&gt;
	a.nationality,&lt;br /&gt;
	a.residence,&lt;br /&gt;
	a.asgseq,&lt;br /&gt;
	a.asgtype&lt;br /&gt;
	FROM assignees a&lt;br /&gt;
	);&lt;br /&gt;
&lt;br /&gt;
	INSERT INTO assignees_merge&lt;br /&gt;
	(&lt;br /&gt;
	SELECT&lt;br /&gt;
	assignees.lastname,&lt;br /&gt;
	assignees.firstname,&lt;br /&gt;
	assignees.address,&lt;br /&gt;
	assignees.postcode,&lt;br /&gt;
	assignees.orgname,&lt;br /&gt;
	assignees.city,&lt;br /&gt;
	assignees.country,&lt;br /&gt;
	assignees.patentnumber,&lt;br /&gt;
	assignees.state,&lt;br /&gt;
	assignees.patentcountry,&lt;br /&gt;
	'null',&lt;br /&gt;
	'null',&lt;br /&gt;
	-1,&lt;br /&gt;
	-1&lt;br /&gt;
	FROM assignees&lt;br /&gt;
	);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	\COPY assignees_merge TO '/tmp/assignees_merge_export.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
	\COPY assignees FROM '/tmp/assignees_merge_export.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
	--1607724&lt;br /&gt;
&lt;br /&gt;
	\COPY assignees_merge TO '/tmp/assignees_merge_export1.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
	\COPY assignees FROM '/tmp/assignees_merge_export1.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
	--3818842&lt;br /&gt;
&lt;br /&gt;
Note : The assignees table was updated on 6/23 to remove the 'null' string and the '-1' values.&lt;br /&gt;
&lt;br /&gt;
==Patents ==&lt;br /&gt;
&lt;br /&gt;
'''Patentdata Schema:'''&lt;br /&gt;
&lt;br /&gt;
 Column  |       Type        | Modifiers&lt;br /&gt;
 --------+-------------------+-----------&lt;br /&gt;
 patent  | integer           |&lt;br /&gt;
 kind    | character varying |&lt;br /&gt;
 claims  | integer           |&lt;br /&gt;
 apptype | integer           |&lt;br /&gt;
 appnum  | integer           |&lt;br /&gt;
 gdate   | date              |&lt;br /&gt;
 gyear   | integer           |&lt;br /&gt;
 appdate | date              |&lt;br /&gt;
 appyear | integer           |&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Patent_2015 Schema:'''&lt;br /&gt;
&lt;br /&gt;
             Column             |  Type   | Modifiers&lt;br /&gt;
 -------------------------------+---------+-----------&lt;br /&gt;
  patentnumber                  | int | not null&lt;br /&gt;
  kind                          | varchar    |&lt;br /&gt;
  grantdate                     | date    |&lt;br /&gt;
  type                          | varchar    |&lt;br /&gt;
  applicationnumber             | varchar    |&lt;br /&gt;
  filingdate                    | date    |&lt;br /&gt;
  prioritydate                  | date    |&lt;br /&gt;
  prioritycountry               | varchar    |&lt;br /&gt;
  prioritypatentnumber          | varchar    |&lt;br /&gt;
  ussubclass                    | varchar    |&lt;br /&gt;
  maingroup                     | varchar    |&lt;br /&gt;
  subgroup                      | varchar    |&lt;br /&gt;
  cpcsubclass                   | varchar    |&lt;br /&gt;
  cpcmaingroup                  | varchar    |&lt;br /&gt;
  cpcsubgroup                   | varchar    |&lt;br /&gt;
  classificationnationalcountry | varchar    |&lt;br /&gt;
  classificationnationalclass   | varchar    |&lt;br /&gt;
  title                         | varchar    |&lt;br /&gt;
  numberofclaims                | int |&lt;br /&gt;
  primaryexaminerfirstname      | varchar    |&lt;br /&gt;
  primaryexaminerlastname       | varchar    |&lt;br /&gt;
  primaryexaminerdepartment     | varchar    |&lt;br /&gt;
  pctpatentnumber               | varchar    |&lt;br /&gt;
  filename                      | varchar    |&lt;br /&gt;
  &lt;br /&gt;
''' Overlapping Columns '''&lt;br /&gt;
   patent_data     patent_2015&lt;br /&gt;
  --------------+-------------&lt;br /&gt;
    patent      |  patentnumber&lt;br /&gt;
    kind        |  kind&lt;br /&gt;
    claims      |  numberofclaims&lt;br /&gt;
    apptype     |  type&lt;br /&gt;
    appnum      |  applicationnumber&lt;br /&gt;
    gdate       |  grantdate&lt;br /&gt;
    appdate     |  filingdate&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
'''Combined Schema:'''&lt;br /&gt;
&lt;br /&gt;
The final schema of the patents table is : &lt;br /&gt;
&lt;br /&gt;
           Column        |       Type        | Modifiers&lt;br /&gt;
   ----------------------+-------------------+-----------&lt;br /&gt;
    patent               | integer           | not null&lt;br /&gt;
    grantdate            | date              |&lt;br /&gt;
    prioritydate         | date              |&lt;br /&gt;
    prioritycountry      | character varying |&lt;br /&gt;
    prioritypatentnumber | character varying |&lt;br /&gt;
    cpcsubgroup          | character varying |&lt;br /&gt;
    pctpatentnumber      | character varying |&lt;br /&gt;
    claims               | integer           |&lt;br /&gt;
    appnum               | integer           |&lt;br /&gt;
    gyear                | integer           |&lt;br /&gt;
    appdate              | date              |&lt;br /&gt;
    appyear              | integer           |&lt;br /&gt;
    nber                 | integer           |&lt;br /&gt;
    uspc                 | character varying |&lt;br /&gt;
    uspc_sub             | character varying |&lt;br /&gt;
 &lt;br /&gt;
From the total list of columns belonging to both the tables (patentdata and patent_2015), a few columns, most of them related to classification of patents, have been dropped since the data in the tables was not clean.&lt;br /&gt;
&lt;br /&gt;
Additionally, three columns - nber, uspc, uspc_sub have been added from the historicalpatentdata, a table built from data downloaded from the USPTO Bulk Data Storage. The join was executed on the patent number.&lt;br /&gt;
&lt;br /&gt;
  Note : The addition, deletion of columns as through separate [[Patent Data Cleanup - June 2016 |scripts]], therefore the scripts below will be slightly discrepant.&lt;br /&gt;
        &lt;br /&gt;
==== Index and Key Creation ====&lt;br /&gt;
Patent numbers are distinct in this table, and are central to the rest of the fields in the table. A primary key can therefore be imposed on the column. Also, since a number of searches are likely to be conducted on this table, an index has been imposed as well.&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
  ALTER TABLE patents ADD PRIMARY KEY (patentnumber);&lt;br /&gt;
  -- RESULT : ALTER TABLE&lt;br /&gt;
  allpatent=# CREATE UNIQUE INDEX patent_idx ON patents (patentnumber);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Sample Insert and Copy Statements====&lt;br /&gt;
    patentdata:&lt;br /&gt;
    INSERT INTO patents_merged&lt;br /&gt;
    (&lt;br /&gt;
    		 SELECT	&lt;br /&gt;
    		  patent, &lt;br /&gt;
	          kind, &lt;br /&gt;
	          gdate, &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	          NULL, &lt;br /&gt;
	          NULL, &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         -1, &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         claims, &lt;br /&gt;
	         apptype, &lt;br /&gt;
	         appnum, &lt;br /&gt;
	         gyear, &lt;br /&gt;
	         appdate, &lt;br /&gt;
        	 appyear &lt;br /&gt;
        	 FROM patents &lt;br /&gt;
    ); &lt;br /&gt;
    -- RESULT : INSERT 0 3984771 &lt;br /&gt;
    &lt;br /&gt;
    patent_2015:&lt;br /&gt;
    INSERT INTO patents_merged&lt;br /&gt;
    (&lt;br /&gt;
    	SELECT&lt;br /&gt;
    		patentnumber, &lt;br /&gt;
		kind, &lt;br /&gt;
		grantdate,&lt;br /&gt;
		type,&lt;br /&gt;
		applicationnumber,&lt;br /&gt;
		filingdate,&lt;br /&gt;
		prioritydate,&lt;br /&gt;
		prioritycountry,&lt;br /&gt;
		prioritypatentnumber,&lt;br /&gt;
		ussubclass,&lt;br /&gt;
		maingroup,&lt;br /&gt;
		subgroup,&lt;br /&gt;
		cpcsubclass,&lt;br /&gt;
		cpcmaingroup,&lt;br /&gt;
		cpcsubgroup,&lt;br /&gt;
		classificationnationalcountry,&lt;br /&gt;
		classificationnationalclass,&lt;br /&gt;
		title,&lt;br /&gt;
		numberofclaims,&lt;br /&gt;
		primaryexaminerfirstname,&lt;br /&gt;
		primaryexaminerlastname,&lt;br /&gt;
		primaryexaminerdepartment,&lt;br /&gt;
		pctpatentnumber,&lt;br /&gt;
		filename,&lt;br /&gt;
		-1,&lt;br /&gt;
		-1,&lt;br /&gt;
		-1,&lt;br /&gt;
		-1,&lt;br /&gt;
		NULL,&lt;br /&gt;
        	-1&lt;br /&gt;
    	FROM patents&lt;br /&gt;
    );&lt;br /&gt;
    -- RESULT : INSERT 0 1646225&lt;br /&gt;
    &lt;br /&gt;
COPY SCRIPTS:&lt;br /&gt;
patentdata:&lt;br /&gt;
  \COPY patents_merged TO '/tmp/merged_patents_export1.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  --COPY 3984771&lt;br /&gt;
&lt;br /&gt;
patent_2015:&lt;br /&gt;
  \COPY patents_merged TO '/tmp/merged_patents_export.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  --COPY 1646225&lt;br /&gt;
&lt;br /&gt;
PATENTS TABLE&lt;br /&gt;
  \COPY patents FROM '/tmp/merged_patents_export1.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  -- RESULT : COPY 3984771&lt;br /&gt;
  \COPY patents FROM '/tmp/merged_patents_export.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  -- RESULT : COPY 1646225&lt;br /&gt;
&lt;br /&gt;
====TESTING ====&lt;br /&gt;
  select count(*) FROM (SELECT DISTINCT patentnumber FROM patents) AS t;&lt;br /&gt;
  --RESULT:  5411151&lt;br /&gt;
   EXPECTED: 5426566&lt;br /&gt;
&lt;br /&gt;
We found some copies of a few rows, where both the patent_2015 and patentdata &lt;br /&gt;
&lt;br /&gt;
  SELECT COUNT(*), *&lt;br /&gt;
  FROM patents&lt;br /&gt;
  GROUP BY&lt;br /&gt;
  	patentnumber, &lt;br /&gt;
	kind, &lt;br /&gt;
	grantdate,&lt;br /&gt;
	type,&lt;br /&gt;
	applicationnumber,&lt;br /&gt;
	filingdate,&lt;br /&gt;
	prioritydate,&lt;br /&gt;
	prioritycountry,&lt;br /&gt;
	prioritypatentnumber,&lt;br /&gt;
	ussubclass,&lt;br /&gt;
	maingroup,&lt;br /&gt;
	subgroup,&lt;br /&gt;
	cpcsubclass,&lt;br /&gt;
	cpcmaingroup,&lt;br /&gt;
	cpcsubgroup,&lt;br /&gt;
	classificationnationalcountry,&lt;br /&gt;
	classificationnationalclass,&lt;br /&gt;
	title,&lt;br /&gt;
	numberofclaims,&lt;br /&gt;
	primaryexaminerfirstname,&lt;br /&gt;
	primaryexaminerlastname,&lt;br /&gt;
	primaryexaminerdepartment,&lt;br /&gt;
	pctpatentnumber,&lt;br /&gt;
	filename,&lt;br /&gt;
	claims,&lt;br /&gt;
	apptype,&lt;br /&gt;
	appnum,&lt;br /&gt;
	gyear,&lt;br /&gt;
	appdate,&lt;br /&gt;
	appyear&lt;br /&gt;
  HAVING COUNT(*) &amp;gt; 1;&lt;br /&gt;
&lt;br /&gt;
  SELECT patentnumber, count(*)&lt;br /&gt;
  FROM patents&lt;br /&gt;
  GROUP BY patentnumber&lt;br /&gt;
  HAVING count(*)&amp;gt;1;&lt;br /&gt;
  --7640598 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  SELECT * &lt;br /&gt;
  FROM patents op&lt;br /&gt;
  WHERE op.patentnumber IN&lt;br /&gt;
	(&lt;br /&gt;
	SELECT ip.patentnumber &lt;br /&gt;
	FROM patents ip&lt;br /&gt;
	GROUP BY ip.patentnumber&lt;br /&gt;
	HAVING COUNT(*)&amp;gt;1&lt;br /&gt;
	)&lt;br /&gt;
  ORDER BY op.patentnumber;&lt;br /&gt;
&lt;br /&gt;
  (&lt;br /&gt;
  SELECT * &lt;br /&gt;
  INTO patentsCleaned&lt;br /&gt;
  FROM patents op&lt;br /&gt;
  WHERE op.patentnumber IN&lt;br /&gt;
	(&lt;br /&gt;
	SELECT ip.patentnumber &lt;br /&gt;
	FROM patents ip&lt;br /&gt;
	GROUP BY ip.patentnumber&lt;br /&gt;
	HAVING COUNT(*)=1&lt;br /&gt;
	)&lt;br /&gt;
  ORDER BY op.patentnumber&lt;br /&gt;
  )&lt;br /&gt;
  --SELECT 5191306&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  INSERT INTO patentsCleaned(&lt;br /&gt;
  SELECT * &lt;br /&gt;
  FROM patents op&lt;br /&gt;
  WHERE op.patentnumber IN&lt;br /&gt;
	(&lt;br /&gt;
	SELECT ip.patentnumber &lt;br /&gt;
	FROM patents ip&lt;br /&gt;
	GROUP BY ip.patentnumber&lt;br /&gt;
	HAVING COUNT(*)&amp;gt;1&lt;br /&gt;
	)&lt;br /&gt;
  AND op.applicationnumber NOT LIKE 'NULL'&lt;br /&gt;
  ORDER BY op.patentnumber&lt;br /&gt;
  );&lt;br /&gt;
&lt;br /&gt;
  --219845&lt;br /&gt;
&lt;br /&gt;
====TESTING:====&lt;br /&gt;
  allpatent=# select count(*) from patentsCleaned;&lt;br /&gt;
    count&lt;br /&gt;
  ---------&lt;br /&gt;
   5411151&lt;br /&gt;
  (1 row)&lt;br /&gt;
&lt;br /&gt;
  allpatent=# select count(*), patentnumber FROM patentsCleaned group by patentnumber having count(*) &amp;gt; 1;&lt;br /&gt;
   count | patentnumber&lt;br /&gt;
  -------+--------------&lt;br /&gt;
  (0 rows)&lt;br /&gt;
&lt;br /&gt;
== Citations==&lt;br /&gt;
&lt;br /&gt;
In the citations table, we needed to define another function that would convert a textual patent number into a number (big int, since the patents number were exceeding the range of regular integers.)&lt;br /&gt;
&lt;br /&gt;
To Extract Patents with Numbers Only and to Ignore Other RegExes&lt;br /&gt;
  CREATE OR REPLACE FUNCTION cleanpatno (text) RETURNS bigint AS $$&lt;br /&gt;
	if ($_[0]) {&lt;br /&gt;
		my $var=$_[0];&lt;br /&gt;
		if ($var=~/^\d*$/) {return $var;}&lt;br /&gt;
		return undef;&lt;br /&gt;
	}&lt;br /&gt;
	return undef;&lt;br /&gt;
	$$ LANGUAGE plperl;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''patentdata schema:'''&lt;br /&gt;
&lt;br /&gt;
    Column    |       Type        | Modifiers&lt;br /&gt;
  ------------+-------------------+-----------&lt;br /&gt;
   patent     | integer           | &lt;br /&gt;
  cit_date    | date              |&lt;br /&gt;
  cit_name    | character varying |&lt;br /&gt;
  cit_kind    | character varying |&lt;br /&gt;
  cit_country | character varying |&lt;br /&gt;
  citation    | integer           |&lt;br /&gt;
  category    | character varying |&lt;br /&gt;
  citseq      | integer           | &lt;br /&gt;
&lt;br /&gt;
  SELECT patent as citingpatentnumber, citation AS citedpatentnumber&lt;br /&gt;
  INTO citations_merged&lt;br /&gt;
  FROM citations;&lt;br /&gt;
  --SELECT 38452957&lt;br /&gt;
&lt;br /&gt;
'''patent_2015 schema:'''&lt;br /&gt;
         Column        |  Type   | Modifiers&lt;br /&gt;
  ---------------------+---------+-----------&lt;br /&gt;
   citingpatentnumber  | integer |&lt;br /&gt;
   citingpatentcountry | text    |&lt;br /&gt;
   citedpatentnumber   | text    |&lt;br /&gt;
   citedpatentcountry  | text    |&lt;br /&gt;
&lt;br /&gt;
  SELECT CAST(citingpatentnumber AS bigint), CAST(cleanpatno( citedpatentnumber) AS bigint) as citedpatentnumber&lt;br /&gt;
  INTO citations_merged&lt;br /&gt;
  FROM citations;&lt;br /&gt;
  -- RESULT : SELECT 59227881&lt;br /&gt;
&lt;br /&gt;
'''Overlapping Columns'''&lt;br /&gt;
&lt;br /&gt;
       patent_2015     |  patentdata   |&lt;br /&gt;
  ---------------------+---------------+&lt;br /&gt;
   citingpatentnumber  | patent        |&lt;br /&gt;
   citedpatentnumber   | citation      |&lt;br /&gt;
  &lt;br /&gt;
''' Combined Schema:'''&lt;br /&gt;
&lt;br /&gt;
       Column       |  Type  | Modifiers&lt;br /&gt;
--------------------+--------+-----------&lt;br /&gt;
 citingpatentnumber | bigint |&lt;br /&gt;
 citedpatentnumber  | bigint |&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy Statements:&lt;br /&gt;
&lt;br /&gt;
patentdata:&lt;br /&gt;
  \COPY citations_merged TO '/tmp/merged_citations_export1.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  --COPY 38452957&lt;br /&gt;
&lt;br /&gt;
patent_2015:&lt;br /&gt;
  \COPY citations_merged TO '/tmp/merged_citations_export.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  -- RESULT : COPY 59227881&lt;br /&gt;
&lt;br /&gt;
allpatent:&lt;br /&gt;
  \COPY citations FROM '/tmp/merged_citations_export.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  --RESULT : COPY 59227881&lt;br /&gt;
&lt;br /&gt;
  \COPY citations FROM '/tmp/merged_citations_export1.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  --RESULT: COPY 38452957&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CLONING:&lt;br /&gt;
CREATE DATABASE allpatentsProcessed WITH TEMPLATE allpatent OWNER researcher;&lt;br /&gt;
&lt;br /&gt;
== USPTO Consolidated Patent Data ==&lt;br /&gt;
&lt;br /&gt;
The USPTO has a repository of patent data on their Bulk Data Storage system. We have this data downloaded and loaded into a table on the patent database. Here are the steps followed:&lt;br /&gt;
* Download file from the BDS system - we have access to CSV files.&lt;br /&gt;
* Create table with required specs&lt;br /&gt;
* use the \COPY command to copy the data from the file into the table. &lt;br /&gt;
&lt;br /&gt;
Script follows.&lt;br /&gt;
&lt;br /&gt;
'''Script:'''&lt;br /&gt;
&lt;br /&gt;
 /* creating patent data tables from : https://bulkdata.uspto.gov/data2/patent/maintenancefee/*/&lt;br /&gt;
&lt;br /&gt;
 CREATE TABLE PatentMaintenanceFee(&lt;br /&gt;
 patentnumber varchar,&lt;br /&gt;
 applicationnumber int,&lt;br /&gt;
 smallentity varchar,&lt;br /&gt;
 filingdate date,&lt;br /&gt;
 grantissuedate date,&lt;br /&gt;
 maintenancefeedate date,&lt;br /&gt;
 maintenancefeecode varchar&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 \COPY PatentMaintenanceFee FROM '/bulk/USPTO_Consolidated/MaintFeeEvents_20160613.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
 -- RESULT : COPY 14042059&lt;br /&gt;
&lt;br /&gt;
 /* creating tables for historical patent data - USPTO */ &lt;br /&gt;
&lt;br /&gt;
 CREATE TABLE HistoricalPatentData(&lt;br /&gt;
 applicationid int,&lt;br /&gt;
 pubno varchar,&lt;br /&gt;
 patentnumber varchar,&lt;br /&gt;
 NBER int,&lt;br /&gt;
 USPC varchar,&lt;br /&gt;
 USPC_sub varchar,&lt;br /&gt;
 applicationdate date,&lt;br /&gt;
 prioritydate date,&lt;br /&gt;
 pubdate date,&lt;br /&gt;
 displaydate date,&lt;br /&gt;
 disptype varchar,&lt;br /&gt;
 exp_dt date,&lt;br /&gt;
 exp_dt_max date,&lt;br /&gt;
 pta int&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 \COPY historicalpatentdata FROM '/bulk/USPTO_Consolidated/HistoricalFiles/historical_masterfile.csv' DELIMITER AS ',' HEADER NULL AS '' CSV;&lt;br /&gt;
&lt;br /&gt;
 --COPY 11191813&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Patent_Data_Processing_-_SQL_Steps&amp;diff=4461</id>
		<title>Patent Data Processing - SQL Steps</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Patent_Data_Processing_-_SQL_Steps&amp;diff=4461"/>
		<updated>2016-07-06T17:46:24Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: /* USPTO Consolidated Patent Data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Internal]]&lt;br /&gt;
[[Internal Classification::Legacy| ]]&lt;br /&gt;
&lt;br /&gt;
== Objective ==&lt;br /&gt;
The McNair Center owns two sets of patent data - one set that is inherited from Harvard, the Harvard dataverse, which is stored in the database patentdata and another that is generated by crawlers pulling data from the USPTO website, which is stored in the database '''patent_2015'''.&lt;br /&gt;
&lt;br /&gt;
We are now merging and cleaning the two data sets, and storing them in a schema that is amalgamation of the two underlying schema for the citations tables, assignees tables, and patents tables. The destination schema is '''allpatent'''.&lt;br /&gt;
&lt;br /&gt;
== Assignees Data==&lt;br /&gt;
&lt;br /&gt;
The schema for the assignees table in '''patentdata''' database is:&lt;br /&gt;
&lt;br /&gt;
    Column    |       Type        | Modifiers&lt;br /&gt;
 -------------+-------------------+-----------&lt;br /&gt;
  patent      | integer           |&lt;br /&gt;
  asgtype     | integer           |&lt;br /&gt;
  assignee    | character varying |&lt;br /&gt;
  city        | character varying |&lt;br /&gt;
  state       | character varying |&lt;br /&gt;
  country     | character varying |&lt;br /&gt;
  nationality | character varying |&lt;br /&gt;
  residence   | character varying |&lt;br /&gt;
  asgseq      | integer           |&lt;br /&gt;
&lt;br /&gt;
The schema for the assignees table in patent_2015 is :&lt;br /&gt;
&lt;br /&gt;
    Column     |  Type   | Modifiers&lt;br /&gt;
 --------------+---------+-----------&lt;br /&gt;
 lastname      | text    |&lt;br /&gt;
 firstname     | text    |&lt;br /&gt;
 orgname       | text    |&lt;br /&gt;
 city          | text    |&lt;br /&gt;
 country       | text    |&lt;br /&gt;
 patentcountry | text    |&lt;br /&gt;
 patentnumber  | integer |&lt;br /&gt;
 state         | text    |&lt;br /&gt;
 address       | text    |&lt;br /&gt;
 postcode      | text    |&lt;br /&gt;
&lt;br /&gt;
To merge both schemas, we have some columns that overlap, and some columns that don't.&lt;br /&gt;
&lt;br /&gt;
'''Overlapping Columns'''&lt;br /&gt;
&lt;br /&gt;
  patent_2015  | patentdata&lt;br /&gt;
 --------------+--------------&lt;br /&gt;
  orgname      | assignee &lt;br /&gt;
  city         | city &lt;br /&gt;
  country      | country&lt;br /&gt;
  patentnumber | patent &lt;br /&gt;
  state        | state&lt;br /&gt;
&lt;br /&gt;
These columns will have entries for most rows in the table, because they exist in both tables. The rest of the columns will be populated based on which table the row is coming from.&lt;br /&gt;
&lt;br /&gt;
'''Final Schema'''&lt;br /&gt;
&lt;br /&gt;
         Table &amp;quot;public.assignees&amp;quot;&lt;br /&gt;
     Column     |       Type        | Modifiers&lt;br /&gt;
 ---------------+-------------------+-----------&lt;br /&gt;
  lastname      | character varying |&lt;br /&gt;
  firstname     | character varying |&lt;br /&gt;
  address       | character varying |&lt;br /&gt;
  postcode      | character varying |&lt;br /&gt;
  orgname       | character varying |&lt;br /&gt;
  city          | character varying |&lt;br /&gt;
  country       | character varying |&lt;br /&gt;
  patentnumber  | integer           |&lt;br /&gt;
  state         | character varying |&lt;br /&gt;
  patentcountry | character varying |&lt;br /&gt;
  nationality2  | character varying |&lt;br /&gt;
  residence     | character varying |&lt;br /&gt;
  asgseq        | integer           |&lt;br /&gt;
  asgtype       | integer           |&lt;br /&gt;
&lt;br /&gt;
'''Non-overlapping Columns'''&lt;br /&gt;
These are the columns that belong to either one of the assignees tables, and not to both. For these cases, to help users understand where the row is coming from, the following insert rules have been followed:&lt;br /&gt;
&lt;br /&gt;
*For columns of type int, insert -1&lt;br /&gt;
*For columns of type string (character varying), the string 'null' has been inserted.&lt;br /&gt;
&lt;br /&gt;
Therefore, if a row has appropriate values for orgname, state, city ,etc, but 'null' values for lastname, firstname, address and postcode, the row has come from the patentdata table.&lt;br /&gt;
&lt;br /&gt;
==== Index ====&lt;br /&gt;
Since the table is relatively large, and is likely to be searched often, an index has been imposed on the table.&lt;br /&gt;
&lt;br /&gt;
  allpatent=# CREATE INDEX ON assignees (orgname);&lt;br /&gt;
  CREATE INDEX&lt;br /&gt;
&lt;br /&gt;
====Sample insert and copy commands ====&lt;br /&gt;
	INSERT INTO assignees_merge&lt;br /&gt;
	(&lt;br /&gt;
	SELECT&lt;br /&gt;
	'null',&lt;br /&gt;
	'null',&lt;br /&gt;
	'null',&lt;br /&gt;
	'null',&lt;br /&gt;
	a.assignee,&lt;br /&gt;
	a.city,&lt;br /&gt;
	a.country,&lt;br /&gt;
	a.patent,&lt;br /&gt;
	a.state,&lt;br /&gt;
	'null',&lt;br /&gt;
	a.nationality,&lt;br /&gt;
	a.residence,&lt;br /&gt;
	a.asgseq,&lt;br /&gt;
	a.asgtype&lt;br /&gt;
	FROM assignees a&lt;br /&gt;
	);&lt;br /&gt;
&lt;br /&gt;
	INSERT INTO assignees_merge&lt;br /&gt;
	(&lt;br /&gt;
	SELECT&lt;br /&gt;
	assignees.lastname,&lt;br /&gt;
	assignees.firstname,&lt;br /&gt;
	assignees.address,&lt;br /&gt;
	assignees.postcode,&lt;br /&gt;
	assignees.orgname,&lt;br /&gt;
	assignees.city,&lt;br /&gt;
	assignees.country,&lt;br /&gt;
	assignees.patentnumber,&lt;br /&gt;
	assignees.state,&lt;br /&gt;
	assignees.patentcountry,&lt;br /&gt;
	'null',&lt;br /&gt;
	'null',&lt;br /&gt;
	-1,&lt;br /&gt;
	-1&lt;br /&gt;
	FROM assignees&lt;br /&gt;
	);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	\COPY assignees_merge TO '/tmp/assignees_merge_export.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
	\COPY assignees FROM '/tmp/assignees_merge_export.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
	--1607724&lt;br /&gt;
&lt;br /&gt;
	\COPY assignees_merge TO '/tmp/assignees_merge_export1.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
	\COPY assignees FROM '/tmp/assignees_merge_export1.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
	--3818842&lt;br /&gt;
&lt;br /&gt;
Note : The assignees table was updated on 6/23 to remove the 'null' string and the '-1' values.&lt;br /&gt;
&lt;br /&gt;
==Patents ==&lt;br /&gt;
&lt;br /&gt;
'''Patentdata Schema:'''&lt;br /&gt;
&lt;br /&gt;
 Column  |       Type        | Modifiers&lt;br /&gt;
 --------+-------------------+-----------&lt;br /&gt;
 patent  | integer           |&lt;br /&gt;
 kind    | character varying |&lt;br /&gt;
 claims  | integer           |&lt;br /&gt;
 apptype | integer           |&lt;br /&gt;
 appnum  | integer           |&lt;br /&gt;
 gdate   | date              |&lt;br /&gt;
 gyear   | integer           |&lt;br /&gt;
 appdate | date              |&lt;br /&gt;
 appyear | integer           |&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Patent_2015 Schema:'''&lt;br /&gt;
&lt;br /&gt;
             Column             |  Type   | Modifiers&lt;br /&gt;
 -------------------------------+---------+-----------&lt;br /&gt;
  patentnumber                  | int | not null&lt;br /&gt;
  kind                          | varchar    |&lt;br /&gt;
  grantdate                     | date    |&lt;br /&gt;
  type                          | varchar    |&lt;br /&gt;
  applicationnumber             | varchar    |&lt;br /&gt;
  filingdate                    | date    |&lt;br /&gt;
  prioritydate                  | date    |&lt;br /&gt;
  prioritycountry               | varchar    |&lt;br /&gt;
  prioritypatentnumber          | varchar    |&lt;br /&gt;
  ussubclass                    | varchar    |&lt;br /&gt;
  maingroup                     | varchar    |&lt;br /&gt;
  subgroup                      | varchar    |&lt;br /&gt;
  cpcsubclass                   | varchar    |&lt;br /&gt;
  cpcmaingroup                  | varchar    |&lt;br /&gt;
  cpcsubgroup                   | varchar    |&lt;br /&gt;
  classificationnationalcountry | varchar    |&lt;br /&gt;
  classificationnationalclass   | varchar    |&lt;br /&gt;
  title                         | varchar    |&lt;br /&gt;
  numberofclaims                | int |&lt;br /&gt;
  primaryexaminerfirstname      | varchar    |&lt;br /&gt;
  primaryexaminerlastname       | varchar    |&lt;br /&gt;
  primaryexaminerdepartment     | varchar    |&lt;br /&gt;
  pctpatentnumber               | varchar    |&lt;br /&gt;
  filename                      | varchar    |&lt;br /&gt;
  &lt;br /&gt;
''' Overlapping Columns '''&lt;br /&gt;
   patent_data     patent_2015&lt;br /&gt;
  --------------+-------------&lt;br /&gt;
    patent      |  patentnumber&lt;br /&gt;
    kind        |  kind&lt;br /&gt;
    claims      |  numberofclaims&lt;br /&gt;
    apptype     |  type&lt;br /&gt;
    appnum      |  applicationnumber&lt;br /&gt;
    gdate       |  grantdate&lt;br /&gt;
    appdate     |  filingdate&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
'''Combined Schema:'''&lt;br /&gt;
&lt;br /&gt;
The final schema of the patents table is : &lt;br /&gt;
&lt;br /&gt;
           Column        |       Type        | Modifiers&lt;br /&gt;
   ----------------------+-------------------+-----------&lt;br /&gt;
    patent               | integer           | not null&lt;br /&gt;
    grantdate            | date              |&lt;br /&gt;
    prioritydate         | date              |&lt;br /&gt;
    prioritycountry      | character varying |&lt;br /&gt;
    prioritypatentnumber | character varying |&lt;br /&gt;
    cpcsubgroup          | character varying |&lt;br /&gt;
    pctpatentnumber      | character varying |&lt;br /&gt;
    claims               | integer           |&lt;br /&gt;
    appnum               | integer           |&lt;br /&gt;
    gyear                | integer           |&lt;br /&gt;
    appdate              | date              |&lt;br /&gt;
    appyear              | integer           |&lt;br /&gt;
    nber                 | integer           |&lt;br /&gt;
    uspc                 | character varying |&lt;br /&gt;
    uspc_sub             | character varying |&lt;br /&gt;
 &lt;br /&gt;
From the total list of columns belonging to both the tables (patentdata and patent_2015), a few columns, most of them related to classification of patents, have been dropped since the data in the tables was not clean.&lt;br /&gt;
&lt;br /&gt;
Additionally, three columns - nber, uspc, uspc_sub have been added from the historicalpatentdata, a table built from data downloaded from the USPTO Bulk Data Storage. The join was executed on the patent number.&lt;br /&gt;
&lt;br /&gt;
  Note : The addition, deletion of columns as through separate [[Patent Data Cleanup - June 2016 |scripts]], therefore the scripts below will be slightly discrepant.&lt;br /&gt;
        &lt;br /&gt;
==== Index and Key Creation ====&lt;br /&gt;
Patent numbers are distinct in this table, and are central to the rest of the fields in the table. A primary key can therefore be imposed on the column. Also, since a number of searches are likely to be conducted on this table, an index has been imposed as well.&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
  ALTER TABLE patents ADD PRIMARY KEY (patentnumber);&lt;br /&gt;
  -- RESULT : ALTER TABLE&lt;br /&gt;
  allpatent=# CREATE UNIQUE INDEX patent_idx ON patents (patentnumber);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Sample Insert and Copy Statements====&lt;br /&gt;
    patentdata:&lt;br /&gt;
    INSERT INTO patents_merged&lt;br /&gt;
    (&lt;br /&gt;
    		 SELECT	&lt;br /&gt;
    		  patent, &lt;br /&gt;
	          kind, &lt;br /&gt;
	          gdate, &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	          NULL, &lt;br /&gt;
	          NULL, &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         -1, &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         claims, &lt;br /&gt;
	         apptype, &lt;br /&gt;
	         appnum, &lt;br /&gt;
	         gyear, &lt;br /&gt;
	         appdate, &lt;br /&gt;
        	 appyear &lt;br /&gt;
        	 FROM patents &lt;br /&gt;
    ); &lt;br /&gt;
    -- RESULT : INSERT 0 3984771 &lt;br /&gt;
    &lt;br /&gt;
    patent_2015:&lt;br /&gt;
    INSERT INTO patents_merged&lt;br /&gt;
    (&lt;br /&gt;
    	SELECT&lt;br /&gt;
    		patentnumber, &lt;br /&gt;
		kind, &lt;br /&gt;
		grantdate,&lt;br /&gt;
		type,&lt;br /&gt;
		applicationnumber,&lt;br /&gt;
		filingdate,&lt;br /&gt;
		prioritydate,&lt;br /&gt;
		prioritycountry,&lt;br /&gt;
		prioritypatentnumber,&lt;br /&gt;
		ussubclass,&lt;br /&gt;
		maingroup,&lt;br /&gt;
		subgroup,&lt;br /&gt;
		cpcsubclass,&lt;br /&gt;
		cpcmaingroup,&lt;br /&gt;
		cpcsubgroup,&lt;br /&gt;
		classificationnationalcountry,&lt;br /&gt;
		classificationnationalclass,&lt;br /&gt;
		title,&lt;br /&gt;
		numberofclaims,&lt;br /&gt;
		primaryexaminerfirstname,&lt;br /&gt;
		primaryexaminerlastname,&lt;br /&gt;
		primaryexaminerdepartment,&lt;br /&gt;
		pctpatentnumber,&lt;br /&gt;
		filename,&lt;br /&gt;
		-1,&lt;br /&gt;
		-1,&lt;br /&gt;
		-1,&lt;br /&gt;
		-1,&lt;br /&gt;
		NULL,&lt;br /&gt;
        	-1&lt;br /&gt;
    	FROM patents&lt;br /&gt;
    );&lt;br /&gt;
    -- RESULT : INSERT 0 1646225&lt;br /&gt;
    &lt;br /&gt;
COPY SCRIPTS:&lt;br /&gt;
patentdata:&lt;br /&gt;
  \COPY patents_merged TO '/tmp/merged_patents_export1.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  --COPY 3984771&lt;br /&gt;
&lt;br /&gt;
patent_2015:&lt;br /&gt;
  \COPY patents_merged TO '/tmp/merged_patents_export.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  --COPY 1646225&lt;br /&gt;
&lt;br /&gt;
PATENTS TABLE&lt;br /&gt;
  \COPY patents FROM '/tmp/merged_patents_export1.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  -- RESULT : COPY 3984771&lt;br /&gt;
  \COPY patents FROM '/tmp/merged_patents_export.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  -- RESULT : COPY 1646225&lt;br /&gt;
&lt;br /&gt;
====TESTING ====&lt;br /&gt;
  select count(*) FROM (SELECT DISTINCT patentnumber FROM patents) AS t;&lt;br /&gt;
  --RESULT:  5411151&lt;br /&gt;
   EXPECTED: 5426566&lt;br /&gt;
&lt;br /&gt;
We found some copies of a few rows, where both the patent_2015 and patentdata &lt;br /&gt;
&lt;br /&gt;
  SELECT COUNT(*), *&lt;br /&gt;
  FROM patents&lt;br /&gt;
  GROUP BY&lt;br /&gt;
  	patentnumber, &lt;br /&gt;
	kind, &lt;br /&gt;
	grantdate,&lt;br /&gt;
	type,&lt;br /&gt;
	applicationnumber,&lt;br /&gt;
	filingdate,&lt;br /&gt;
	prioritydate,&lt;br /&gt;
	prioritycountry,&lt;br /&gt;
	prioritypatentnumber,&lt;br /&gt;
	ussubclass,&lt;br /&gt;
	maingroup,&lt;br /&gt;
	subgroup,&lt;br /&gt;
	cpcsubclass,&lt;br /&gt;
	cpcmaingroup,&lt;br /&gt;
	cpcsubgroup,&lt;br /&gt;
	classificationnationalcountry,&lt;br /&gt;
	classificationnationalclass,&lt;br /&gt;
	title,&lt;br /&gt;
	numberofclaims,&lt;br /&gt;
	primaryexaminerfirstname,&lt;br /&gt;
	primaryexaminerlastname,&lt;br /&gt;
	primaryexaminerdepartment,&lt;br /&gt;
	pctpatentnumber,&lt;br /&gt;
	filename,&lt;br /&gt;
	claims,&lt;br /&gt;
	apptype,&lt;br /&gt;
	appnum,&lt;br /&gt;
	gyear,&lt;br /&gt;
	appdate,&lt;br /&gt;
	appyear&lt;br /&gt;
  HAVING COUNT(*) &amp;gt; 1;&lt;br /&gt;
&lt;br /&gt;
  SELECT patentnumber, count(*)&lt;br /&gt;
  FROM patents&lt;br /&gt;
  GROUP BY patentnumber&lt;br /&gt;
  HAVING count(*)&amp;gt;1;&lt;br /&gt;
  --7640598 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  SELECT * &lt;br /&gt;
  FROM patents op&lt;br /&gt;
  WHERE op.patentnumber IN&lt;br /&gt;
	(&lt;br /&gt;
	SELECT ip.patentnumber &lt;br /&gt;
	FROM patents ip&lt;br /&gt;
	GROUP BY ip.patentnumber&lt;br /&gt;
	HAVING COUNT(*)&amp;gt;1&lt;br /&gt;
	)&lt;br /&gt;
  ORDER BY op.patentnumber;&lt;br /&gt;
&lt;br /&gt;
  (&lt;br /&gt;
  SELECT * &lt;br /&gt;
  INTO patentsCleaned&lt;br /&gt;
  FROM patents op&lt;br /&gt;
  WHERE op.patentnumber IN&lt;br /&gt;
	(&lt;br /&gt;
	SELECT ip.patentnumber &lt;br /&gt;
	FROM patents ip&lt;br /&gt;
	GROUP BY ip.patentnumber&lt;br /&gt;
	HAVING COUNT(*)=1&lt;br /&gt;
	)&lt;br /&gt;
  ORDER BY op.patentnumber&lt;br /&gt;
  )&lt;br /&gt;
  --SELECT 5191306&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  INSERT INTO patentsCleaned(&lt;br /&gt;
  SELECT * &lt;br /&gt;
  FROM patents op&lt;br /&gt;
  WHERE op.patentnumber IN&lt;br /&gt;
	(&lt;br /&gt;
	SELECT ip.patentnumber &lt;br /&gt;
	FROM patents ip&lt;br /&gt;
	GROUP BY ip.patentnumber&lt;br /&gt;
	HAVING COUNT(*)&amp;gt;1&lt;br /&gt;
	)&lt;br /&gt;
  AND op.applicationnumber NOT LIKE 'NULL'&lt;br /&gt;
  ORDER BY op.patentnumber&lt;br /&gt;
  );&lt;br /&gt;
&lt;br /&gt;
  --219845&lt;br /&gt;
&lt;br /&gt;
====TESTING:====&lt;br /&gt;
  allpatent=# select count(*) from patentsCleaned;&lt;br /&gt;
    count&lt;br /&gt;
  ---------&lt;br /&gt;
   5411151&lt;br /&gt;
  (1 row)&lt;br /&gt;
&lt;br /&gt;
  allpatent=# select count(*), patentnumber FROM patentsCleaned group by patentnumber having count(*) &amp;gt; 1;&lt;br /&gt;
   count | patentnumber&lt;br /&gt;
  -------+--------------&lt;br /&gt;
  (0 rows)&lt;br /&gt;
&lt;br /&gt;
== Citations==&lt;br /&gt;
&lt;br /&gt;
In the citations table, we needed to define another function that would convert a textual patent number into a number (big int, since the patents number were exceeding the range of regular integers.)&lt;br /&gt;
&lt;br /&gt;
To Extract Patents with Numbers Only and to Ignore Other RegExes&lt;br /&gt;
  CREATE OR REPLACE FUNCTION cleanpatno (text) RETURNS bigint AS $$&lt;br /&gt;
	if ($_[0]) {&lt;br /&gt;
		my $var=$_[0];&lt;br /&gt;
		if ($var=~/^\d*$/) {return $var;}&lt;br /&gt;
		return undef;&lt;br /&gt;
	}&lt;br /&gt;
	return undef;&lt;br /&gt;
	$$ LANGUAGE plperl;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''patentdata schema:'''&lt;br /&gt;
&lt;br /&gt;
    Column    |       Type        | Modifiers&lt;br /&gt;
  ------------+-------------------+-----------&lt;br /&gt;
   patent     | integer           | &lt;br /&gt;
  cit_date    | date              |&lt;br /&gt;
  cit_name    | character varying |&lt;br /&gt;
  cit_kind    | character varying |&lt;br /&gt;
  cit_country | character varying |&lt;br /&gt;
  citation    | integer           |&lt;br /&gt;
  category    | character varying |&lt;br /&gt;
  citseq      | integer           | &lt;br /&gt;
&lt;br /&gt;
  SELECT patent as citingpatentnumber, citation AS citedpatentnumber&lt;br /&gt;
  INTO citations_merged&lt;br /&gt;
  FROM citations;&lt;br /&gt;
  --SELECT 38452957&lt;br /&gt;
&lt;br /&gt;
'''patent_2015 schema:'''&lt;br /&gt;
         Column        |  Type   | Modifiers&lt;br /&gt;
  ---------------------+---------+-----------&lt;br /&gt;
   citingpatentnumber  | integer |&lt;br /&gt;
   citingpatentcountry | text    |&lt;br /&gt;
   citedpatentnumber   | text    |&lt;br /&gt;
   citedpatentcountry  | text    |&lt;br /&gt;
&lt;br /&gt;
  SELECT CAST(citingpatentnumber AS bigint), CAST(cleanpatno( citedpatentnumber) AS bigint) as citedpatentnumber&lt;br /&gt;
  INTO citations_merged&lt;br /&gt;
  FROM citations;&lt;br /&gt;
  -- RESULT : SELECT 59227881&lt;br /&gt;
&lt;br /&gt;
'''Overlapping Columns'''&lt;br /&gt;
&lt;br /&gt;
       patent_2015     |  patentdata   |&lt;br /&gt;
  ---------------------+---------------+&lt;br /&gt;
   citingpatentnumber  | patent        |&lt;br /&gt;
   citedpatentnumber   | citation      |&lt;br /&gt;
  &lt;br /&gt;
''' Combined Schema:'''&lt;br /&gt;
&lt;br /&gt;
       Column       |  Type  | Modifiers&lt;br /&gt;
--------------------+--------+-----------&lt;br /&gt;
 citingpatentnumber | bigint |&lt;br /&gt;
 citedpatentnumber  | bigint |&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy Statements:&lt;br /&gt;
&lt;br /&gt;
patentdata:&lt;br /&gt;
  \COPY citations_merged TO '/tmp/merged_citations_export1.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  --COPY 38452957&lt;br /&gt;
&lt;br /&gt;
patent_2015:&lt;br /&gt;
  \COPY citations_merged TO '/tmp/merged_citations_export.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  -- RESULT : COPY 59227881&lt;br /&gt;
&lt;br /&gt;
allpatent:&lt;br /&gt;
  \COPY citations FROM '/tmp/merged_citations_export.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  --RESULT : COPY 59227881&lt;br /&gt;
&lt;br /&gt;
  \COPY citations FROM '/tmp/merged_citations_export1.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  --RESULT: COPY 38452957&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CLONING:&lt;br /&gt;
CREATE DATABASE allpatentsProcessed WITH TEMPLATE allpatent OWNER researcher;&lt;br /&gt;
&lt;br /&gt;
== USPTO Consolidated Patent Data ==&lt;br /&gt;
&lt;br /&gt;
 Scripts:&lt;br /&gt;
&lt;br /&gt;
 /* creating patent data tables from : https://bulkdata.uspto.gov/data2/patent/maintenancefee/*/&lt;br /&gt;
&lt;br /&gt;
 CREATE TABLE PatentMaintenanceFee(&lt;br /&gt;
 patentnumber varchar,&lt;br /&gt;
 applicationnumber int,&lt;br /&gt;
 smallentity varchar,&lt;br /&gt;
 filingdate date,&lt;br /&gt;
 grantissuedate date,&lt;br /&gt;
 maintenancefeedate date,&lt;br /&gt;
 maintenancefeecode varchar&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 \COPY PatentMaintenanceFee FROM '/bulk/USPTO_Consolidated/MaintFeeEvents_20160613.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
 -- RESULT : COPY 14042059&lt;br /&gt;
&lt;br /&gt;
 /* creating tables for historical patent data - USPTO */ &lt;br /&gt;
&lt;br /&gt;
 CREATE TABLE HistoricalPatentData(&lt;br /&gt;
 applicationid int,&lt;br /&gt;
 pubno varchar,&lt;br /&gt;
 patentnumber varchar,&lt;br /&gt;
 NBER int,&lt;br /&gt;
 USPC varchar,&lt;br /&gt;
 USPC_sub varchar,&lt;br /&gt;
 applicationdate date,&lt;br /&gt;
 prioritydate date,&lt;br /&gt;
 pubdate date,&lt;br /&gt;
 displaydate date,&lt;br /&gt;
 disptype varchar,&lt;br /&gt;
 exp_dt date,&lt;br /&gt;
 exp_dt_max date,&lt;br /&gt;
 pta int&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 \COPY historicalpatentdata FROM '/bulk/USPTO_Consolidated/HistoricalFiles/historical_masterfile.csv' DELIMITER AS ',' HEADER NULL AS '' CSV;&lt;br /&gt;
&lt;br /&gt;
 --COPY 11191813&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Patent_Data_Processing_-_SQL_Steps&amp;diff=4460</id>
		<title>Patent Data Processing - SQL Steps</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Patent_Data_Processing_-_SQL_Steps&amp;diff=4460"/>
		<updated>2016-07-06T17:36:31Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: /* Sample Insert and Copy Statements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Internal]]&lt;br /&gt;
[[Internal Classification::Legacy| ]]&lt;br /&gt;
&lt;br /&gt;
== Objective ==&lt;br /&gt;
The McNair Center owns two sets of patent data - one set that is inherited from Harvard, the Harvard dataverse, which is stored in the database patentdata and another that is generated by crawlers pulling data from the USPTO website, which is stored in the database '''patent_2015'''.&lt;br /&gt;
&lt;br /&gt;
We are now merging and cleaning the two data sets, and storing them in a schema that is amalgamation of the two underlying schema for the citations tables, assignees tables, and patents tables. The destination schema is '''allpatent'''.&lt;br /&gt;
&lt;br /&gt;
== Assignees Data==&lt;br /&gt;
&lt;br /&gt;
The schema for the assignees table in '''patentdata''' database is:&lt;br /&gt;
&lt;br /&gt;
    Column    |       Type        | Modifiers&lt;br /&gt;
 -------------+-------------------+-----------&lt;br /&gt;
  patent      | integer           |&lt;br /&gt;
  asgtype     | integer           |&lt;br /&gt;
  assignee    | character varying |&lt;br /&gt;
  city        | character varying |&lt;br /&gt;
  state       | character varying |&lt;br /&gt;
  country     | character varying |&lt;br /&gt;
  nationality | character varying |&lt;br /&gt;
  residence   | character varying |&lt;br /&gt;
  asgseq      | integer           |&lt;br /&gt;
&lt;br /&gt;
The schema for the assignees table in patent_2015 is :&lt;br /&gt;
&lt;br /&gt;
    Column     |  Type   | Modifiers&lt;br /&gt;
 --------------+---------+-----------&lt;br /&gt;
 lastname      | text    |&lt;br /&gt;
 firstname     | text    |&lt;br /&gt;
 orgname       | text    |&lt;br /&gt;
 city          | text    |&lt;br /&gt;
 country       | text    |&lt;br /&gt;
 patentcountry | text    |&lt;br /&gt;
 patentnumber  | integer |&lt;br /&gt;
 state         | text    |&lt;br /&gt;
 address       | text    |&lt;br /&gt;
 postcode      | text    |&lt;br /&gt;
&lt;br /&gt;
To merge both schemas, we have some columns that overlap, and some columns that don't.&lt;br /&gt;
&lt;br /&gt;
'''Overlapping Columns'''&lt;br /&gt;
&lt;br /&gt;
  patent_2015  | patentdata&lt;br /&gt;
 --------------+--------------&lt;br /&gt;
  orgname      | assignee &lt;br /&gt;
  city         | city &lt;br /&gt;
  country      | country&lt;br /&gt;
  patentnumber | patent &lt;br /&gt;
  state        | state&lt;br /&gt;
&lt;br /&gt;
These columns will have entries for most rows in the table, because they exist in both tables. The rest of the columns will be populated based on which table the row is coming from.&lt;br /&gt;
&lt;br /&gt;
'''Final Schema'''&lt;br /&gt;
&lt;br /&gt;
         Table &amp;quot;public.assignees&amp;quot;&lt;br /&gt;
     Column     |       Type        | Modifiers&lt;br /&gt;
 ---------------+-------------------+-----------&lt;br /&gt;
  lastname      | character varying |&lt;br /&gt;
  firstname     | character varying |&lt;br /&gt;
  address       | character varying |&lt;br /&gt;
  postcode      | character varying |&lt;br /&gt;
  orgname       | character varying |&lt;br /&gt;
  city          | character varying |&lt;br /&gt;
  country       | character varying |&lt;br /&gt;
  patentnumber  | integer           |&lt;br /&gt;
  state         | character varying |&lt;br /&gt;
  patentcountry | character varying |&lt;br /&gt;
  nationality2  | character varying |&lt;br /&gt;
  residence     | character varying |&lt;br /&gt;
  asgseq        | integer           |&lt;br /&gt;
  asgtype       | integer           |&lt;br /&gt;
&lt;br /&gt;
'''Non-overlapping Columns'''&lt;br /&gt;
These are the columns that belong to either one of the assignees tables, and not to both. For these cases, to help users understand where the row is coming from, the following insert rules have been followed:&lt;br /&gt;
&lt;br /&gt;
*For columns of type int, insert -1&lt;br /&gt;
*For columns of type string (character varying), the string 'null' has been inserted.&lt;br /&gt;
&lt;br /&gt;
Therefore, if a row has appropriate values for orgname, state, city ,etc, but 'null' values for lastname, firstname, address and postcode, the row has come from the patentdata table.&lt;br /&gt;
&lt;br /&gt;
==== Index ====&lt;br /&gt;
Since the table is relatively large, and is likely to be searched often, an index has been imposed on the table.&lt;br /&gt;
&lt;br /&gt;
  allpatent=# CREATE INDEX ON assignees (orgname);&lt;br /&gt;
  CREATE INDEX&lt;br /&gt;
&lt;br /&gt;
====Sample insert and copy commands ====&lt;br /&gt;
	INSERT INTO assignees_merge&lt;br /&gt;
	(&lt;br /&gt;
	SELECT&lt;br /&gt;
	'null',&lt;br /&gt;
	'null',&lt;br /&gt;
	'null',&lt;br /&gt;
	'null',&lt;br /&gt;
	a.assignee,&lt;br /&gt;
	a.city,&lt;br /&gt;
	a.country,&lt;br /&gt;
	a.patent,&lt;br /&gt;
	a.state,&lt;br /&gt;
	'null',&lt;br /&gt;
	a.nationality,&lt;br /&gt;
	a.residence,&lt;br /&gt;
	a.asgseq,&lt;br /&gt;
	a.asgtype&lt;br /&gt;
	FROM assignees a&lt;br /&gt;
	);&lt;br /&gt;
&lt;br /&gt;
	INSERT INTO assignees_merge&lt;br /&gt;
	(&lt;br /&gt;
	SELECT&lt;br /&gt;
	assignees.lastname,&lt;br /&gt;
	assignees.firstname,&lt;br /&gt;
	assignees.address,&lt;br /&gt;
	assignees.postcode,&lt;br /&gt;
	assignees.orgname,&lt;br /&gt;
	assignees.city,&lt;br /&gt;
	assignees.country,&lt;br /&gt;
	assignees.patentnumber,&lt;br /&gt;
	assignees.state,&lt;br /&gt;
	assignees.patentcountry,&lt;br /&gt;
	'null',&lt;br /&gt;
	'null',&lt;br /&gt;
	-1,&lt;br /&gt;
	-1&lt;br /&gt;
	FROM assignees&lt;br /&gt;
	);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	\COPY assignees_merge TO '/tmp/assignees_merge_export.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
	\COPY assignees FROM '/tmp/assignees_merge_export.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
	--1607724&lt;br /&gt;
&lt;br /&gt;
	\COPY assignees_merge TO '/tmp/assignees_merge_export1.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
	\COPY assignees FROM '/tmp/assignees_merge_export1.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
	--3818842&lt;br /&gt;
&lt;br /&gt;
Note : The assignees table was updated on 6/23 to remove the 'null' string and the '-1' values.&lt;br /&gt;
&lt;br /&gt;
==Patents ==&lt;br /&gt;
&lt;br /&gt;
'''Patentdata Schema:'''&lt;br /&gt;
&lt;br /&gt;
 Column  |       Type        | Modifiers&lt;br /&gt;
 --------+-------------------+-----------&lt;br /&gt;
 patent  | integer           |&lt;br /&gt;
 kind    | character varying |&lt;br /&gt;
 claims  | integer           |&lt;br /&gt;
 apptype | integer           |&lt;br /&gt;
 appnum  | integer           |&lt;br /&gt;
 gdate   | date              |&lt;br /&gt;
 gyear   | integer           |&lt;br /&gt;
 appdate | date              |&lt;br /&gt;
 appyear | integer           |&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Patent_2015 Schema:'''&lt;br /&gt;
&lt;br /&gt;
             Column             |  Type   | Modifiers&lt;br /&gt;
 -------------------------------+---------+-----------&lt;br /&gt;
  patentnumber                  | int | not null&lt;br /&gt;
  kind                          | varchar    |&lt;br /&gt;
  grantdate                     | date    |&lt;br /&gt;
  type                          | varchar    |&lt;br /&gt;
  applicationnumber             | varchar    |&lt;br /&gt;
  filingdate                    | date    |&lt;br /&gt;
  prioritydate                  | date    |&lt;br /&gt;
  prioritycountry               | varchar    |&lt;br /&gt;
  prioritypatentnumber          | varchar    |&lt;br /&gt;
  ussubclass                    | varchar    |&lt;br /&gt;
  maingroup                     | varchar    |&lt;br /&gt;
  subgroup                      | varchar    |&lt;br /&gt;
  cpcsubclass                   | varchar    |&lt;br /&gt;
  cpcmaingroup                  | varchar    |&lt;br /&gt;
  cpcsubgroup                   | varchar    |&lt;br /&gt;
  classificationnationalcountry | varchar    |&lt;br /&gt;
  classificationnationalclass   | varchar    |&lt;br /&gt;
  title                         | varchar    |&lt;br /&gt;
  numberofclaims                | int |&lt;br /&gt;
  primaryexaminerfirstname      | varchar    |&lt;br /&gt;
  primaryexaminerlastname       | varchar    |&lt;br /&gt;
  primaryexaminerdepartment     | varchar    |&lt;br /&gt;
  pctpatentnumber               | varchar    |&lt;br /&gt;
  filename                      | varchar    |&lt;br /&gt;
  &lt;br /&gt;
''' Overlapping Columns '''&lt;br /&gt;
   patent_data     patent_2015&lt;br /&gt;
  --------------+-------------&lt;br /&gt;
    patent      |  patentnumber&lt;br /&gt;
    kind        |  kind&lt;br /&gt;
    claims      |  numberofclaims&lt;br /&gt;
    apptype     |  type&lt;br /&gt;
    appnum      |  applicationnumber&lt;br /&gt;
    gdate       |  grantdate&lt;br /&gt;
    appdate     |  filingdate&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
'''Combined Schema:'''&lt;br /&gt;
&lt;br /&gt;
The final schema of the patents table is : &lt;br /&gt;
&lt;br /&gt;
           Column        |       Type        | Modifiers&lt;br /&gt;
   ----------------------+-------------------+-----------&lt;br /&gt;
    patent               | integer           | not null&lt;br /&gt;
    grantdate            | date              |&lt;br /&gt;
    prioritydate         | date              |&lt;br /&gt;
    prioritycountry      | character varying |&lt;br /&gt;
    prioritypatentnumber | character varying |&lt;br /&gt;
    cpcsubgroup          | character varying |&lt;br /&gt;
    pctpatentnumber      | character varying |&lt;br /&gt;
    claims               | integer           |&lt;br /&gt;
    appnum               | integer           |&lt;br /&gt;
    gyear                | integer           |&lt;br /&gt;
    appdate              | date              |&lt;br /&gt;
    appyear              | integer           |&lt;br /&gt;
    nber                 | integer           |&lt;br /&gt;
    uspc                 | character varying |&lt;br /&gt;
    uspc_sub             | character varying |&lt;br /&gt;
 &lt;br /&gt;
From the total list of columns belonging to both the tables (patentdata and patent_2015), a few columns, most of them related to classification of patents, have been dropped since the data in the tables was not clean.&lt;br /&gt;
&lt;br /&gt;
Additionally, three columns - nber, uspc, uspc_sub have been added from the historicalpatentdata, a table built from data downloaded from the USPTO Bulk Data Storage. The join was executed on the patent number.&lt;br /&gt;
&lt;br /&gt;
  Note : The addition, deletion of columns as through separate [[Patent Data Cleanup - June 2016 |scripts]], therefore the scripts below will be slightly discrepant.&lt;br /&gt;
        &lt;br /&gt;
==== Index and Key Creation ====&lt;br /&gt;
Patent numbers are distinct in this table, and are central to the rest of the fields in the table. A primary key can therefore be imposed on the column. Also, since a number of searches are likely to be conducted on this table, an index has been imposed as well.&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
  ALTER TABLE patents ADD PRIMARY KEY (patentnumber);&lt;br /&gt;
  -- RESULT : ALTER TABLE&lt;br /&gt;
  allpatent=# CREATE UNIQUE INDEX patent_idx ON patents (patentnumber);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Sample Insert and Copy Statements====&lt;br /&gt;
    patentdata:&lt;br /&gt;
    INSERT INTO patents_merged&lt;br /&gt;
    (&lt;br /&gt;
    		 SELECT	&lt;br /&gt;
    		  patent, &lt;br /&gt;
	          kind, &lt;br /&gt;
	          gdate, &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	          NULL, &lt;br /&gt;
	          NULL, &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         -1, &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         claims, &lt;br /&gt;
	         apptype, &lt;br /&gt;
	         appnum, &lt;br /&gt;
	         gyear, &lt;br /&gt;
	         appdate, &lt;br /&gt;
        	 appyear &lt;br /&gt;
        	 FROM patents &lt;br /&gt;
    ); &lt;br /&gt;
    -- RESULT : INSERT 0 3984771 &lt;br /&gt;
    &lt;br /&gt;
    patent_2015:&lt;br /&gt;
    INSERT INTO patents_merged&lt;br /&gt;
    (&lt;br /&gt;
    	SELECT&lt;br /&gt;
    		patentnumber, &lt;br /&gt;
		kind, &lt;br /&gt;
		grantdate,&lt;br /&gt;
		type,&lt;br /&gt;
		applicationnumber,&lt;br /&gt;
		filingdate,&lt;br /&gt;
		prioritydate,&lt;br /&gt;
		prioritycountry,&lt;br /&gt;
		prioritypatentnumber,&lt;br /&gt;
		ussubclass,&lt;br /&gt;
		maingroup,&lt;br /&gt;
		subgroup,&lt;br /&gt;
		cpcsubclass,&lt;br /&gt;
		cpcmaingroup,&lt;br /&gt;
		cpcsubgroup,&lt;br /&gt;
		classificationnationalcountry,&lt;br /&gt;
		classificationnationalclass,&lt;br /&gt;
		title,&lt;br /&gt;
		numberofclaims,&lt;br /&gt;
		primaryexaminerfirstname,&lt;br /&gt;
		primaryexaminerlastname,&lt;br /&gt;
		primaryexaminerdepartment,&lt;br /&gt;
		pctpatentnumber,&lt;br /&gt;
		filename,&lt;br /&gt;
		-1,&lt;br /&gt;
		-1,&lt;br /&gt;
		-1,&lt;br /&gt;
		-1,&lt;br /&gt;
		NULL,&lt;br /&gt;
        	-1&lt;br /&gt;
    	FROM patents&lt;br /&gt;
    );&lt;br /&gt;
    -- RESULT : INSERT 0 1646225&lt;br /&gt;
    &lt;br /&gt;
COPY SCRIPTS:&lt;br /&gt;
patentdata:&lt;br /&gt;
  \COPY patents_merged TO '/tmp/merged_patents_export1.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  --COPY 3984771&lt;br /&gt;
&lt;br /&gt;
patent_2015:&lt;br /&gt;
  \COPY patents_merged TO '/tmp/merged_patents_export.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  --COPY 1646225&lt;br /&gt;
&lt;br /&gt;
PATENTS TABLE&lt;br /&gt;
  \COPY patents FROM '/tmp/merged_patents_export1.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  -- RESULT : COPY 3984771&lt;br /&gt;
  \COPY patents FROM '/tmp/merged_patents_export.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  -- RESULT : COPY 1646225&lt;br /&gt;
&lt;br /&gt;
====TESTING ====&lt;br /&gt;
  select count(*) FROM (SELECT DISTINCT patentnumber FROM patents) AS t;&lt;br /&gt;
  --RESULT:  5411151&lt;br /&gt;
   EXPECTED: 5426566&lt;br /&gt;
&lt;br /&gt;
We found some copies of a few rows, where both the patent_2015 and patentdata &lt;br /&gt;
&lt;br /&gt;
  SELECT COUNT(*), *&lt;br /&gt;
  FROM patents&lt;br /&gt;
  GROUP BY&lt;br /&gt;
  	patentnumber, &lt;br /&gt;
	kind, &lt;br /&gt;
	grantdate,&lt;br /&gt;
	type,&lt;br /&gt;
	applicationnumber,&lt;br /&gt;
	filingdate,&lt;br /&gt;
	prioritydate,&lt;br /&gt;
	prioritycountry,&lt;br /&gt;
	prioritypatentnumber,&lt;br /&gt;
	ussubclass,&lt;br /&gt;
	maingroup,&lt;br /&gt;
	subgroup,&lt;br /&gt;
	cpcsubclass,&lt;br /&gt;
	cpcmaingroup,&lt;br /&gt;
	cpcsubgroup,&lt;br /&gt;
	classificationnationalcountry,&lt;br /&gt;
	classificationnationalclass,&lt;br /&gt;
	title,&lt;br /&gt;
	numberofclaims,&lt;br /&gt;
	primaryexaminerfirstname,&lt;br /&gt;
	primaryexaminerlastname,&lt;br /&gt;
	primaryexaminerdepartment,&lt;br /&gt;
	pctpatentnumber,&lt;br /&gt;
	filename,&lt;br /&gt;
	claims,&lt;br /&gt;
	apptype,&lt;br /&gt;
	appnum,&lt;br /&gt;
	gyear,&lt;br /&gt;
	appdate,&lt;br /&gt;
	appyear&lt;br /&gt;
  HAVING COUNT(*) &amp;gt; 1;&lt;br /&gt;
&lt;br /&gt;
  SELECT patentnumber, count(*)&lt;br /&gt;
  FROM patents&lt;br /&gt;
  GROUP BY patentnumber&lt;br /&gt;
  HAVING count(*)&amp;gt;1;&lt;br /&gt;
  --7640598 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  SELECT * &lt;br /&gt;
  FROM patents op&lt;br /&gt;
  WHERE op.patentnumber IN&lt;br /&gt;
	(&lt;br /&gt;
	SELECT ip.patentnumber &lt;br /&gt;
	FROM patents ip&lt;br /&gt;
	GROUP BY ip.patentnumber&lt;br /&gt;
	HAVING COUNT(*)&amp;gt;1&lt;br /&gt;
	)&lt;br /&gt;
  ORDER BY op.patentnumber;&lt;br /&gt;
&lt;br /&gt;
  (&lt;br /&gt;
  SELECT * &lt;br /&gt;
  INTO patentsCleaned&lt;br /&gt;
  FROM patents op&lt;br /&gt;
  WHERE op.patentnumber IN&lt;br /&gt;
	(&lt;br /&gt;
	SELECT ip.patentnumber &lt;br /&gt;
	FROM patents ip&lt;br /&gt;
	GROUP BY ip.patentnumber&lt;br /&gt;
	HAVING COUNT(*)=1&lt;br /&gt;
	)&lt;br /&gt;
  ORDER BY op.patentnumber&lt;br /&gt;
  )&lt;br /&gt;
  --SELECT 5191306&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  INSERT INTO patentsCleaned(&lt;br /&gt;
  SELECT * &lt;br /&gt;
  FROM patents op&lt;br /&gt;
  WHERE op.patentnumber IN&lt;br /&gt;
	(&lt;br /&gt;
	SELECT ip.patentnumber &lt;br /&gt;
	FROM patents ip&lt;br /&gt;
	GROUP BY ip.patentnumber&lt;br /&gt;
	HAVING COUNT(*)&amp;gt;1&lt;br /&gt;
	)&lt;br /&gt;
  AND op.applicationnumber NOT LIKE 'NULL'&lt;br /&gt;
  ORDER BY op.patentnumber&lt;br /&gt;
  );&lt;br /&gt;
&lt;br /&gt;
  --219845&lt;br /&gt;
&lt;br /&gt;
====TESTING:====&lt;br /&gt;
  allpatent=# select count(*) from patentsCleaned;&lt;br /&gt;
    count&lt;br /&gt;
  ---------&lt;br /&gt;
   5411151&lt;br /&gt;
  (1 row)&lt;br /&gt;
&lt;br /&gt;
  allpatent=# select count(*), patentnumber FROM patentsCleaned group by patentnumber having count(*) &amp;gt; 1;&lt;br /&gt;
   count | patentnumber&lt;br /&gt;
  -------+--------------&lt;br /&gt;
  (0 rows)&lt;br /&gt;
&lt;br /&gt;
== Citations==&lt;br /&gt;
&lt;br /&gt;
In the citations table, we needed to define another function that would convert a textual patent number into a number (big int, since the patents number were exceeding the range of regular integers.)&lt;br /&gt;
&lt;br /&gt;
To Extract Patents with Numbers Only and to Ignore Other RegExes&lt;br /&gt;
  CREATE OR REPLACE FUNCTION cleanpatno (text) RETURNS bigint AS $$&lt;br /&gt;
	if ($_[0]) {&lt;br /&gt;
		my $var=$_[0];&lt;br /&gt;
		if ($var=~/^\d*$/) {return $var;}&lt;br /&gt;
		return undef;&lt;br /&gt;
	}&lt;br /&gt;
	return undef;&lt;br /&gt;
	$$ LANGUAGE plperl;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''patentdata schema:'''&lt;br /&gt;
&lt;br /&gt;
    Column    |       Type        | Modifiers&lt;br /&gt;
  ------------+-------------------+-----------&lt;br /&gt;
   patent     | integer           | &lt;br /&gt;
  cit_date    | date              |&lt;br /&gt;
  cit_name    | character varying |&lt;br /&gt;
  cit_kind    | character varying |&lt;br /&gt;
  cit_country | character varying |&lt;br /&gt;
  citation    | integer           |&lt;br /&gt;
  category    | character varying |&lt;br /&gt;
  citseq      | integer           | &lt;br /&gt;
&lt;br /&gt;
  SELECT patent as citingpatentnumber, citation AS citedpatentnumber&lt;br /&gt;
  INTO citations_merged&lt;br /&gt;
  FROM citations;&lt;br /&gt;
  --SELECT 38452957&lt;br /&gt;
&lt;br /&gt;
'''patent_2015 schema:'''&lt;br /&gt;
         Column        |  Type   | Modifiers&lt;br /&gt;
  ---------------------+---------+-----------&lt;br /&gt;
   citingpatentnumber  | integer |&lt;br /&gt;
   citingpatentcountry | text    |&lt;br /&gt;
   citedpatentnumber   | text    |&lt;br /&gt;
   citedpatentcountry  | text    |&lt;br /&gt;
&lt;br /&gt;
  SELECT CAST(citingpatentnumber AS bigint), CAST(cleanpatno( citedpatentnumber) AS bigint) as citedpatentnumber&lt;br /&gt;
  INTO citations_merged&lt;br /&gt;
  FROM citations;&lt;br /&gt;
  -- RESULT : SELECT 59227881&lt;br /&gt;
&lt;br /&gt;
'''Overlapping Columns'''&lt;br /&gt;
&lt;br /&gt;
       patent_2015     |  patentdata   |&lt;br /&gt;
  ---------------------+---------------+&lt;br /&gt;
   citingpatentnumber  | patent        |&lt;br /&gt;
   citedpatentnumber   | citation      |&lt;br /&gt;
  &lt;br /&gt;
''' Combined Schema:'''&lt;br /&gt;
&lt;br /&gt;
       Column       |  Type  | Modifiers&lt;br /&gt;
--------------------+--------+-----------&lt;br /&gt;
 citingpatentnumber | bigint |&lt;br /&gt;
 citedpatentnumber  | bigint |&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy Statements:&lt;br /&gt;
&lt;br /&gt;
patentdata:&lt;br /&gt;
  \COPY citations_merged TO '/tmp/merged_citations_export1.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  --COPY 38452957&lt;br /&gt;
&lt;br /&gt;
patent_2015:&lt;br /&gt;
  \COPY citations_merged TO '/tmp/merged_citations_export.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  -- RESULT : COPY 59227881&lt;br /&gt;
&lt;br /&gt;
allpatent:&lt;br /&gt;
  \COPY citations FROM '/tmp/merged_citations_export.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  --RESULT : COPY 59227881&lt;br /&gt;
&lt;br /&gt;
  \COPY citations FROM '/tmp/merged_citations_export1.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  --RESULT: COPY 38452957&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CLONING:&lt;br /&gt;
CREATE DATABASE allpatentsProcessed WITH TEMPLATE allpatent OWNER researcher;&lt;br /&gt;
&lt;br /&gt;
== USPTO Consolidated Patent Data ==&lt;br /&gt;
&lt;br /&gt;
Scripts:&lt;br /&gt;
&lt;br /&gt;
/* creating patent data tables from : https://bulkdata.uspto.gov/data2/patent/maintenancefee/*/&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE PatentMaintenanceFee(&lt;br /&gt;
patentnumber varchar,&lt;br /&gt;
applicationnumber int,&lt;br /&gt;
smallentity varchar,&lt;br /&gt;
filingdate date,&lt;br /&gt;
grantissuedate date,&lt;br /&gt;
maintenancefeedate date,&lt;br /&gt;
maintenancefeecode varchar&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
\COPY PatentMaintenanceFee FROM '/bulk/USPTO_Consolidated/MaintFeeEvents_20160613.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
-- RESULT : COPY 14042059&lt;br /&gt;
&lt;br /&gt;
/* creating tables for historical patent data - USPTO */&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE HistoricalPatentData(&lt;br /&gt;
applicationid int,&lt;br /&gt;
pubno varchar,&lt;br /&gt;
patentnumber varchar,&lt;br /&gt;
NBER int,&lt;br /&gt;
USPC varchar,&lt;br /&gt;
USPC_sub varchar,&lt;br /&gt;
applicationdate date,&lt;br /&gt;
prioritydate date,&lt;br /&gt;
pubdate date,&lt;br /&gt;
displaydate date,&lt;br /&gt;
disptype varchar,&lt;br /&gt;
exp_dt date,&lt;br /&gt;
exp_dt_max date,&lt;br /&gt;
pta int&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
\COPY historicalpatentdata FROM '/bulk/USPTO_Consolidated/HistoricalFiles/historical_masterfile.csv' DELIMITER AS ',' HEADER NULL AS '' CSV;&lt;br /&gt;
&lt;br /&gt;
--COPY 11191813&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Patent_Data_Processing_-_SQL_Steps&amp;diff=4459</id>
		<title>Patent Data Processing - SQL Steps</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Patent_Data_Processing_-_SQL_Steps&amp;diff=4459"/>
		<updated>2016-07-06T17:35:34Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: /* Sample Insert and Copy Statements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Internal]]&lt;br /&gt;
[[Internal Classification::Legacy| ]]&lt;br /&gt;
&lt;br /&gt;
== Objective ==&lt;br /&gt;
The McNair Center owns two sets of patent data - one set that is inherited from Harvard, the Harvard dataverse, which is stored in the database patentdata and another that is generated by crawlers pulling data from the USPTO website, which is stored in the database '''patent_2015'''.&lt;br /&gt;
&lt;br /&gt;
We are now merging and cleaning the two data sets, and storing them in a schema that is amalgamation of the two underlying schema for the citations tables, assignees tables, and patents tables. The destination schema is '''allpatent'''.&lt;br /&gt;
&lt;br /&gt;
== Assignees Data==&lt;br /&gt;
&lt;br /&gt;
The schema for the assignees table in '''patentdata''' database is:&lt;br /&gt;
&lt;br /&gt;
    Column    |       Type        | Modifiers&lt;br /&gt;
 -------------+-------------------+-----------&lt;br /&gt;
  patent      | integer           |&lt;br /&gt;
  asgtype     | integer           |&lt;br /&gt;
  assignee    | character varying |&lt;br /&gt;
  city        | character varying |&lt;br /&gt;
  state       | character varying |&lt;br /&gt;
  country     | character varying |&lt;br /&gt;
  nationality | character varying |&lt;br /&gt;
  residence   | character varying |&lt;br /&gt;
  asgseq      | integer           |&lt;br /&gt;
&lt;br /&gt;
The schema for the assignees table in patent_2015 is :&lt;br /&gt;
&lt;br /&gt;
    Column     |  Type   | Modifiers&lt;br /&gt;
 --------------+---------+-----------&lt;br /&gt;
 lastname      | text    |&lt;br /&gt;
 firstname     | text    |&lt;br /&gt;
 orgname       | text    |&lt;br /&gt;
 city          | text    |&lt;br /&gt;
 country       | text    |&lt;br /&gt;
 patentcountry | text    |&lt;br /&gt;
 patentnumber  | integer |&lt;br /&gt;
 state         | text    |&lt;br /&gt;
 address       | text    |&lt;br /&gt;
 postcode      | text    |&lt;br /&gt;
&lt;br /&gt;
To merge both schemas, we have some columns that overlap, and some columns that don't.&lt;br /&gt;
&lt;br /&gt;
'''Overlapping Columns'''&lt;br /&gt;
&lt;br /&gt;
  patent_2015  | patentdata&lt;br /&gt;
 --------------+--------------&lt;br /&gt;
  orgname      | assignee &lt;br /&gt;
  city         | city &lt;br /&gt;
  country      | country&lt;br /&gt;
  patentnumber | patent &lt;br /&gt;
  state        | state&lt;br /&gt;
&lt;br /&gt;
These columns will have entries for most rows in the table, because they exist in both tables. The rest of the columns will be populated based on which table the row is coming from.&lt;br /&gt;
&lt;br /&gt;
'''Final Schema'''&lt;br /&gt;
&lt;br /&gt;
         Table &amp;quot;public.assignees&amp;quot;&lt;br /&gt;
     Column     |       Type        | Modifiers&lt;br /&gt;
 ---------------+-------------------+-----------&lt;br /&gt;
  lastname      | character varying |&lt;br /&gt;
  firstname     | character varying |&lt;br /&gt;
  address       | character varying |&lt;br /&gt;
  postcode      | character varying |&lt;br /&gt;
  orgname       | character varying |&lt;br /&gt;
  city          | character varying |&lt;br /&gt;
  country       | character varying |&lt;br /&gt;
  patentnumber  | integer           |&lt;br /&gt;
  state         | character varying |&lt;br /&gt;
  patentcountry | character varying |&lt;br /&gt;
  nationality2  | character varying |&lt;br /&gt;
  residence     | character varying |&lt;br /&gt;
  asgseq        | integer           |&lt;br /&gt;
  asgtype       | integer           |&lt;br /&gt;
&lt;br /&gt;
'''Non-overlapping Columns'''&lt;br /&gt;
These are the columns that belong to either one of the assignees tables, and not to both. For these cases, to help users understand where the row is coming from, the following insert rules have been followed:&lt;br /&gt;
&lt;br /&gt;
*For columns of type int, insert -1&lt;br /&gt;
*For columns of type string (character varying), the string 'null' has been inserted.&lt;br /&gt;
&lt;br /&gt;
Therefore, if a row has appropriate values for orgname, state, city ,etc, but 'null' values for lastname, firstname, address and postcode, the row has come from the patentdata table.&lt;br /&gt;
&lt;br /&gt;
==== Index ====&lt;br /&gt;
Since the table is relatively large, and is likely to be searched often, an index has been imposed on the table.&lt;br /&gt;
&lt;br /&gt;
  allpatent=# CREATE INDEX ON assignees (orgname);&lt;br /&gt;
  CREATE INDEX&lt;br /&gt;
&lt;br /&gt;
====Sample insert and copy commands ====&lt;br /&gt;
	INSERT INTO assignees_merge&lt;br /&gt;
	(&lt;br /&gt;
	SELECT&lt;br /&gt;
	'null',&lt;br /&gt;
	'null',&lt;br /&gt;
	'null',&lt;br /&gt;
	'null',&lt;br /&gt;
	a.assignee,&lt;br /&gt;
	a.city,&lt;br /&gt;
	a.country,&lt;br /&gt;
	a.patent,&lt;br /&gt;
	a.state,&lt;br /&gt;
	'null',&lt;br /&gt;
	a.nationality,&lt;br /&gt;
	a.residence,&lt;br /&gt;
	a.asgseq,&lt;br /&gt;
	a.asgtype&lt;br /&gt;
	FROM assignees a&lt;br /&gt;
	);&lt;br /&gt;
&lt;br /&gt;
	INSERT INTO assignees_merge&lt;br /&gt;
	(&lt;br /&gt;
	SELECT&lt;br /&gt;
	assignees.lastname,&lt;br /&gt;
	assignees.firstname,&lt;br /&gt;
	assignees.address,&lt;br /&gt;
	assignees.postcode,&lt;br /&gt;
	assignees.orgname,&lt;br /&gt;
	assignees.city,&lt;br /&gt;
	assignees.country,&lt;br /&gt;
	assignees.patentnumber,&lt;br /&gt;
	assignees.state,&lt;br /&gt;
	assignees.patentcountry,&lt;br /&gt;
	'null',&lt;br /&gt;
	'null',&lt;br /&gt;
	-1,&lt;br /&gt;
	-1&lt;br /&gt;
	FROM assignees&lt;br /&gt;
	);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	\COPY assignees_merge TO '/tmp/assignees_merge_export.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
	\COPY assignees FROM '/tmp/assignees_merge_export.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
	--1607724&lt;br /&gt;
&lt;br /&gt;
	\COPY assignees_merge TO '/tmp/assignees_merge_export1.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
	\COPY assignees FROM '/tmp/assignees_merge_export1.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
	--3818842&lt;br /&gt;
&lt;br /&gt;
Note : The assignees table was updated on 6/23 to remove the 'null' string and the '-1' values.&lt;br /&gt;
&lt;br /&gt;
==Patents ==&lt;br /&gt;
&lt;br /&gt;
'''Patentdata Schema:'''&lt;br /&gt;
&lt;br /&gt;
 Column  |       Type        | Modifiers&lt;br /&gt;
 --------+-------------------+-----------&lt;br /&gt;
 patent  | integer           |&lt;br /&gt;
 kind    | character varying |&lt;br /&gt;
 claims  | integer           |&lt;br /&gt;
 apptype | integer           |&lt;br /&gt;
 appnum  | integer           |&lt;br /&gt;
 gdate   | date              |&lt;br /&gt;
 gyear   | integer           |&lt;br /&gt;
 appdate | date              |&lt;br /&gt;
 appyear | integer           |&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Patent_2015 Schema:'''&lt;br /&gt;
&lt;br /&gt;
             Column             |  Type   | Modifiers&lt;br /&gt;
 -------------------------------+---------+-----------&lt;br /&gt;
  patentnumber                  | int | not null&lt;br /&gt;
  kind                          | varchar    |&lt;br /&gt;
  grantdate                     | date    |&lt;br /&gt;
  type                          | varchar    |&lt;br /&gt;
  applicationnumber             | varchar    |&lt;br /&gt;
  filingdate                    | date    |&lt;br /&gt;
  prioritydate                  | date    |&lt;br /&gt;
  prioritycountry               | varchar    |&lt;br /&gt;
  prioritypatentnumber          | varchar    |&lt;br /&gt;
  ussubclass                    | varchar    |&lt;br /&gt;
  maingroup                     | varchar    |&lt;br /&gt;
  subgroup                      | varchar    |&lt;br /&gt;
  cpcsubclass                   | varchar    |&lt;br /&gt;
  cpcmaingroup                  | varchar    |&lt;br /&gt;
  cpcsubgroup                   | varchar    |&lt;br /&gt;
  classificationnationalcountry | varchar    |&lt;br /&gt;
  classificationnationalclass   | varchar    |&lt;br /&gt;
  title                         | varchar    |&lt;br /&gt;
  numberofclaims                | int |&lt;br /&gt;
  primaryexaminerfirstname      | varchar    |&lt;br /&gt;
  primaryexaminerlastname       | varchar    |&lt;br /&gt;
  primaryexaminerdepartment     | varchar    |&lt;br /&gt;
  pctpatentnumber               | varchar    |&lt;br /&gt;
  filename                      | varchar    |&lt;br /&gt;
  &lt;br /&gt;
''' Overlapping Columns '''&lt;br /&gt;
   patent_data     patent_2015&lt;br /&gt;
  --------------+-------------&lt;br /&gt;
    patent      |  patentnumber&lt;br /&gt;
    kind        |  kind&lt;br /&gt;
    claims      |  numberofclaims&lt;br /&gt;
    apptype     |  type&lt;br /&gt;
    appnum      |  applicationnumber&lt;br /&gt;
    gdate       |  grantdate&lt;br /&gt;
    appdate     |  filingdate&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
'''Combined Schema:'''&lt;br /&gt;
&lt;br /&gt;
The final schema of the patents table is : &lt;br /&gt;
&lt;br /&gt;
           Column        |       Type        | Modifiers&lt;br /&gt;
   ----------------------+-------------------+-----------&lt;br /&gt;
    patent               | integer           | not null&lt;br /&gt;
    grantdate            | date              |&lt;br /&gt;
    prioritydate         | date              |&lt;br /&gt;
    prioritycountry      | character varying |&lt;br /&gt;
    prioritypatentnumber | character varying |&lt;br /&gt;
    cpcsubgroup          | character varying |&lt;br /&gt;
    pctpatentnumber      | character varying |&lt;br /&gt;
    claims               | integer           |&lt;br /&gt;
    appnum               | integer           |&lt;br /&gt;
    gyear                | integer           |&lt;br /&gt;
    appdate              | date              |&lt;br /&gt;
    appyear              | integer           |&lt;br /&gt;
    nber                 | integer           |&lt;br /&gt;
    uspc                 | character varying |&lt;br /&gt;
    uspc_sub             | character varying |&lt;br /&gt;
 &lt;br /&gt;
From the total list of columns belonging to both the tables (patentdata and patent_2015), a few columns, most of them related to classification of patents, have been dropped since the data in the tables was not clean.&lt;br /&gt;
&lt;br /&gt;
Additionally, three columns - nber, uspc, uspc_sub have been added from the historicalpatentdata, a table built from data downloaded from the USPTO Bulk Data Storage. The join was executed on the patent number.&lt;br /&gt;
&lt;br /&gt;
  Note : The addition, deletion of columns as through separate [[Patent Data Cleanup - June 2016 |scripts]], therefore the scripts below will be slightly discrepant.&lt;br /&gt;
        &lt;br /&gt;
==== Index and Key Creation ====&lt;br /&gt;
Patent numbers are distinct in this table, and are central to the rest of the fields in the table. A primary key can therefore be imposed on the column. Also, since a number of searches are likely to be conducted on this table, an index has been imposed as well.&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
  ALTER TABLE patents ADD PRIMARY KEY (patentnumber);&lt;br /&gt;
  -- RESULT : ALTER TABLE&lt;br /&gt;
  allpatent=# CREATE UNIQUE INDEX patent_idx ON patents (patentnumber);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Sample Insert and Copy Statements====&lt;br /&gt;
    patentdata:&lt;br /&gt;
    INSERT INTO patents_merged&lt;br /&gt;
    (&lt;br /&gt;
    		SELECT	&lt;br /&gt;
    		 patent, &lt;br /&gt;
	         kind, &lt;br /&gt;
	         gdate, &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	          NULL, &lt;br /&gt;
	          NULL, &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         -1, &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         'NULL', &lt;br /&gt;
	         claims, &lt;br /&gt;
	         apptype, &lt;br /&gt;
	         appnum, &lt;br /&gt;
	         gyear, &lt;br /&gt;
	         appdate, &lt;br /&gt;
        	 appyear &lt;br /&gt;
        	 FROM patents &lt;br /&gt;
    ); &lt;br /&gt;
    -- RESULT : INSERT 0 3984771 &lt;br /&gt;
    &lt;br /&gt;
    patent_2015:&lt;br /&gt;
    INSERT INTO patents_merged&lt;br /&gt;
    (&lt;br /&gt;
    	SELECT&lt;br /&gt;
    		patentnumber, &lt;br /&gt;
		kind, &lt;br /&gt;
		grantdate,&lt;br /&gt;
		type,&lt;br /&gt;
		applicationnumber,&lt;br /&gt;
		filingdate,&lt;br /&gt;
		prioritydate,&lt;br /&gt;
		prioritycountry,&lt;br /&gt;
		prioritypatentnumber,&lt;br /&gt;
		ussubclass,&lt;br /&gt;
		maingroup,&lt;br /&gt;
		subgroup,&lt;br /&gt;
		cpcsubclass,&lt;br /&gt;
		cpcmaingroup,&lt;br /&gt;
		cpcsubgroup,&lt;br /&gt;
		classificationnationalcountry,&lt;br /&gt;
		classificationnationalclass,&lt;br /&gt;
		title,&lt;br /&gt;
		numberofclaims,&lt;br /&gt;
		primaryexaminerfirstname,&lt;br /&gt;
		primaryexaminerlastname,&lt;br /&gt;
		primaryexaminerdepartment,&lt;br /&gt;
		pctpatentnumber,&lt;br /&gt;
		filename,&lt;br /&gt;
		-1,&lt;br /&gt;
		-1,&lt;br /&gt;
		-1,&lt;br /&gt;
		-1,&lt;br /&gt;
		NULL,&lt;br /&gt;
        	-1&lt;br /&gt;
    	FROM patents&lt;br /&gt;
    );&lt;br /&gt;
    -- RESULT : INSERT 0 1646225&lt;br /&gt;
    &lt;br /&gt;
COPY SCRIPTS:&lt;br /&gt;
patentdata:&lt;br /&gt;
  \COPY patents_merged TO '/tmp/merged_patents_export1.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  --COPY 3984771&lt;br /&gt;
&lt;br /&gt;
patent_2015:&lt;br /&gt;
  \COPY patents_merged TO '/tmp/merged_patents_export.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  --COPY 1646225&lt;br /&gt;
&lt;br /&gt;
PATENTS TABLE&lt;br /&gt;
  \COPY patents FROM '/tmp/merged_patents_export1.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  -- RESULT : COPY 3984771&lt;br /&gt;
  \COPY patents FROM '/tmp/merged_patents_export.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  -- RESULT : COPY 1646225&lt;br /&gt;
&lt;br /&gt;
====TESTING ====&lt;br /&gt;
  select count(*) FROM (SELECT DISTINCT patentnumber FROM patents) AS t;&lt;br /&gt;
  --RESULT:  5411151&lt;br /&gt;
   EXPECTED: 5426566&lt;br /&gt;
&lt;br /&gt;
We found some copies of a few rows, where both the patent_2015 and patentdata &lt;br /&gt;
&lt;br /&gt;
  SELECT COUNT(*), *&lt;br /&gt;
  FROM patents&lt;br /&gt;
  GROUP BY&lt;br /&gt;
  	patentnumber, &lt;br /&gt;
	kind, &lt;br /&gt;
	grantdate,&lt;br /&gt;
	type,&lt;br /&gt;
	applicationnumber,&lt;br /&gt;
	filingdate,&lt;br /&gt;
	prioritydate,&lt;br /&gt;
	prioritycountry,&lt;br /&gt;
	prioritypatentnumber,&lt;br /&gt;
	ussubclass,&lt;br /&gt;
	maingroup,&lt;br /&gt;
	subgroup,&lt;br /&gt;
	cpcsubclass,&lt;br /&gt;
	cpcmaingroup,&lt;br /&gt;
	cpcsubgroup,&lt;br /&gt;
	classificationnationalcountry,&lt;br /&gt;
	classificationnationalclass,&lt;br /&gt;
	title,&lt;br /&gt;
	numberofclaims,&lt;br /&gt;
	primaryexaminerfirstname,&lt;br /&gt;
	primaryexaminerlastname,&lt;br /&gt;
	primaryexaminerdepartment,&lt;br /&gt;
	pctpatentnumber,&lt;br /&gt;
	filename,&lt;br /&gt;
	claims,&lt;br /&gt;
	apptype,&lt;br /&gt;
	appnum,&lt;br /&gt;
	gyear,&lt;br /&gt;
	appdate,&lt;br /&gt;
	appyear&lt;br /&gt;
  HAVING COUNT(*) &amp;gt; 1;&lt;br /&gt;
&lt;br /&gt;
  SELECT patentnumber, count(*)&lt;br /&gt;
  FROM patents&lt;br /&gt;
  GROUP BY patentnumber&lt;br /&gt;
  HAVING count(*)&amp;gt;1;&lt;br /&gt;
  --7640598 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  SELECT * &lt;br /&gt;
  FROM patents op&lt;br /&gt;
  WHERE op.patentnumber IN&lt;br /&gt;
	(&lt;br /&gt;
	SELECT ip.patentnumber &lt;br /&gt;
	FROM patents ip&lt;br /&gt;
	GROUP BY ip.patentnumber&lt;br /&gt;
	HAVING COUNT(*)&amp;gt;1&lt;br /&gt;
	)&lt;br /&gt;
  ORDER BY op.patentnumber;&lt;br /&gt;
&lt;br /&gt;
  (&lt;br /&gt;
  SELECT * &lt;br /&gt;
  INTO patentsCleaned&lt;br /&gt;
  FROM patents op&lt;br /&gt;
  WHERE op.patentnumber IN&lt;br /&gt;
	(&lt;br /&gt;
	SELECT ip.patentnumber &lt;br /&gt;
	FROM patents ip&lt;br /&gt;
	GROUP BY ip.patentnumber&lt;br /&gt;
	HAVING COUNT(*)=1&lt;br /&gt;
	)&lt;br /&gt;
  ORDER BY op.patentnumber&lt;br /&gt;
  )&lt;br /&gt;
  --SELECT 5191306&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  INSERT INTO patentsCleaned(&lt;br /&gt;
  SELECT * &lt;br /&gt;
  FROM patents op&lt;br /&gt;
  WHERE op.patentnumber IN&lt;br /&gt;
	(&lt;br /&gt;
	SELECT ip.patentnumber &lt;br /&gt;
	FROM patents ip&lt;br /&gt;
	GROUP BY ip.patentnumber&lt;br /&gt;
	HAVING COUNT(*)&amp;gt;1&lt;br /&gt;
	)&lt;br /&gt;
  AND op.applicationnumber NOT LIKE 'NULL'&lt;br /&gt;
  ORDER BY op.patentnumber&lt;br /&gt;
  );&lt;br /&gt;
&lt;br /&gt;
  --219845&lt;br /&gt;
&lt;br /&gt;
====TESTING:====&lt;br /&gt;
  allpatent=# select count(*) from patentsCleaned;&lt;br /&gt;
    count&lt;br /&gt;
  ---------&lt;br /&gt;
   5411151&lt;br /&gt;
  (1 row)&lt;br /&gt;
&lt;br /&gt;
  allpatent=# select count(*), patentnumber FROM patentsCleaned group by patentnumber having count(*) &amp;gt; 1;&lt;br /&gt;
   count | patentnumber&lt;br /&gt;
  -------+--------------&lt;br /&gt;
  (0 rows)&lt;br /&gt;
&lt;br /&gt;
== Citations==&lt;br /&gt;
&lt;br /&gt;
In the citations table, we needed to define another function that would convert a textual patent number into a number (big int, since the patents number were exceeding the range of regular integers.)&lt;br /&gt;
&lt;br /&gt;
To Extract Patents with Numbers Only and to Ignore Other RegExes&lt;br /&gt;
  CREATE OR REPLACE FUNCTION cleanpatno (text) RETURNS bigint AS $$&lt;br /&gt;
	if ($_[0]) {&lt;br /&gt;
		my $var=$_[0];&lt;br /&gt;
		if ($var=~/^\d*$/) {return $var;}&lt;br /&gt;
		return undef;&lt;br /&gt;
	}&lt;br /&gt;
	return undef;&lt;br /&gt;
	$$ LANGUAGE plperl;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''patentdata schema:'''&lt;br /&gt;
&lt;br /&gt;
    Column    |       Type        | Modifiers&lt;br /&gt;
  ------------+-------------------+-----------&lt;br /&gt;
   patent     | integer           | &lt;br /&gt;
  cit_date    | date              |&lt;br /&gt;
  cit_name    | character varying |&lt;br /&gt;
  cit_kind    | character varying |&lt;br /&gt;
  cit_country | character varying |&lt;br /&gt;
  citation    | integer           |&lt;br /&gt;
  category    | character varying |&lt;br /&gt;
  citseq      | integer           | &lt;br /&gt;
&lt;br /&gt;
  SELECT patent as citingpatentnumber, citation AS citedpatentnumber&lt;br /&gt;
  INTO citations_merged&lt;br /&gt;
  FROM citations;&lt;br /&gt;
  --SELECT 38452957&lt;br /&gt;
&lt;br /&gt;
'''patent_2015 schema:'''&lt;br /&gt;
         Column        |  Type   | Modifiers&lt;br /&gt;
  ---------------------+---------+-----------&lt;br /&gt;
   citingpatentnumber  | integer |&lt;br /&gt;
   citingpatentcountry | text    |&lt;br /&gt;
   citedpatentnumber   | text    |&lt;br /&gt;
   citedpatentcountry  | text    |&lt;br /&gt;
&lt;br /&gt;
  SELECT CAST(citingpatentnumber AS bigint), CAST(cleanpatno( citedpatentnumber) AS bigint) as citedpatentnumber&lt;br /&gt;
  INTO citations_merged&lt;br /&gt;
  FROM citations;&lt;br /&gt;
  -- RESULT : SELECT 59227881&lt;br /&gt;
&lt;br /&gt;
'''Overlapping Columns'''&lt;br /&gt;
&lt;br /&gt;
       patent_2015     |  patentdata   |&lt;br /&gt;
  ---------------------+---------------+&lt;br /&gt;
   citingpatentnumber  | patent        |&lt;br /&gt;
   citedpatentnumber   | citation      |&lt;br /&gt;
  &lt;br /&gt;
''' Combined Schema:'''&lt;br /&gt;
&lt;br /&gt;
       Column       |  Type  | Modifiers&lt;br /&gt;
--------------------+--------+-----------&lt;br /&gt;
 citingpatentnumber | bigint |&lt;br /&gt;
 citedpatentnumber  | bigint |&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy Statements:&lt;br /&gt;
&lt;br /&gt;
patentdata:&lt;br /&gt;
  \COPY citations_merged TO '/tmp/merged_citations_export1.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  --COPY 38452957&lt;br /&gt;
&lt;br /&gt;
patent_2015:&lt;br /&gt;
  \COPY citations_merged TO '/tmp/merged_citations_export.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  -- RESULT : COPY 59227881&lt;br /&gt;
&lt;br /&gt;
allpatent:&lt;br /&gt;
  \COPY citations FROM '/tmp/merged_citations_export.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  --RESULT : COPY 59227881&lt;br /&gt;
&lt;br /&gt;
  \COPY citations FROM '/tmp/merged_citations_export1.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  --RESULT: COPY 38452957&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CLONING:&lt;br /&gt;
CREATE DATABASE allpatentsProcessed WITH TEMPLATE allpatent OWNER researcher;&lt;br /&gt;
&lt;br /&gt;
== USPTO Consolidated Patent Data ==&lt;br /&gt;
&lt;br /&gt;
Scripts:&lt;br /&gt;
&lt;br /&gt;
/* creating patent data tables from : https://bulkdata.uspto.gov/data2/patent/maintenancefee/*/&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE PatentMaintenanceFee(&lt;br /&gt;
patentnumber varchar,&lt;br /&gt;
applicationnumber int,&lt;br /&gt;
smallentity varchar,&lt;br /&gt;
filingdate date,&lt;br /&gt;
grantissuedate date,&lt;br /&gt;
maintenancefeedate date,&lt;br /&gt;
maintenancefeecode varchar&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
\COPY PatentMaintenanceFee FROM '/bulk/USPTO_Consolidated/MaintFeeEvents_20160613.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
-- RESULT : COPY 14042059&lt;br /&gt;
&lt;br /&gt;
/* creating tables for historical patent data - USPTO */&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE HistoricalPatentData(&lt;br /&gt;
applicationid int,&lt;br /&gt;
pubno varchar,&lt;br /&gt;
patentnumber varchar,&lt;br /&gt;
NBER int,&lt;br /&gt;
USPC varchar,&lt;br /&gt;
USPC_sub varchar,&lt;br /&gt;
applicationdate date,&lt;br /&gt;
prioritydate date,&lt;br /&gt;
pubdate date,&lt;br /&gt;
displaydate date,&lt;br /&gt;
disptype varchar,&lt;br /&gt;
exp_dt date,&lt;br /&gt;
exp_dt_max date,&lt;br /&gt;
pta int&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
\COPY historicalpatentdata FROM '/bulk/USPTO_Consolidated/HistoricalFiles/historical_masterfile.csv' DELIMITER AS ',' HEADER NULL AS '' CSV;&lt;br /&gt;
&lt;br /&gt;
--COPY 11191813&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Patent_Data_Processing_-_SQL_Steps&amp;diff=4458</id>
		<title>Patent Data Processing - SQL Steps</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Patent_Data_Processing_-_SQL_Steps&amp;diff=4458"/>
		<updated>2016-07-06T17:33:36Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: /* Assignees Data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Internal]]&lt;br /&gt;
[[Internal Classification::Legacy| ]]&lt;br /&gt;
&lt;br /&gt;
== Objective ==&lt;br /&gt;
The McNair Center owns two sets of patent data - one set that is inherited from Harvard, the Harvard dataverse, which is stored in the database patentdata and another that is generated by crawlers pulling data from the USPTO website, which is stored in the database '''patent_2015'''.&lt;br /&gt;
&lt;br /&gt;
We are now merging and cleaning the two data sets, and storing them in a schema that is amalgamation of the two underlying schema for the citations tables, assignees tables, and patents tables. The destination schema is '''allpatent'''.&lt;br /&gt;
&lt;br /&gt;
== Assignees Data==&lt;br /&gt;
&lt;br /&gt;
The schema for the assignees table in '''patentdata''' database is:&lt;br /&gt;
&lt;br /&gt;
    Column    |       Type        | Modifiers&lt;br /&gt;
 -------------+-------------------+-----------&lt;br /&gt;
  patent      | integer           |&lt;br /&gt;
  asgtype     | integer           |&lt;br /&gt;
  assignee    | character varying |&lt;br /&gt;
  city        | character varying |&lt;br /&gt;
  state       | character varying |&lt;br /&gt;
  country     | character varying |&lt;br /&gt;
  nationality | character varying |&lt;br /&gt;
  residence   | character varying |&lt;br /&gt;
  asgseq      | integer           |&lt;br /&gt;
&lt;br /&gt;
The schema for the assignees table in patent_2015 is :&lt;br /&gt;
&lt;br /&gt;
    Column     |  Type   | Modifiers&lt;br /&gt;
 --------------+---------+-----------&lt;br /&gt;
 lastname      | text    |&lt;br /&gt;
 firstname     | text    |&lt;br /&gt;
 orgname       | text    |&lt;br /&gt;
 city          | text    |&lt;br /&gt;
 country       | text    |&lt;br /&gt;
 patentcountry | text    |&lt;br /&gt;
 patentnumber  | integer |&lt;br /&gt;
 state         | text    |&lt;br /&gt;
 address       | text    |&lt;br /&gt;
 postcode      | text    |&lt;br /&gt;
&lt;br /&gt;
To merge both schemas, we have some columns that overlap, and some columns that don't.&lt;br /&gt;
&lt;br /&gt;
'''Overlapping Columns'''&lt;br /&gt;
&lt;br /&gt;
  patent_2015  | patentdata&lt;br /&gt;
 --------------+--------------&lt;br /&gt;
  orgname      | assignee &lt;br /&gt;
  city         | city &lt;br /&gt;
  country      | country&lt;br /&gt;
  patentnumber | patent &lt;br /&gt;
  state        | state&lt;br /&gt;
&lt;br /&gt;
These columns will have entries for most rows in the table, because they exist in both tables. The rest of the columns will be populated based on which table the row is coming from.&lt;br /&gt;
&lt;br /&gt;
'''Final Schema'''&lt;br /&gt;
&lt;br /&gt;
         Table &amp;quot;public.assignees&amp;quot;&lt;br /&gt;
     Column     |       Type        | Modifiers&lt;br /&gt;
 ---------------+-------------------+-----------&lt;br /&gt;
  lastname      | character varying |&lt;br /&gt;
  firstname     | character varying |&lt;br /&gt;
  address       | character varying |&lt;br /&gt;
  postcode      | character varying |&lt;br /&gt;
  orgname       | character varying |&lt;br /&gt;
  city          | character varying |&lt;br /&gt;
  country       | character varying |&lt;br /&gt;
  patentnumber  | integer           |&lt;br /&gt;
  state         | character varying |&lt;br /&gt;
  patentcountry | character varying |&lt;br /&gt;
  nationality2  | character varying |&lt;br /&gt;
  residence     | character varying |&lt;br /&gt;
  asgseq        | integer           |&lt;br /&gt;
  asgtype       | integer           |&lt;br /&gt;
&lt;br /&gt;
'''Non-overlapping Columns'''&lt;br /&gt;
These are the columns that belong to either one of the assignees tables, and not to both. For these cases, to help users understand where the row is coming from, the following insert rules have been followed:&lt;br /&gt;
&lt;br /&gt;
*For columns of type int, insert -1&lt;br /&gt;
*For columns of type string (character varying), the string 'null' has been inserted.&lt;br /&gt;
&lt;br /&gt;
Therefore, if a row has appropriate values for orgname, state, city ,etc, but 'null' values for lastname, firstname, address and postcode, the row has come from the patentdata table.&lt;br /&gt;
&lt;br /&gt;
==== Index ====&lt;br /&gt;
Since the table is relatively large, and is likely to be searched often, an index has been imposed on the table.&lt;br /&gt;
&lt;br /&gt;
  allpatent=# CREATE INDEX ON assignees (orgname);&lt;br /&gt;
  CREATE INDEX&lt;br /&gt;
&lt;br /&gt;
====Sample insert and copy commands ====&lt;br /&gt;
	INSERT INTO assignees_merge&lt;br /&gt;
	(&lt;br /&gt;
	SELECT&lt;br /&gt;
	'null',&lt;br /&gt;
	'null',&lt;br /&gt;
	'null',&lt;br /&gt;
	'null',&lt;br /&gt;
	a.assignee,&lt;br /&gt;
	a.city,&lt;br /&gt;
	a.country,&lt;br /&gt;
	a.patent,&lt;br /&gt;
	a.state,&lt;br /&gt;
	'null',&lt;br /&gt;
	a.nationality,&lt;br /&gt;
	a.residence,&lt;br /&gt;
	a.asgseq,&lt;br /&gt;
	a.asgtype&lt;br /&gt;
	FROM assignees a&lt;br /&gt;
	);&lt;br /&gt;
&lt;br /&gt;
	INSERT INTO assignees_merge&lt;br /&gt;
	(&lt;br /&gt;
	SELECT&lt;br /&gt;
	assignees.lastname,&lt;br /&gt;
	assignees.firstname,&lt;br /&gt;
	assignees.address,&lt;br /&gt;
	assignees.postcode,&lt;br /&gt;
	assignees.orgname,&lt;br /&gt;
	assignees.city,&lt;br /&gt;
	assignees.country,&lt;br /&gt;
	assignees.patentnumber,&lt;br /&gt;
	assignees.state,&lt;br /&gt;
	assignees.patentcountry,&lt;br /&gt;
	'null',&lt;br /&gt;
	'null',&lt;br /&gt;
	-1,&lt;br /&gt;
	-1&lt;br /&gt;
	FROM assignees&lt;br /&gt;
	);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	\COPY assignees_merge TO '/tmp/assignees_merge_export.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
	\COPY assignees FROM '/tmp/assignees_merge_export.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
	--1607724&lt;br /&gt;
&lt;br /&gt;
	\COPY assignees_merge TO '/tmp/assignees_merge_export1.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
	\COPY assignees FROM '/tmp/assignees_merge_export1.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
	--3818842&lt;br /&gt;
&lt;br /&gt;
Note : The assignees table was updated on 6/23 to remove the 'null' string and the '-1' values.&lt;br /&gt;
&lt;br /&gt;
==Patents ==&lt;br /&gt;
&lt;br /&gt;
'''Patentdata Schema:'''&lt;br /&gt;
&lt;br /&gt;
 Column  |       Type        | Modifiers&lt;br /&gt;
 --------+-------------------+-----------&lt;br /&gt;
 patent  | integer           |&lt;br /&gt;
 kind    | character varying |&lt;br /&gt;
 claims  | integer           |&lt;br /&gt;
 apptype | integer           |&lt;br /&gt;
 appnum  | integer           |&lt;br /&gt;
 gdate   | date              |&lt;br /&gt;
 gyear   | integer           |&lt;br /&gt;
 appdate | date              |&lt;br /&gt;
 appyear | integer           |&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Patent_2015 Schema:'''&lt;br /&gt;
&lt;br /&gt;
             Column             |  Type   | Modifiers&lt;br /&gt;
 -------------------------------+---------+-----------&lt;br /&gt;
  patentnumber                  | int | not null&lt;br /&gt;
  kind                          | varchar    |&lt;br /&gt;
  grantdate                     | date    |&lt;br /&gt;
  type                          | varchar    |&lt;br /&gt;
  applicationnumber             | varchar    |&lt;br /&gt;
  filingdate                    | date    |&lt;br /&gt;
  prioritydate                  | date    |&lt;br /&gt;
  prioritycountry               | varchar    |&lt;br /&gt;
  prioritypatentnumber          | varchar    |&lt;br /&gt;
  ussubclass                    | varchar    |&lt;br /&gt;
  maingroup                     | varchar    |&lt;br /&gt;
  subgroup                      | varchar    |&lt;br /&gt;
  cpcsubclass                   | varchar    |&lt;br /&gt;
  cpcmaingroup                  | varchar    |&lt;br /&gt;
  cpcsubgroup                   | varchar    |&lt;br /&gt;
  classificationnationalcountry | varchar    |&lt;br /&gt;
  classificationnationalclass   | varchar    |&lt;br /&gt;
  title                         | varchar    |&lt;br /&gt;
  numberofclaims                | int |&lt;br /&gt;
  primaryexaminerfirstname      | varchar    |&lt;br /&gt;
  primaryexaminerlastname       | varchar    |&lt;br /&gt;
  primaryexaminerdepartment     | varchar    |&lt;br /&gt;
  pctpatentnumber               | varchar    |&lt;br /&gt;
  filename                      | varchar    |&lt;br /&gt;
  &lt;br /&gt;
''' Overlapping Columns '''&lt;br /&gt;
   patent_data     patent_2015&lt;br /&gt;
  --------------+-------------&lt;br /&gt;
    patent      |  patentnumber&lt;br /&gt;
    kind        |  kind&lt;br /&gt;
    claims      |  numberofclaims&lt;br /&gt;
    apptype     |  type&lt;br /&gt;
    appnum      |  applicationnumber&lt;br /&gt;
    gdate       |  grantdate&lt;br /&gt;
    appdate     |  filingdate&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
'''Combined Schema:'''&lt;br /&gt;
&lt;br /&gt;
The final schema of the patents table is : &lt;br /&gt;
&lt;br /&gt;
           Column        |       Type        | Modifiers&lt;br /&gt;
   ----------------------+-------------------+-----------&lt;br /&gt;
    patent               | integer           | not null&lt;br /&gt;
    grantdate            | date              |&lt;br /&gt;
    prioritydate         | date              |&lt;br /&gt;
    prioritycountry      | character varying |&lt;br /&gt;
    prioritypatentnumber | character varying |&lt;br /&gt;
    cpcsubgroup          | character varying |&lt;br /&gt;
    pctpatentnumber      | character varying |&lt;br /&gt;
    claims               | integer           |&lt;br /&gt;
    appnum               | integer           |&lt;br /&gt;
    gyear                | integer           |&lt;br /&gt;
    appdate              | date              |&lt;br /&gt;
    appyear              | integer           |&lt;br /&gt;
    nber                 | integer           |&lt;br /&gt;
    uspc                 | character varying |&lt;br /&gt;
    uspc_sub             | character varying |&lt;br /&gt;
 &lt;br /&gt;
From the total list of columns belonging to both the tables (patentdata and patent_2015), a few columns, most of them related to classification of patents, have been dropped since the data in the tables was not clean.&lt;br /&gt;
&lt;br /&gt;
Additionally, three columns - nber, uspc, uspc_sub have been added from the historicalpatentdata, a table built from data downloaded from the USPTO Bulk Data Storage. The join was executed on the patent number.&lt;br /&gt;
&lt;br /&gt;
  Note : The addition, deletion of columns as through separate [[Patent Data Cleanup - June 2016 |scripts]], therefore the scripts below will be slightly discrepant.&lt;br /&gt;
        &lt;br /&gt;
==== Index and Key Creation ====&lt;br /&gt;
Patent numbers are distinct in this table, and are central to the rest of the fields in the table. A primary key can therefore be imposed on the column. Also, since a number of searches are likely to be conducted on this table, an index has been imposed as well.&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
  ALTER TABLE patents ADD PRIMARY KEY (patentnumber);&lt;br /&gt;
  -- RESULT : ALTER TABLE&lt;br /&gt;
  allpatent=# CREATE UNIQUE INDEX patent_idx ON patents (patentnumber);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Sample Insert and Copy Statements====&lt;br /&gt;
    patentdata:&lt;br /&gt;
    INSERT INTO patents_merged&lt;br /&gt;
    (&lt;br /&gt;
    		SELECT	&lt;br /&gt;
    		 patent, &lt;br /&gt;
	         kind, &lt;br /&gt;
	        gdate, &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	         NULL, &lt;br /&gt;
	         NULL, &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        -1, &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        claims, &lt;br /&gt;
	        apptype, &lt;br /&gt;
	        appnum, &lt;br /&gt;
	        gyear, &lt;br /&gt;
	        appdate, &lt;br /&gt;
        	appyear &lt;br /&gt;
        	FROM patents &lt;br /&gt;
    ); &lt;br /&gt;
    -- RESULT : INSERT 0 3984771 &lt;br /&gt;
    &lt;br /&gt;
    patent_2015:&lt;br /&gt;
    INSERT INTO patents_merged&lt;br /&gt;
    (&lt;br /&gt;
    	SELECT&lt;br /&gt;
    		patentnumber, &lt;br /&gt;
		kind, &lt;br /&gt;
		grantdate,&lt;br /&gt;
		type,&lt;br /&gt;
		applicationnumber,&lt;br /&gt;
		filingdate,&lt;br /&gt;
		prioritydate,&lt;br /&gt;
		prioritycountry,&lt;br /&gt;
		prioritypatentnumber,&lt;br /&gt;
		ussubclass,&lt;br /&gt;
		maingroup,&lt;br /&gt;
		subgroup,&lt;br /&gt;
		cpcsubclass,&lt;br /&gt;
		cpcmaingroup,&lt;br /&gt;
		cpcsubgroup,&lt;br /&gt;
		classificationnationalcountry,&lt;br /&gt;
		classificationnationalclass,&lt;br /&gt;
		title,&lt;br /&gt;
		numberofclaims,&lt;br /&gt;
		primaryexaminerfirstname,&lt;br /&gt;
		primaryexaminerlastname,&lt;br /&gt;
		primaryexaminerdepartment,&lt;br /&gt;
		pctpatentnumber,&lt;br /&gt;
		filename,&lt;br /&gt;
		-1,&lt;br /&gt;
		-1,&lt;br /&gt;
		-1,&lt;br /&gt;
		-1,&lt;br /&gt;
		NULL,&lt;br /&gt;
        	-1&lt;br /&gt;
    	FROM patents&lt;br /&gt;
    );&lt;br /&gt;
    -- RESULT : INSERT 0 1646225&lt;br /&gt;
    &lt;br /&gt;
COPY SCRIPTS:&lt;br /&gt;
patentdata:&lt;br /&gt;
  \COPY patents_merged TO '/tmp/merged_patents_export1.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  --COPY 3984771&lt;br /&gt;
&lt;br /&gt;
patent_2015:&lt;br /&gt;
  \COPY patents_merged TO '/tmp/merged_patents_export.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  --COPY 1646225&lt;br /&gt;
&lt;br /&gt;
PATENTS TABLE&lt;br /&gt;
  \COPY patents FROM '/tmp/merged_patents_export1.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  -- RESULT : COPY 3984771&lt;br /&gt;
  \COPY patents FROM '/tmp/merged_patents_export.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  -- RESULT : COPY 1646225&lt;br /&gt;
&lt;br /&gt;
====TESTING ====&lt;br /&gt;
  select count(*) FROM (SELECT DISTINCT patentnumber FROM patents) AS t;&lt;br /&gt;
  --RESULT:  5411151&lt;br /&gt;
   EXPECTED: 5426566&lt;br /&gt;
&lt;br /&gt;
We found some copies of a few rows, where both the patent_2015 and patentdata &lt;br /&gt;
&lt;br /&gt;
  SELECT COUNT(*), *&lt;br /&gt;
  FROM patents&lt;br /&gt;
  GROUP BY&lt;br /&gt;
  	patentnumber, &lt;br /&gt;
	kind, &lt;br /&gt;
	grantdate,&lt;br /&gt;
	type,&lt;br /&gt;
	applicationnumber,&lt;br /&gt;
	filingdate,&lt;br /&gt;
	prioritydate,&lt;br /&gt;
	prioritycountry,&lt;br /&gt;
	prioritypatentnumber,&lt;br /&gt;
	ussubclass,&lt;br /&gt;
	maingroup,&lt;br /&gt;
	subgroup,&lt;br /&gt;
	cpcsubclass,&lt;br /&gt;
	cpcmaingroup,&lt;br /&gt;
	cpcsubgroup,&lt;br /&gt;
	classificationnationalcountry,&lt;br /&gt;
	classificationnationalclass,&lt;br /&gt;
	title,&lt;br /&gt;
	numberofclaims,&lt;br /&gt;
	primaryexaminerfirstname,&lt;br /&gt;
	primaryexaminerlastname,&lt;br /&gt;
	primaryexaminerdepartment,&lt;br /&gt;
	pctpatentnumber,&lt;br /&gt;
	filename,&lt;br /&gt;
	claims,&lt;br /&gt;
	apptype,&lt;br /&gt;
	appnum,&lt;br /&gt;
	gyear,&lt;br /&gt;
	appdate,&lt;br /&gt;
	appyear&lt;br /&gt;
  HAVING COUNT(*) &amp;gt; 1;&lt;br /&gt;
&lt;br /&gt;
  SELECT patentnumber, count(*)&lt;br /&gt;
  FROM patents&lt;br /&gt;
  GROUP BY patentnumber&lt;br /&gt;
  HAVING count(*)&amp;gt;1;&lt;br /&gt;
  --7640598 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  SELECT * &lt;br /&gt;
  FROM patents op&lt;br /&gt;
  WHERE op.patentnumber IN&lt;br /&gt;
	(&lt;br /&gt;
	SELECT ip.patentnumber &lt;br /&gt;
	FROM patents ip&lt;br /&gt;
	GROUP BY ip.patentnumber&lt;br /&gt;
	HAVING COUNT(*)&amp;gt;1&lt;br /&gt;
	)&lt;br /&gt;
  ORDER BY op.patentnumber;&lt;br /&gt;
&lt;br /&gt;
  (&lt;br /&gt;
  SELECT * &lt;br /&gt;
  INTO patentsCleaned&lt;br /&gt;
  FROM patents op&lt;br /&gt;
  WHERE op.patentnumber IN&lt;br /&gt;
	(&lt;br /&gt;
	SELECT ip.patentnumber &lt;br /&gt;
	FROM patents ip&lt;br /&gt;
	GROUP BY ip.patentnumber&lt;br /&gt;
	HAVING COUNT(*)=1&lt;br /&gt;
	)&lt;br /&gt;
  ORDER BY op.patentnumber&lt;br /&gt;
  )&lt;br /&gt;
  --SELECT 5191306&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  INSERT INTO patentsCleaned(&lt;br /&gt;
  SELECT * &lt;br /&gt;
  FROM patents op&lt;br /&gt;
  WHERE op.patentnumber IN&lt;br /&gt;
	(&lt;br /&gt;
	SELECT ip.patentnumber &lt;br /&gt;
	FROM patents ip&lt;br /&gt;
	GROUP BY ip.patentnumber&lt;br /&gt;
	HAVING COUNT(*)&amp;gt;1&lt;br /&gt;
	)&lt;br /&gt;
  AND op.applicationnumber NOT LIKE 'NULL'&lt;br /&gt;
  ORDER BY op.patentnumber&lt;br /&gt;
  );&lt;br /&gt;
&lt;br /&gt;
  --219845&lt;br /&gt;
&lt;br /&gt;
====TESTING:====&lt;br /&gt;
  allpatent=# select count(*) from patentsCleaned;&lt;br /&gt;
    count&lt;br /&gt;
  ---------&lt;br /&gt;
   5411151&lt;br /&gt;
  (1 row)&lt;br /&gt;
&lt;br /&gt;
  allpatent=# select count(*), patentnumber FROM patentsCleaned group by patentnumber having count(*) &amp;gt; 1;&lt;br /&gt;
   count | patentnumber&lt;br /&gt;
  -------+--------------&lt;br /&gt;
  (0 rows)&lt;br /&gt;
&lt;br /&gt;
== Citations==&lt;br /&gt;
&lt;br /&gt;
In the citations table, we needed to define another function that would convert a textual patent number into a number (big int, since the patents number were exceeding the range of regular integers.)&lt;br /&gt;
&lt;br /&gt;
To Extract Patents with Numbers Only and to Ignore Other RegExes&lt;br /&gt;
  CREATE OR REPLACE FUNCTION cleanpatno (text) RETURNS bigint AS $$&lt;br /&gt;
	if ($_[0]) {&lt;br /&gt;
		my $var=$_[0];&lt;br /&gt;
		if ($var=~/^\d*$/) {return $var;}&lt;br /&gt;
		return undef;&lt;br /&gt;
	}&lt;br /&gt;
	return undef;&lt;br /&gt;
	$$ LANGUAGE plperl;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''patentdata schema:'''&lt;br /&gt;
&lt;br /&gt;
    Column    |       Type        | Modifiers&lt;br /&gt;
  ------------+-------------------+-----------&lt;br /&gt;
   patent     | integer           | &lt;br /&gt;
  cit_date    | date              |&lt;br /&gt;
  cit_name    | character varying |&lt;br /&gt;
  cit_kind    | character varying |&lt;br /&gt;
  cit_country | character varying |&lt;br /&gt;
  citation    | integer           |&lt;br /&gt;
  category    | character varying |&lt;br /&gt;
  citseq      | integer           | &lt;br /&gt;
&lt;br /&gt;
  SELECT patent as citingpatentnumber, citation AS citedpatentnumber&lt;br /&gt;
  INTO citations_merged&lt;br /&gt;
  FROM citations;&lt;br /&gt;
  --SELECT 38452957&lt;br /&gt;
&lt;br /&gt;
'''patent_2015 schema:'''&lt;br /&gt;
         Column        |  Type   | Modifiers&lt;br /&gt;
  ---------------------+---------+-----------&lt;br /&gt;
   citingpatentnumber  | integer |&lt;br /&gt;
   citingpatentcountry | text    |&lt;br /&gt;
   citedpatentnumber   | text    |&lt;br /&gt;
   citedpatentcountry  | text    |&lt;br /&gt;
&lt;br /&gt;
  SELECT CAST(citingpatentnumber AS bigint), CAST(cleanpatno( citedpatentnumber) AS bigint) as citedpatentnumber&lt;br /&gt;
  INTO citations_merged&lt;br /&gt;
  FROM citations;&lt;br /&gt;
  -- RESULT : SELECT 59227881&lt;br /&gt;
&lt;br /&gt;
'''Overlapping Columns'''&lt;br /&gt;
&lt;br /&gt;
       patent_2015     |  patentdata   |&lt;br /&gt;
  ---------------------+---------------+&lt;br /&gt;
   citingpatentnumber  | patent        |&lt;br /&gt;
   citedpatentnumber   | citation      |&lt;br /&gt;
  &lt;br /&gt;
''' Combined Schema:'''&lt;br /&gt;
&lt;br /&gt;
       Column       |  Type  | Modifiers&lt;br /&gt;
--------------------+--------+-----------&lt;br /&gt;
 citingpatentnumber | bigint |&lt;br /&gt;
 citedpatentnumber  | bigint |&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy Statements:&lt;br /&gt;
&lt;br /&gt;
patentdata:&lt;br /&gt;
  \COPY citations_merged TO '/tmp/merged_citations_export1.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  --COPY 38452957&lt;br /&gt;
&lt;br /&gt;
patent_2015:&lt;br /&gt;
  \COPY citations_merged TO '/tmp/merged_citations_export.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  -- RESULT : COPY 59227881&lt;br /&gt;
&lt;br /&gt;
allpatent:&lt;br /&gt;
  \COPY citations FROM '/tmp/merged_citations_export.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  --RESULT : COPY 59227881&lt;br /&gt;
&lt;br /&gt;
  \COPY citations FROM '/tmp/merged_citations_export1.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  --RESULT: COPY 38452957&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CLONING:&lt;br /&gt;
CREATE DATABASE allpatentsProcessed WITH TEMPLATE allpatent OWNER researcher;&lt;br /&gt;
&lt;br /&gt;
== USPTO Consolidated Patent Data ==&lt;br /&gt;
&lt;br /&gt;
Scripts:&lt;br /&gt;
&lt;br /&gt;
/* creating patent data tables from : https://bulkdata.uspto.gov/data2/patent/maintenancefee/*/&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE PatentMaintenanceFee(&lt;br /&gt;
patentnumber varchar,&lt;br /&gt;
applicationnumber int,&lt;br /&gt;
smallentity varchar,&lt;br /&gt;
filingdate date,&lt;br /&gt;
grantissuedate date,&lt;br /&gt;
maintenancefeedate date,&lt;br /&gt;
maintenancefeecode varchar&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
\COPY PatentMaintenanceFee FROM '/bulk/USPTO_Consolidated/MaintFeeEvents_20160613.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
-- RESULT : COPY 14042059&lt;br /&gt;
&lt;br /&gt;
/* creating tables for historical patent data - USPTO */&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE HistoricalPatentData(&lt;br /&gt;
applicationid int,&lt;br /&gt;
pubno varchar,&lt;br /&gt;
patentnumber varchar,&lt;br /&gt;
NBER int,&lt;br /&gt;
USPC varchar,&lt;br /&gt;
USPC_sub varchar,&lt;br /&gt;
applicationdate date,&lt;br /&gt;
prioritydate date,&lt;br /&gt;
pubdate date,&lt;br /&gt;
displaydate date,&lt;br /&gt;
disptype varchar,&lt;br /&gt;
exp_dt date,&lt;br /&gt;
exp_dt_max date,&lt;br /&gt;
pta int&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
\COPY historicalpatentdata FROM '/bulk/USPTO_Consolidated/HistoricalFiles/historical_masterfile.csv' DELIMITER AS ',' HEADER NULL AS '' CSV;&lt;br /&gt;
&lt;br /&gt;
--COPY 11191813&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Patent_Data_Processing_-_SQL_Steps&amp;diff=4457</id>
		<title>Patent Data Processing - SQL Steps</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Patent_Data_Processing_-_SQL_Steps&amp;diff=4457"/>
		<updated>2016-07-06T17:30:46Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: /* Assignees Data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Internal]]&lt;br /&gt;
[[Internal Classification::Legacy| ]]&lt;br /&gt;
&lt;br /&gt;
== Objective ==&lt;br /&gt;
The McNair Center owns two sets of patent data - one set that is inherited from Harvard, the Harvard dataverse, which is stored in the database patentdata and another that is generated by crawlers pulling data from the USPTO website, which is stored in the database '''patent_2015'''.&lt;br /&gt;
&lt;br /&gt;
We are now merging and cleaning the two data sets, and storing them in a schema that is amalgamation of the two underlying schema for the citations tables, assignees tables, and patents tables. The destination schema is '''allpatent'''.&lt;br /&gt;
&lt;br /&gt;
== Assignees Data==&lt;br /&gt;
&lt;br /&gt;
The schema for the assignees table in '''patentdata''' database is:&lt;br /&gt;
&lt;br /&gt;
    Column    |       Type        | Modifiers&lt;br /&gt;
 -------------+-------------------+-----------&lt;br /&gt;
  patent      | integer           |&lt;br /&gt;
  asgtype     | integer           |&lt;br /&gt;
  assignee    | character varying |&lt;br /&gt;
  city        | character varying |&lt;br /&gt;
  state       | character varying |&lt;br /&gt;
  country     | character varying |&lt;br /&gt;
  nationality | character varying |&lt;br /&gt;
  residence   | character varying |&lt;br /&gt;
  asgseq      | integer           |&lt;br /&gt;
&lt;br /&gt;
The schema for the assignees table in patent_2015 is :&lt;br /&gt;
&lt;br /&gt;
    Column     |  Type   | Modifiers&lt;br /&gt;
 --------------+---------+-----------&lt;br /&gt;
 lastname      | text    |&lt;br /&gt;
 firstname     | text    |&lt;br /&gt;
 orgname       | text    |&lt;br /&gt;
 city          | text    |&lt;br /&gt;
 country       | text    |&lt;br /&gt;
 patentcountry | text    |&lt;br /&gt;
 patentnumber  | integer |&lt;br /&gt;
 state         | text    |&lt;br /&gt;
 address       | text    |&lt;br /&gt;
 postcode      | text    |&lt;br /&gt;
&lt;br /&gt;
To merge both schemas, we have some columns that overlap, and some columns that don't.&lt;br /&gt;
&lt;br /&gt;
'''Overlapping Columns'''&lt;br /&gt;
&lt;br /&gt;
 patent_2015  | patentdata&lt;br /&gt;
--------------+--------------&lt;br /&gt;
 orgname      | assignee &lt;br /&gt;
 city         | city &lt;br /&gt;
 country      | country&lt;br /&gt;
 patentnumber | patent &lt;br /&gt;
 state        | state&lt;br /&gt;
&lt;br /&gt;
These columns will have entries for most rows in the table, because they exist in both tables. The rest of the columns will be populated based on which table the row is coming from.&lt;br /&gt;
&lt;br /&gt;
'''Final Schema'''&lt;br /&gt;
         Table &amp;quot;public.assignees&amp;quot;&lt;br /&gt;
    Column     |       Type        | Modifiers&lt;br /&gt;
---------------+-------------------+-----------&lt;br /&gt;
 lastname      | character varying |&lt;br /&gt;
 firstname     | character varying |&lt;br /&gt;
 address       | character varying |&lt;br /&gt;
 postcode      | character varying |&lt;br /&gt;
 orgname       | character varying |&lt;br /&gt;
 city          | character varying |&lt;br /&gt;
 country       | character varying |&lt;br /&gt;
 patentnumber  | integer           |&lt;br /&gt;
 state         | character varying |&lt;br /&gt;
 patentcountry | character varying |&lt;br /&gt;
 nationality2  | character varying |&lt;br /&gt;
 residence     | character varying |&lt;br /&gt;
 asgseq        | integer           |&lt;br /&gt;
 asgtype       | integer           |&lt;br /&gt;
&lt;br /&gt;
'''Non-overlapping Columns'''&lt;br /&gt;
These are the columns that belong to either one of the assignees tables, and not to both. For these cases, to help users understand where the row is coming from, the following insert rules have been followed:&lt;br /&gt;
&lt;br /&gt;
*For columns of type int, insert -1&lt;br /&gt;
*For columns of type string (character varying), the string 'null' has been inserted.&lt;br /&gt;
&lt;br /&gt;
Therefore, if a row has appropriate values for orgname, state, city ,etc, but 'null' values for lastname, firstname, address and postcode, the row has come from the patentdata table.&lt;br /&gt;
&lt;br /&gt;
==== Index ====&lt;br /&gt;
Since the table is relatively large, and is likely to be searched often, an index has been imposed on the table.&lt;br /&gt;
&lt;br /&gt;
  allpatent=# CREATE INDEX ON assignees (orgname);&lt;br /&gt;
  CREATE INDEX&lt;br /&gt;
&lt;br /&gt;
====Sample insert and copy commands ====&lt;br /&gt;
	INSERT INTO assignees_merge&lt;br /&gt;
	(&lt;br /&gt;
	SELECT&lt;br /&gt;
	'null',&lt;br /&gt;
	'null',&lt;br /&gt;
	'null',&lt;br /&gt;
	'null',&lt;br /&gt;
	a.assignee,&lt;br /&gt;
	a.city,&lt;br /&gt;
	a.country,&lt;br /&gt;
	a.patent,&lt;br /&gt;
	a.state,&lt;br /&gt;
	'null',&lt;br /&gt;
	a.nationality,&lt;br /&gt;
	a.residence,&lt;br /&gt;
	a.asgseq,&lt;br /&gt;
	a.asgtype&lt;br /&gt;
	FROM assignees a&lt;br /&gt;
	);&lt;br /&gt;
&lt;br /&gt;
	INSERT INTO assignees_merge&lt;br /&gt;
	(&lt;br /&gt;
	SELECT&lt;br /&gt;
	assignees.lastname,&lt;br /&gt;
	assignees.firstname,&lt;br /&gt;
	assignees.address,&lt;br /&gt;
	assignees.postcode,&lt;br /&gt;
	assignees.orgname,&lt;br /&gt;
	assignees.city,&lt;br /&gt;
	assignees.country,&lt;br /&gt;
	assignees.patentnumber,&lt;br /&gt;
	assignees.state,&lt;br /&gt;
	assignees.patentcountry,&lt;br /&gt;
	'null',&lt;br /&gt;
	'null',&lt;br /&gt;
	-1,&lt;br /&gt;
	-1&lt;br /&gt;
	FROM assignees&lt;br /&gt;
	);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	\COPY assignees_merge TO '/tmp/assignees_merge_export.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
	\COPY assignees FROM '/tmp/assignees_merge_export.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
	--1607724&lt;br /&gt;
&lt;br /&gt;
	\COPY assignees_merge TO '/tmp/assignees_merge_export1.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
	\COPY assignees FROM '/tmp/assignees_merge_export1.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
	--3818842&lt;br /&gt;
&lt;br /&gt;
Note : The assignees table was updated on 6/23 to remove the 'null' string and the '-1' values.&lt;br /&gt;
&lt;br /&gt;
==Patents ==&lt;br /&gt;
&lt;br /&gt;
'''Patentdata Schema:'''&lt;br /&gt;
&lt;br /&gt;
 Column  |       Type        | Modifiers&lt;br /&gt;
 --------+-------------------+-----------&lt;br /&gt;
 patent  | integer           |&lt;br /&gt;
 kind    | character varying |&lt;br /&gt;
 claims  | integer           |&lt;br /&gt;
 apptype | integer           |&lt;br /&gt;
 appnum  | integer           |&lt;br /&gt;
 gdate   | date              |&lt;br /&gt;
 gyear   | integer           |&lt;br /&gt;
 appdate | date              |&lt;br /&gt;
 appyear | integer           |&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Patent_2015 Schema:'''&lt;br /&gt;
&lt;br /&gt;
             Column             |  Type   | Modifiers&lt;br /&gt;
 -------------------------------+---------+-----------&lt;br /&gt;
  patentnumber                  | int | not null&lt;br /&gt;
  kind                          | varchar    |&lt;br /&gt;
  grantdate                     | date    |&lt;br /&gt;
  type                          | varchar    |&lt;br /&gt;
  applicationnumber             | varchar    |&lt;br /&gt;
  filingdate                    | date    |&lt;br /&gt;
  prioritydate                  | date    |&lt;br /&gt;
  prioritycountry               | varchar    |&lt;br /&gt;
  prioritypatentnumber          | varchar    |&lt;br /&gt;
  ussubclass                    | varchar    |&lt;br /&gt;
  maingroup                     | varchar    |&lt;br /&gt;
  subgroup                      | varchar    |&lt;br /&gt;
  cpcsubclass                   | varchar    |&lt;br /&gt;
  cpcmaingroup                  | varchar    |&lt;br /&gt;
  cpcsubgroup                   | varchar    |&lt;br /&gt;
  classificationnationalcountry | varchar    |&lt;br /&gt;
  classificationnationalclass   | varchar    |&lt;br /&gt;
  title                         | varchar    |&lt;br /&gt;
  numberofclaims                | int |&lt;br /&gt;
  primaryexaminerfirstname      | varchar    |&lt;br /&gt;
  primaryexaminerlastname       | varchar    |&lt;br /&gt;
  primaryexaminerdepartment     | varchar    |&lt;br /&gt;
  pctpatentnumber               | varchar    |&lt;br /&gt;
  filename                      | varchar    |&lt;br /&gt;
  &lt;br /&gt;
''' Overlapping Columns '''&lt;br /&gt;
   patent_data     patent_2015&lt;br /&gt;
  --------------+-------------&lt;br /&gt;
    patent      |  patentnumber&lt;br /&gt;
    kind        |  kind&lt;br /&gt;
    claims      |  numberofclaims&lt;br /&gt;
    apptype     |  type&lt;br /&gt;
    appnum      |  applicationnumber&lt;br /&gt;
    gdate       |  grantdate&lt;br /&gt;
    appdate     |  filingdate&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
'''Combined Schema:'''&lt;br /&gt;
&lt;br /&gt;
The final schema of the patents table is : &lt;br /&gt;
&lt;br /&gt;
           Column        |       Type        | Modifiers&lt;br /&gt;
   ----------------------+-------------------+-----------&lt;br /&gt;
    patent               | integer           | not null&lt;br /&gt;
    grantdate            | date              |&lt;br /&gt;
    prioritydate         | date              |&lt;br /&gt;
    prioritycountry      | character varying |&lt;br /&gt;
    prioritypatentnumber | character varying |&lt;br /&gt;
    cpcsubgroup          | character varying |&lt;br /&gt;
    pctpatentnumber      | character varying |&lt;br /&gt;
    claims               | integer           |&lt;br /&gt;
    appnum               | integer           |&lt;br /&gt;
    gyear                | integer           |&lt;br /&gt;
    appdate              | date              |&lt;br /&gt;
    appyear              | integer           |&lt;br /&gt;
    nber                 | integer           |&lt;br /&gt;
    uspc                 | character varying |&lt;br /&gt;
    uspc_sub             | character varying |&lt;br /&gt;
 &lt;br /&gt;
From the total list of columns belonging to both the tables (patentdata and patent_2015), a few columns, most of them related to classification of patents, have been dropped since the data in the tables was not clean.&lt;br /&gt;
&lt;br /&gt;
Additionally, three columns - nber, uspc, uspc_sub have been added from the historicalpatentdata, a table built from data downloaded from the USPTO Bulk Data Storage. The join was executed on the patent number.&lt;br /&gt;
&lt;br /&gt;
  Note : The addition, deletion of columns as through separate [[Patent Data Cleanup - June 2016 |scripts]], therefore the scripts below will be slightly discrepant.&lt;br /&gt;
        &lt;br /&gt;
==== Index and Key Creation ====&lt;br /&gt;
Patent numbers are distinct in this table, and are central to the rest of the fields in the table. A primary key can therefore be imposed on the column. Also, since a number of searches are likely to be conducted on this table, an index has been imposed as well.&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
  ALTER TABLE patents ADD PRIMARY KEY (patentnumber);&lt;br /&gt;
  -- RESULT : ALTER TABLE&lt;br /&gt;
  allpatent=# CREATE UNIQUE INDEX patent_idx ON patents (patentnumber);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Sample Insert and Copy Statements====&lt;br /&gt;
    patentdata:&lt;br /&gt;
    INSERT INTO patents_merged&lt;br /&gt;
    (&lt;br /&gt;
    		SELECT	&lt;br /&gt;
    		 patent, &lt;br /&gt;
	         kind, &lt;br /&gt;
	        gdate, &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	         NULL, &lt;br /&gt;
	         NULL, &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        -1, &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        claims, &lt;br /&gt;
	        apptype, &lt;br /&gt;
	        appnum, &lt;br /&gt;
	        gyear, &lt;br /&gt;
	        appdate, &lt;br /&gt;
        	appyear &lt;br /&gt;
        	FROM patents &lt;br /&gt;
    ); &lt;br /&gt;
    -- RESULT : INSERT 0 3984771 &lt;br /&gt;
    &lt;br /&gt;
    patent_2015:&lt;br /&gt;
    INSERT INTO patents_merged&lt;br /&gt;
    (&lt;br /&gt;
    	SELECT&lt;br /&gt;
    		patentnumber, &lt;br /&gt;
		kind, &lt;br /&gt;
		grantdate,&lt;br /&gt;
		type,&lt;br /&gt;
		applicationnumber,&lt;br /&gt;
		filingdate,&lt;br /&gt;
		prioritydate,&lt;br /&gt;
		prioritycountry,&lt;br /&gt;
		prioritypatentnumber,&lt;br /&gt;
		ussubclass,&lt;br /&gt;
		maingroup,&lt;br /&gt;
		subgroup,&lt;br /&gt;
		cpcsubclass,&lt;br /&gt;
		cpcmaingroup,&lt;br /&gt;
		cpcsubgroup,&lt;br /&gt;
		classificationnationalcountry,&lt;br /&gt;
		classificationnationalclass,&lt;br /&gt;
		title,&lt;br /&gt;
		numberofclaims,&lt;br /&gt;
		primaryexaminerfirstname,&lt;br /&gt;
		primaryexaminerlastname,&lt;br /&gt;
		primaryexaminerdepartment,&lt;br /&gt;
		pctpatentnumber,&lt;br /&gt;
		filename,&lt;br /&gt;
		-1,&lt;br /&gt;
		-1,&lt;br /&gt;
		-1,&lt;br /&gt;
		-1,&lt;br /&gt;
		NULL,&lt;br /&gt;
        	-1&lt;br /&gt;
    	FROM patents&lt;br /&gt;
    );&lt;br /&gt;
    -- RESULT : INSERT 0 1646225&lt;br /&gt;
    &lt;br /&gt;
COPY SCRIPTS:&lt;br /&gt;
patentdata:&lt;br /&gt;
  \COPY patents_merged TO '/tmp/merged_patents_export1.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  --COPY 3984771&lt;br /&gt;
&lt;br /&gt;
patent_2015:&lt;br /&gt;
  \COPY patents_merged TO '/tmp/merged_patents_export.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  --COPY 1646225&lt;br /&gt;
&lt;br /&gt;
PATENTS TABLE&lt;br /&gt;
  \COPY patents FROM '/tmp/merged_patents_export1.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  -- RESULT : COPY 3984771&lt;br /&gt;
  \COPY patents FROM '/tmp/merged_patents_export.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  -- RESULT : COPY 1646225&lt;br /&gt;
&lt;br /&gt;
====TESTING ====&lt;br /&gt;
  select count(*) FROM (SELECT DISTINCT patentnumber FROM patents) AS t;&lt;br /&gt;
  --RESULT:  5411151&lt;br /&gt;
   EXPECTED: 5426566&lt;br /&gt;
&lt;br /&gt;
We found some copies of a few rows, where both the patent_2015 and patentdata &lt;br /&gt;
&lt;br /&gt;
  SELECT COUNT(*), *&lt;br /&gt;
  FROM patents&lt;br /&gt;
  GROUP BY&lt;br /&gt;
  	patentnumber, &lt;br /&gt;
	kind, &lt;br /&gt;
	grantdate,&lt;br /&gt;
	type,&lt;br /&gt;
	applicationnumber,&lt;br /&gt;
	filingdate,&lt;br /&gt;
	prioritydate,&lt;br /&gt;
	prioritycountry,&lt;br /&gt;
	prioritypatentnumber,&lt;br /&gt;
	ussubclass,&lt;br /&gt;
	maingroup,&lt;br /&gt;
	subgroup,&lt;br /&gt;
	cpcsubclass,&lt;br /&gt;
	cpcmaingroup,&lt;br /&gt;
	cpcsubgroup,&lt;br /&gt;
	classificationnationalcountry,&lt;br /&gt;
	classificationnationalclass,&lt;br /&gt;
	title,&lt;br /&gt;
	numberofclaims,&lt;br /&gt;
	primaryexaminerfirstname,&lt;br /&gt;
	primaryexaminerlastname,&lt;br /&gt;
	primaryexaminerdepartment,&lt;br /&gt;
	pctpatentnumber,&lt;br /&gt;
	filename,&lt;br /&gt;
	claims,&lt;br /&gt;
	apptype,&lt;br /&gt;
	appnum,&lt;br /&gt;
	gyear,&lt;br /&gt;
	appdate,&lt;br /&gt;
	appyear&lt;br /&gt;
  HAVING COUNT(*) &amp;gt; 1;&lt;br /&gt;
&lt;br /&gt;
  SELECT patentnumber, count(*)&lt;br /&gt;
  FROM patents&lt;br /&gt;
  GROUP BY patentnumber&lt;br /&gt;
  HAVING count(*)&amp;gt;1;&lt;br /&gt;
  --7640598 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  SELECT * &lt;br /&gt;
  FROM patents op&lt;br /&gt;
  WHERE op.patentnumber IN&lt;br /&gt;
	(&lt;br /&gt;
	SELECT ip.patentnumber &lt;br /&gt;
	FROM patents ip&lt;br /&gt;
	GROUP BY ip.patentnumber&lt;br /&gt;
	HAVING COUNT(*)&amp;gt;1&lt;br /&gt;
	)&lt;br /&gt;
  ORDER BY op.patentnumber;&lt;br /&gt;
&lt;br /&gt;
  (&lt;br /&gt;
  SELECT * &lt;br /&gt;
  INTO patentsCleaned&lt;br /&gt;
  FROM patents op&lt;br /&gt;
  WHERE op.patentnumber IN&lt;br /&gt;
	(&lt;br /&gt;
	SELECT ip.patentnumber &lt;br /&gt;
	FROM patents ip&lt;br /&gt;
	GROUP BY ip.patentnumber&lt;br /&gt;
	HAVING COUNT(*)=1&lt;br /&gt;
	)&lt;br /&gt;
  ORDER BY op.patentnumber&lt;br /&gt;
  )&lt;br /&gt;
  --SELECT 5191306&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  INSERT INTO patentsCleaned(&lt;br /&gt;
  SELECT * &lt;br /&gt;
  FROM patents op&lt;br /&gt;
  WHERE op.patentnumber IN&lt;br /&gt;
	(&lt;br /&gt;
	SELECT ip.patentnumber &lt;br /&gt;
	FROM patents ip&lt;br /&gt;
	GROUP BY ip.patentnumber&lt;br /&gt;
	HAVING COUNT(*)&amp;gt;1&lt;br /&gt;
	)&lt;br /&gt;
  AND op.applicationnumber NOT LIKE 'NULL'&lt;br /&gt;
  ORDER BY op.patentnumber&lt;br /&gt;
  );&lt;br /&gt;
&lt;br /&gt;
  --219845&lt;br /&gt;
&lt;br /&gt;
====TESTING:====&lt;br /&gt;
  allpatent=# select count(*) from patentsCleaned;&lt;br /&gt;
    count&lt;br /&gt;
  ---------&lt;br /&gt;
   5411151&lt;br /&gt;
  (1 row)&lt;br /&gt;
&lt;br /&gt;
  allpatent=# select count(*), patentnumber FROM patentsCleaned group by patentnumber having count(*) &amp;gt; 1;&lt;br /&gt;
   count | patentnumber&lt;br /&gt;
  -------+--------------&lt;br /&gt;
  (0 rows)&lt;br /&gt;
&lt;br /&gt;
== Citations==&lt;br /&gt;
&lt;br /&gt;
In the citations table, we needed to define another function that would convert a textual patent number into a number (big int, since the patents number were exceeding the range of regular integers.)&lt;br /&gt;
&lt;br /&gt;
To Extract Patents with Numbers Only and to Ignore Other RegExes&lt;br /&gt;
  CREATE OR REPLACE FUNCTION cleanpatno (text) RETURNS bigint AS $$&lt;br /&gt;
	if ($_[0]) {&lt;br /&gt;
		my $var=$_[0];&lt;br /&gt;
		if ($var=~/^\d*$/) {return $var;}&lt;br /&gt;
		return undef;&lt;br /&gt;
	}&lt;br /&gt;
	return undef;&lt;br /&gt;
	$$ LANGUAGE plperl;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''patentdata schema:'''&lt;br /&gt;
&lt;br /&gt;
    Column    |       Type        | Modifiers&lt;br /&gt;
  ------------+-------------------+-----------&lt;br /&gt;
   patent     | integer           | &lt;br /&gt;
  cit_date    | date              |&lt;br /&gt;
  cit_name    | character varying |&lt;br /&gt;
  cit_kind    | character varying |&lt;br /&gt;
  cit_country | character varying |&lt;br /&gt;
  citation    | integer           |&lt;br /&gt;
  category    | character varying |&lt;br /&gt;
  citseq      | integer           | &lt;br /&gt;
&lt;br /&gt;
  SELECT patent as citingpatentnumber, citation AS citedpatentnumber&lt;br /&gt;
  INTO citations_merged&lt;br /&gt;
  FROM citations;&lt;br /&gt;
  --SELECT 38452957&lt;br /&gt;
&lt;br /&gt;
'''patent_2015 schema:'''&lt;br /&gt;
         Column        |  Type   | Modifiers&lt;br /&gt;
  ---------------------+---------+-----------&lt;br /&gt;
   citingpatentnumber  | integer |&lt;br /&gt;
   citingpatentcountry | text    |&lt;br /&gt;
   citedpatentnumber   | text    |&lt;br /&gt;
   citedpatentcountry  | text    |&lt;br /&gt;
&lt;br /&gt;
  SELECT CAST(citingpatentnumber AS bigint), CAST(cleanpatno( citedpatentnumber) AS bigint) as citedpatentnumber&lt;br /&gt;
  INTO citations_merged&lt;br /&gt;
  FROM citations;&lt;br /&gt;
  -- RESULT : SELECT 59227881&lt;br /&gt;
&lt;br /&gt;
'''Overlapping Columns'''&lt;br /&gt;
&lt;br /&gt;
       patent_2015     |  patentdata   |&lt;br /&gt;
  ---------------------+---------------+&lt;br /&gt;
   citingpatentnumber  | patent        |&lt;br /&gt;
   citedpatentnumber   | citation      |&lt;br /&gt;
  &lt;br /&gt;
''' Combined Schema:'''&lt;br /&gt;
&lt;br /&gt;
       Column       |  Type  | Modifiers&lt;br /&gt;
--------------------+--------+-----------&lt;br /&gt;
 citingpatentnumber | bigint |&lt;br /&gt;
 citedpatentnumber  | bigint |&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy Statements:&lt;br /&gt;
&lt;br /&gt;
patentdata:&lt;br /&gt;
  \COPY citations_merged TO '/tmp/merged_citations_export1.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  --COPY 38452957&lt;br /&gt;
&lt;br /&gt;
patent_2015:&lt;br /&gt;
  \COPY citations_merged TO '/tmp/merged_citations_export.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  -- RESULT : COPY 59227881&lt;br /&gt;
&lt;br /&gt;
allpatent:&lt;br /&gt;
  \COPY citations FROM '/tmp/merged_citations_export.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  --RESULT : COPY 59227881&lt;br /&gt;
&lt;br /&gt;
  \COPY citations FROM '/tmp/merged_citations_export1.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  --RESULT: COPY 38452957&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CLONING:&lt;br /&gt;
CREATE DATABASE allpatentsProcessed WITH TEMPLATE allpatent OWNER researcher;&lt;br /&gt;
&lt;br /&gt;
== USPTO Consolidated Patent Data ==&lt;br /&gt;
&lt;br /&gt;
Scripts:&lt;br /&gt;
&lt;br /&gt;
/* creating patent data tables from : https://bulkdata.uspto.gov/data2/patent/maintenancefee/*/&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE PatentMaintenanceFee(&lt;br /&gt;
patentnumber varchar,&lt;br /&gt;
applicationnumber int,&lt;br /&gt;
smallentity varchar,&lt;br /&gt;
filingdate date,&lt;br /&gt;
grantissuedate date,&lt;br /&gt;
maintenancefeedate date,&lt;br /&gt;
maintenancefeecode varchar&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
\COPY PatentMaintenanceFee FROM '/bulk/USPTO_Consolidated/MaintFeeEvents_20160613.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
-- RESULT : COPY 14042059&lt;br /&gt;
&lt;br /&gt;
/* creating tables for historical patent data - USPTO */&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE HistoricalPatentData(&lt;br /&gt;
applicationid int,&lt;br /&gt;
pubno varchar,&lt;br /&gt;
patentnumber varchar,&lt;br /&gt;
NBER int,&lt;br /&gt;
USPC varchar,&lt;br /&gt;
USPC_sub varchar,&lt;br /&gt;
applicationdate date,&lt;br /&gt;
prioritydate date,&lt;br /&gt;
pubdate date,&lt;br /&gt;
displaydate date,&lt;br /&gt;
disptype varchar,&lt;br /&gt;
exp_dt date,&lt;br /&gt;
exp_dt_max date,&lt;br /&gt;
pta int&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
\COPY historicalpatentdata FROM '/bulk/USPTO_Consolidated/HistoricalFiles/historical_masterfile.csv' DELIMITER AS ',' HEADER NULL AS '' CSV;&lt;br /&gt;
&lt;br /&gt;
--COPY 11191813&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Patent_Data_Processing_-_SQL_Steps&amp;diff=4456</id>
		<title>Patent Data Processing - SQL Steps</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Patent_Data_Processing_-_SQL_Steps&amp;diff=4456"/>
		<updated>2016-07-06T17:30:08Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: /* Assignees Data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Internal]]&lt;br /&gt;
[[Internal Classification::Legacy| ]]&lt;br /&gt;
&lt;br /&gt;
== Objective ==&lt;br /&gt;
The McNair Center owns two sets of patent data - one set that is inherited from Harvard, the Harvard dataverse, which is stored in the database patentdata and another that is generated by crawlers pulling data from the USPTO website, which is stored in the database '''patent_2015'''.&lt;br /&gt;
&lt;br /&gt;
We are now merging and cleaning the two data sets, and storing them in a schema that is amalgamation of the two underlying schema for the citations tables, assignees tables, and patents tables. The destination schema is '''allpatent'''.&lt;br /&gt;
&lt;br /&gt;
== Assignees Data==&lt;br /&gt;
&lt;br /&gt;
The schema for the assignees table in '''patentdata''' database is:&lt;br /&gt;
&lt;br /&gt;
    Column    |       Type        | Modifiers&lt;br /&gt;
 -------------+-------------------+-----------&lt;br /&gt;
  patent      | integer           |&lt;br /&gt;
  asgtype     | integer           |&lt;br /&gt;
  assignee    | character varying |&lt;br /&gt;
  city        | character varying |&lt;br /&gt;
  state       | character varying |&lt;br /&gt;
  country     | character varying |&lt;br /&gt;
  nationality | character varying |&lt;br /&gt;
  residence   | character varying |&lt;br /&gt;
  asgseq      | integer           |&lt;br /&gt;
&lt;br /&gt;
The schema for the assignees table in patent_2015 is :&lt;br /&gt;
&lt;br /&gt;
    Column     |  Type   | Modifiers&lt;br /&gt;
---------------+---------+-----------&lt;br /&gt;
 lastname      | text    |&lt;br /&gt;
 firstname     | text    |&lt;br /&gt;
 orgname       | text    |&lt;br /&gt;
 city          | text    |&lt;br /&gt;
 country       | text    |&lt;br /&gt;
 patentcountry | text    |&lt;br /&gt;
 patentnumber  | integer |&lt;br /&gt;
 state         | text    |&lt;br /&gt;
 address       | text    |&lt;br /&gt;
 postcode      | text    |&lt;br /&gt;
&lt;br /&gt;
To merge both schemas, we have some columns that overlap, and some columns that don't.&lt;br /&gt;
&lt;br /&gt;
'''Overlapping Columns'''&lt;br /&gt;
&lt;br /&gt;
 patent_2015  | patentdata&lt;br /&gt;
--------------+--------------&lt;br /&gt;
 orgname      | assignee &lt;br /&gt;
 city         | city &lt;br /&gt;
 country      | country&lt;br /&gt;
 patentnumber | patent &lt;br /&gt;
 state        | state&lt;br /&gt;
&lt;br /&gt;
These columns will have entries for most rows in the table, because they exist in both tables. The rest of the columns will be populated based on which table the row is coming from.&lt;br /&gt;
&lt;br /&gt;
'''Final Schema'''&lt;br /&gt;
         Table &amp;quot;public.assignees&amp;quot;&lt;br /&gt;
    Column     |       Type        | Modifiers&lt;br /&gt;
---------------+-------------------+-----------&lt;br /&gt;
 lastname      | character varying |&lt;br /&gt;
 firstname     | character varying |&lt;br /&gt;
 address       | character varying |&lt;br /&gt;
 postcode      | character varying |&lt;br /&gt;
 orgname       | character varying |&lt;br /&gt;
 city          | character varying |&lt;br /&gt;
 country       | character varying |&lt;br /&gt;
 patentnumber  | integer           |&lt;br /&gt;
 state         | character varying |&lt;br /&gt;
 patentcountry | character varying |&lt;br /&gt;
 nationality2  | character varying |&lt;br /&gt;
 residence     | character varying |&lt;br /&gt;
 asgseq        | integer           |&lt;br /&gt;
 asgtype       | integer           |&lt;br /&gt;
&lt;br /&gt;
'''Non-overlapping Columns'''&lt;br /&gt;
These are the columns that belong to either one of the assignees tables, and not to both. For these cases, to help users understand where the row is coming from, the following insert rules have been followed:&lt;br /&gt;
&lt;br /&gt;
*For columns of type int, insert -1&lt;br /&gt;
*For columns of type string (character varying), the string 'null' has been inserted.&lt;br /&gt;
&lt;br /&gt;
Therefore, if a row has appropriate values for orgname, state, city ,etc, but 'null' values for lastname, firstname, address and postcode, the row has come from the patentdata table.&lt;br /&gt;
&lt;br /&gt;
==== Index ====&lt;br /&gt;
Since the table is relatively large, and is likely to be searched often, an index has been imposed on the table.&lt;br /&gt;
&lt;br /&gt;
  allpatent=# CREATE INDEX ON assignees (orgname);&lt;br /&gt;
  CREATE INDEX&lt;br /&gt;
&lt;br /&gt;
====Sample insert and copy commands ====&lt;br /&gt;
	INSERT INTO assignees_merge&lt;br /&gt;
	(&lt;br /&gt;
	SELECT&lt;br /&gt;
	'null',&lt;br /&gt;
	'null',&lt;br /&gt;
	'null',&lt;br /&gt;
	'null',&lt;br /&gt;
	a.assignee,&lt;br /&gt;
	a.city,&lt;br /&gt;
	a.country,&lt;br /&gt;
	a.patent,&lt;br /&gt;
	a.state,&lt;br /&gt;
	'null',&lt;br /&gt;
	a.nationality,&lt;br /&gt;
	a.residence,&lt;br /&gt;
	a.asgseq,&lt;br /&gt;
	a.asgtype&lt;br /&gt;
	FROM assignees a&lt;br /&gt;
	);&lt;br /&gt;
&lt;br /&gt;
	INSERT INTO assignees_merge&lt;br /&gt;
	(&lt;br /&gt;
	SELECT&lt;br /&gt;
	assignees.lastname,&lt;br /&gt;
	assignees.firstname,&lt;br /&gt;
	assignees.address,&lt;br /&gt;
	assignees.postcode,&lt;br /&gt;
	assignees.orgname,&lt;br /&gt;
	assignees.city,&lt;br /&gt;
	assignees.country,&lt;br /&gt;
	assignees.patentnumber,&lt;br /&gt;
	assignees.state,&lt;br /&gt;
	assignees.patentcountry,&lt;br /&gt;
	'null',&lt;br /&gt;
	'null',&lt;br /&gt;
	-1,&lt;br /&gt;
	-1&lt;br /&gt;
	FROM assignees&lt;br /&gt;
	);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	\COPY assignees_merge TO '/tmp/assignees_merge_export.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
	\COPY assignees FROM '/tmp/assignees_merge_export.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
	--1607724&lt;br /&gt;
&lt;br /&gt;
	\COPY assignees_merge TO '/tmp/assignees_merge_export1.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
	\COPY assignees FROM '/tmp/assignees_merge_export1.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
	--3818842&lt;br /&gt;
&lt;br /&gt;
Note : The assignees table was updated on 6/23 to remove the 'null' string and the '-1' values.&lt;br /&gt;
&lt;br /&gt;
==Patents ==&lt;br /&gt;
&lt;br /&gt;
'''Patentdata Schema:'''&lt;br /&gt;
&lt;br /&gt;
 Column  |       Type        | Modifiers&lt;br /&gt;
 --------+-------------------+-----------&lt;br /&gt;
 patent  | integer           |&lt;br /&gt;
 kind    | character varying |&lt;br /&gt;
 claims  | integer           |&lt;br /&gt;
 apptype | integer           |&lt;br /&gt;
 appnum  | integer           |&lt;br /&gt;
 gdate   | date              |&lt;br /&gt;
 gyear   | integer           |&lt;br /&gt;
 appdate | date              |&lt;br /&gt;
 appyear | integer           |&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Patent_2015 Schema:'''&lt;br /&gt;
&lt;br /&gt;
             Column             |  Type   | Modifiers&lt;br /&gt;
 -------------------------------+---------+-----------&lt;br /&gt;
  patentnumber                  | int | not null&lt;br /&gt;
  kind                          | varchar    |&lt;br /&gt;
  grantdate                     | date    |&lt;br /&gt;
  type                          | varchar    |&lt;br /&gt;
  applicationnumber             | varchar    |&lt;br /&gt;
  filingdate                    | date    |&lt;br /&gt;
  prioritydate                  | date    |&lt;br /&gt;
  prioritycountry               | varchar    |&lt;br /&gt;
  prioritypatentnumber          | varchar    |&lt;br /&gt;
  ussubclass                    | varchar    |&lt;br /&gt;
  maingroup                     | varchar    |&lt;br /&gt;
  subgroup                      | varchar    |&lt;br /&gt;
  cpcsubclass                   | varchar    |&lt;br /&gt;
  cpcmaingroup                  | varchar    |&lt;br /&gt;
  cpcsubgroup                   | varchar    |&lt;br /&gt;
  classificationnationalcountry | varchar    |&lt;br /&gt;
  classificationnationalclass   | varchar    |&lt;br /&gt;
  title                         | varchar    |&lt;br /&gt;
  numberofclaims                | int |&lt;br /&gt;
  primaryexaminerfirstname      | varchar    |&lt;br /&gt;
  primaryexaminerlastname       | varchar    |&lt;br /&gt;
  primaryexaminerdepartment     | varchar    |&lt;br /&gt;
  pctpatentnumber               | varchar    |&lt;br /&gt;
  filename                      | varchar    |&lt;br /&gt;
  &lt;br /&gt;
''' Overlapping Columns '''&lt;br /&gt;
   patent_data     patent_2015&lt;br /&gt;
  --------------+-------------&lt;br /&gt;
    patent      |  patentnumber&lt;br /&gt;
    kind        |  kind&lt;br /&gt;
    claims      |  numberofclaims&lt;br /&gt;
    apptype     |  type&lt;br /&gt;
    appnum      |  applicationnumber&lt;br /&gt;
    gdate       |  grantdate&lt;br /&gt;
    appdate     |  filingdate&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
'''Combined Schema:'''&lt;br /&gt;
&lt;br /&gt;
The final schema of the patents table is : &lt;br /&gt;
&lt;br /&gt;
           Column        |       Type        | Modifiers&lt;br /&gt;
   ----------------------+-------------------+-----------&lt;br /&gt;
    patent               | integer           | not null&lt;br /&gt;
    grantdate            | date              |&lt;br /&gt;
    prioritydate         | date              |&lt;br /&gt;
    prioritycountry      | character varying |&lt;br /&gt;
    prioritypatentnumber | character varying |&lt;br /&gt;
    cpcsubgroup          | character varying |&lt;br /&gt;
    pctpatentnumber      | character varying |&lt;br /&gt;
    claims               | integer           |&lt;br /&gt;
    appnum               | integer           |&lt;br /&gt;
    gyear                | integer           |&lt;br /&gt;
    appdate              | date              |&lt;br /&gt;
    appyear              | integer           |&lt;br /&gt;
    nber                 | integer           |&lt;br /&gt;
    uspc                 | character varying |&lt;br /&gt;
    uspc_sub             | character varying |&lt;br /&gt;
 &lt;br /&gt;
From the total list of columns belonging to both the tables (patentdata and patent_2015), a few columns, most of them related to classification of patents, have been dropped since the data in the tables was not clean.&lt;br /&gt;
&lt;br /&gt;
Additionally, three columns - nber, uspc, uspc_sub have been added from the historicalpatentdata, a table built from data downloaded from the USPTO Bulk Data Storage. The join was executed on the patent number.&lt;br /&gt;
&lt;br /&gt;
  Note : The addition, deletion of columns as through separate [[Patent Data Cleanup - June 2016 |scripts]], therefore the scripts below will be slightly discrepant.&lt;br /&gt;
        &lt;br /&gt;
==== Index and Key Creation ====&lt;br /&gt;
Patent numbers are distinct in this table, and are central to the rest of the fields in the table. A primary key can therefore be imposed on the column. Also, since a number of searches are likely to be conducted on this table, an index has been imposed as well.&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
  ALTER TABLE patents ADD PRIMARY KEY (patentnumber);&lt;br /&gt;
  -- RESULT : ALTER TABLE&lt;br /&gt;
  allpatent=# CREATE UNIQUE INDEX patent_idx ON patents (patentnumber);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Sample Insert and Copy Statements====&lt;br /&gt;
    patentdata:&lt;br /&gt;
    INSERT INTO patents_merged&lt;br /&gt;
    (&lt;br /&gt;
    		SELECT	&lt;br /&gt;
    		 patent, &lt;br /&gt;
	         kind, &lt;br /&gt;
	        gdate, &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	         NULL, &lt;br /&gt;
	         NULL, &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        -1, &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        'NULL', &lt;br /&gt;
	        claims, &lt;br /&gt;
	        apptype, &lt;br /&gt;
	        appnum, &lt;br /&gt;
	        gyear, &lt;br /&gt;
	        appdate, &lt;br /&gt;
        	appyear &lt;br /&gt;
        	FROM patents &lt;br /&gt;
    ); &lt;br /&gt;
    -- RESULT : INSERT 0 3984771 &lt;br /&gt;
    &lt;br /&gt;
    patent_2015:&lt;br /&gt;
    INSERT INTO patents_merged&lt;br /&gt;
    (&lt;br /&gt;
    	SELECT&lt;br /&gt;
    		patentnumber, &lt;br /&gt;
		kind, &lt;br /&gt;
		grantdate,&lt;br /&gt;
		type,&lt;br /&gt;
		applicationnumber,&lt;br /&gt;
		filingdate,&lt;br /&gt;
		prioritydate,&lt;br /&gt;
		prioritycountry,&lt;br /&gt;
		prioritypatentnumber,&lt;br /&gt;
		ussubclass,&lt;br /&gt;
		maingroup,&lt;br /&gt;
		subgroup,&lt;br /&gt;
		cpcsubclass,&lt;br /&gt;
		cpcmaingroup,&lt;br /&gt;
		cpcsubgroup,&lt;br /&gt;
		classificationnationalcountry,&lt;br /&gt;
		classificationnationalclass,&lt;br /&gt;
		title,&lt;br /&gt;
		numberofclaims,&lt;br /&gt;
		primaryexaminerfirstname,&lt;br /&gt;
		primaryexaminerlastname,&lt;br /&gt;
		primaryexaminerdepartment,&lt;br /&gt;
		pctpatentnumber,&lt;br /&gt;
		filename,&lt;br /&gt;
		-1,&lt;br /&gt;
		-1,&lt;br /&gt;
		-1,&lt;br /&gt;
		-1,&lt;br /&gt;
		NULL,&lt;br /&gt;
        	-1&lt;br /&gt;
    	FROM patents&lt;br /&gt;
    );&lt;br /&gt;
    -- RESULT : INSERT 0 1646225&lt;br /&gt;
    &lt;br /&gt;
COPY SCRIPTS:&lt;br /&gt;
patentdata:&lt;br /&gt;
  \COPY patents_merged TO '/tmp/merged_patents_export1.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  --COPY 3984771&lt;br /&gt;
&lt;br /&gt;
patent_2015:&lt;br /&gt;
  \COPY patents_merged TO '/tmp/merged_patents_export.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  --COPY 1646225&lt;br /&gt;
&lt;br /&gt;
PATENTS TABLE&lt;br /&gt;
  \COPY patents FROM '/tmp/merged_patents_export1.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  -- RESULT : COPY 3984771&lt;br /&gt;
  \COPY patents FROM '/tmp/merged_patents_export.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  -- RESULT : COPY 1646225&lt;br /&gt;
&lt;br /&gt;
====TESTING ====&lt;br /&gt;
  select count(*) FROM (SELECT DISTINCT patentnumber FROM patents) AS t;&lt;br /&gt;
  --RESULT:  5411151&lt;br /&gt;
   EXPECTED: 5426566&lt;br /&gt;
&lt;br /&gt;
We found some copies of a few rows, where both the patent_2015 and patentdata &lt;br /&gt;
&lt;br /&gt;
  SELECT COUNT(*), *&lt;br /&gt;
  FROM patents&lt;br /&gt;
  GROUP BY&lt;br /&gt;
  	patentnumber, &lt;br /&gt;
	kind, &lt;br /&gt;
	grantdate,&lt;br /&gt;
	type,&lt;br /&gt;
	applicationnumber,&lt;br /&gt;
	filingdate,&lt;br /&gt;
	prioritydate,&lt;br /&gt;
	prioritycountry,&lt;br /&gt;
	prioritypatentnumber,&lt;br /&gt;
	ussubclass,&lt;br /&gt;
	maingroup,&lt;br /&gt;
	subgroup,&lt;br /&gt;
	cpcsubclass,&lt;br /&gt;
	cpcmaingroup,&lt;br /&gt;
	cpcsubgroup,&lt;br /&gt;
	classificationnationalcountry,&lt;br /&gt;
	classificationnationalclass,&lt;br /&gt;
	title,&lt;br /&gt;
	numberofclaims,&lt;br /&gt;
	primaryexaminerfirstname,&lt;br /&gt;
	primaryexaminerlastname,&lt;br /&gt;
	primaryexaminerdepartment,&lt;br /&gt;
	pctpatentnumber,&lt;br /&gt;
	filename,&lt;br /&gt;
	claims,&lt;br /&gt;
	apptype,&lt;br /&gt;
	appnum,&lt;br /&gt;
	gyear,&lt;br /&gt;
	appdate,&lt;br /&gt;
	appyear&lt;br /&gt;
  HAVING COUNT(*) &amp;gt; 1;&lt;br /&gt;
&lt;br /&gt;
  SELECT patentnumber, count(*)&lt;br /&gt;
  FROM patents&lt;br /&gt;
  GROUP BY patentnumber&lt;br /&gt;
  HAVING count(*)&amp;gt;1;&lt;br /&gt;
  --7640598 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  SELECT * &lt;br /&gt;
  FROM patents op&lt;br /&gt;
  WHERE op.patentnumber IN&lt;br /&gt;
	(&lt;br /&gt;
	SELECT ip.patentnumber &lt;br /&gt;
	FROM patents ip&lt;br /&gt;
	GROUP BY ip.patentnumber&lt;br /&gt;
	HAVING COUNT(*)&amp;gt;1&lt;br /&gt;
	)&lt;br /&gt;
  ORDER BY op.patentnumber;&lt;br /&gt;
&lt;br /&gt;
  (&lt;br /&gt;
  SELECT * &lt;br /&gt;
  INTO patentsCleaned&lt;br /&gt;
  FROM patents op&lt;br /&gt;
  WHERE op.patentnumber IN&lt;br /&gt;
	(&lt;br /&gt;
	SELECT ip.patentnumber &lt;br /&gt;
	FROM patents ip&lt;br /&gt;
	GROUP BY ip.patentnumber&lt;br /&gt;
	HAVING COUNT(*)=1&lt;br /&gt;
	)&lt;br /&gt;
  ORDER BY op.patentnumber&lt;br /&gt;
  )&lt;br /&gt;
  --SELECT 5191306&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  INSERT INTO patentsCleaned(&lt;br /&gt;
  SELECT * &lt;br /&gt;
  FROM patents op&lt;br /&gt;
  WHERE op.patentnumber IN&lt;br /&gt;
	(&lt;br /&gt;
	SELECT ip.patentnumber &lt;br /&gt;
	FROM patents ip&lt;br /&gt;
	GROUP BY ip.patentnumber&lt;br /&gt;
	HAVING COUNT(*)&amp;gt;1&lt;br /&gt;
	)&lt;br /&gt;
  AND op.applicationnumber NOT LIKE 'NULL'&lt;br /&gt;
  ORDER BY op.patentnumber&lt;br /&gt;
  );&lt;br /&gt;
&lt;br /&gt;
  --219845&lt;br /&gt;
&lt;br /&gt;
====TESTING:====&lt;br /&gt;
  allpatent=# select count(*) from patentsCleaned;&lt;br /&gt;
    count&lt;br /&gt;
  ---------&lt;br /&gt;
   5411151&lt;br /&gt;
  (1 row)&lt;br /&gt;
&lt;br /&gt;
  allpatent=# select count(*), patentnumber FROM patentsCleaned group by patentnumber having count(*) &amp;gt; 1;&lt;br /&gt;
   count | patentnumber&lt;br /&gt;
  -------+--------------&lt;br /&gt;
  (0 rows)&lt;br /&gt;
&lt;br /&gt;
== Citations==&lt;br /&gt;
&lt;br /&gt;
In the citations table, we needed to define another function that would convert a textual patent number into a number (big int, since the patents number were exceeding the range of regular integers.)&lt;br /&gt;
&lt;br /&gt;
To Extract Patents with Numbers Only and to Ignore Other RegExes&lt;br /&gt;
  CREATE OR REPLACE FUNCTION cleanpatno (text) RETURNS bigint AS $$&lt;br /&gt;
	if ($_[0]) {&lt;br /&gt;
		my $var=$_[0];&lt;br /&gt;
		if ($var=~/^\d*$/) {return $var;}&lt;br /&gt;
		return undef;&lt;br /&gt;
	}&lt;br /&gt;
	return undef;&lt;br /&gt;
	$$ LANGUAGE plperl;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''patentdata schema:'''&lt;br /&gt;
&lt;br /&gt;
    Column    |       Type        | Modifiers&lt;br /&gt;
  ------------+-------------------+-----------&lt;br /&gt;
   patent     | integer           | &lt;br /&gt;
  cit_date    | date              |&lt;br /&gt;
  cit_name    | character varying |&lt;br /&gt;
  cit_kind    | character varying |&lt;br /&gt;
  cit_country | character varying |&lt;br /&gt;
  citation    | integer           |&lt;br /&gt;
  category    | character varying |&lt;br /&gt;
  citseq      | integer           | &lt;br /&gt;
&lt;br /&gt;
  SELECT patent as citingpatentnumber, citation AS citedpatentnumber&lt;br /&gt;
  INTO citations_merged&lt;br /&gt;
  FROM citations;&lt;br /&gt;
  --SELECT 38452957&lt;br /&gt;
&lt;br /&gt;
'''patent_2015 schema:'''&lt;br /&gt;
         Column        |  Type   | Modifiers&lt;br /&gt;
  ---------------------+---------+-----------&lt;br /&gt;
   citingpatentnumber  | integer |&lt;br /&gt;
   citingpatentcountry | text    |&lt;br /&gt;
   citedpatentnumber   | text    |&lt;br /&gt;
   citedpatentcountry  | text    |&lt;br /&gt;
&lt;br /&gt;
  SELECT CAST(citingpatentnumber AS bigint), CAST(cleanpatno( citedpatentnumber) AS bigint) as citedpatentnumber&lt;br /&gt;
  INTO citations_merged&lt;br /&gt;
  FROM citations;&lt;br /&gt;
  -- RESULT : SELECT 59227881&lt;br /&gt;
&lt;br /&gt;
'''Overlapping Columns'''&lt;br /&gt;
&lt;br /&gt;
       patent_2015     |  patentdata   |&lt;br /&gt;
  ---------------------+---------------+&lt;br /&gt;
   citingpatentnumber  | patent        |&lt;br /&gt;
   citedpatentnumber   | citation      |&lt;br /&gt;
  &lt;br /&gt;
''' Combined Schema:'''&lt;br /&gt;
&lt;br /&gt;
       Column       |  Type  | Modifiers&lt;br /&gt;
--------------------+--------+-----------&lt;br /&gt;
 citingpatentnumber | bigint |&lt;br /&gt;
 citedpatentnumber  | bigint |&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy Statements:&lt;br /&gt;
&lt;br /&gt;
patentdata:&lt;br /&gt;
  \COPY citations_merged TO '/tmp/merged_citations_export1.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  --COPY 38452957&lt;br /&gt;
&lt;br /&gt;
patent_2015:&lt;br /&gt;
  \COPY citations_merged TO '/tmp/merged_citations_export.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  -- RESULT : COPY 59227881&lt;br /&gt;
&lt;br /&gt;
allpatent:&lt;br /&gt;
  \COPY citations FROM '/tmp/merged_citations_export.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  --RESULT : COPY 59227881&lt;br /&gt;
&lt;br /&gt;
  \COPY citations FROM '/tmp/merged_citations_export1.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
  --RESULT: COPY 38452957&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CLONING:&lt;br /&gt;
CREATE DATABASE allpatentsProcessed WITH TEMPLATE allpatent OWNER researcher;&lt;br /&gt;
&lt;br /&gt;
== USPTO Consolidated Patent Data ==&lt;br /&gt;
&lt;br /&gt;
Scripts:&lt;br /&gt;
&lt;br /&gt;
/* creating patent data tables from : https://bulkdata.uspto.gov/data2/patent/maintenancefee/*/&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE PatentMaintenanceFee(&lt;br /&gt;
patentnumber varchar,&lt;br /&gt;
applicationnumber int,&lt;br /&gt;
smallentity varchar,&lt;br /&gt;
filingdate date,&lt;br /&gt;
grantissuedate date,&lt;br /&gt;
maintenancefeedate date,&lt;br /&gt;
maintenancefeecode varchar&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
\COPY PatentMaintenanceFee FROM '/bulk/USPTO_Consolidated/MaintFeeEvents_20160613.txt' DELIMITER AS E'\t' HEADER NULL AS '' CSV;&lt;br /&gt;
-- RESULT : COPY 14042059&lt;br /&gt;
&lt;br /&gt;
/* creating tables for historical patent data - USPTO */&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE HistoricalPatentData(&lt;br /&gt;
applicationid int,&lt;br /&gt;
pubno varchar,&lt;br /&gt;
patentnumber varchar,&lt;br /&gt;
NBER int,&lt;br /&gt;
USPC varchar,&lt;br /&gt;
USPC_sub varchar,&lt;br /&gt;
applicationdate date,&lt;br /&gt;
prioritydate date,&lt;br /&gt;
pubdate date,&lt;br /&gt;
displaydate date,&lt;br /&gt;
disptype varchar,&lt;br /&gt;
exp_dt date,&lt;br /&gt;
exp_dt_max date,&lt;br /&gt;
pta int&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
\COPY historicalpatentdata FROM '/bulk/USPTO_Consolidated/HistoricalFiles/historical_masterfile.csv' DELIMITER AS ',' HEADER NULL AS '' CSV;&lt;br /&gt;
&lt;br /&gt;
--COPY 11191813&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Bulk_Patent_Assignee_Processing&amp;diff=4298</id>
		<title>Bulk Patent Assignee Processing</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Bulk_Patent_Assignee_Processing&amp;diff=4298"/>
		<updated>2016-07-01T16:07:27Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: /* DTD */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== USPTO Assignees Data ==&lt;br /&gt;
&lt;br /&gt;
We would like to download and absorb data from this location on the USPTO website into our tables. The objective is to determine whether this dataset is better than the current version of our patent data (a combination of the data in the patent_2015 and patentdata databases.&lt;br /&gt;
&lt;br /&gt;
== Steps Followed to Extract the Data ==&lt;br /&gt;
&lt;br /&gt;
===Extracting Data from XML Files ===&lt;br /&gt;
&lt;br /&gt;
All the historical USPTO data is available as XML files. Here is the tree structure for the XML files:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;patent-assignment&amp;gt;&lt;br /&gt;
        +&amp;lt;assignment-record&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignors&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignees&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-properties&amp;gt;&lt;br /&gt;
 &amp;lt;/patent-assignment&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each of the above internal nodes is mandatory, and is a logical grouping of information fields. Each node has a corresponding table created with more or less the same fields as the XML elements.&lt;br /&gt;
&lt;br /&gt;
Corresponding tables are:&lt;br /&gt;
*assignment-records : assignment&lt;br /&gt;
*patent-assignors : assignors&lt;br /&gt;
*patent-assignees : assignees&lt;br /&gt;
*patent-properties : properties&lt;br /&gt;
&lt;br /&gt;
Additionally, for each file that is downloaded, there are some associated specs. All of these are stored in the PatentAssignment table. Here is the data model diagram.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Records ====&lt;br /&gt;
&lt;br /&gt;
The fields in the assignment record are:&lt;br /&gt;
* last_update_date&lt;br /&gt;
* purge_indicator&lt;br /&gt;
* recorded_date&lt;br /&gt;
* correspondent_name&lt;br /&gt;
* correspondent_address_1&lt;br /&gt;
* correspondent_address_2&lt;br /&gt;
* correspondent_address_3&lt;br /&gt;
* correspondent_address_4&lt;br /&gt;
* conveyance_text&lt;br /&gt;
&lt;br /&gt;
Here is the corresponding XML that we are mapping:&lt;br /&gt;
 &lt;br /&gt;
   -&amp;lt;assignment-record&amp;gt;&lt;br /&gt;
       &amp;lt;reel-no&amp;gt;27132&amp;lt;/reel-no&amp;gt;&lt;br /&gt;
       &amp;lt;frame-no&amp;gt;841&amp;lt;/frame-no&amp;gt;&lt;br /&gt;
      -&amp;lt;last-update-date&amp;gt;&lt;br /&gt;
          &amp;lt;date&amp;gt;20160122&amp;lt;/date&amp;gt;&lt;br /&gt;
       &amp;lt;/last-update-date&amp;gt;&lt;br /&gt;
       &amp;lt;purge-indicator&amp;gt;N&amp;lt;/purge-indicator&amp;gt;&lt;br /&gt;
          -&amp;lt;recorded-date&amp;gt;&lt;br /&gt;
              &amp;lt;date&amp;gt;20111027&amp;lt;/date&amp;gt;&lt;br /&gt;
           &amp;lt;/recorded-date&amp;gt;&lt;br /&gt;
         &amp;lt;page-count&amp;gt;2&amp;lt;/page-count&amp;gt;&lt;br /&gt;
      -&amp;lt;correspondent&amp;gt;&lt;br /&gt;
           &amp;lt;name&amp;gt;DOUGLAS B. MCKNIGHT&amp;lt;/name&amp;gt;&lt;br /&gt;
           &amp;lt;address-1&amp;gt;595 MINER ROAD&amp;lt;/address-1&amp;gt;&lt;br /&gt;
           &amp;lt;address-2&amp;gt;INTELLECTUAL PROPERTY &amp;amp; STANDARDS&amp;lt;/address-2&amp;gt;&lt;br /&gt;
           &amp;lt;address-3&amp;gt;CLEVELAND, OH 44143&amp;lt;/address-3&amp;gt;&lt;br /&gt;
        &amp;lt;/correspondent&amp;gt;&lt;br /&gt;
        &amp;lt;conveyance-text&amp;gt;ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS).&amp;lt;/conveyance-text&amp;gt;&lt;br /&gt;
  &amp;lt;/assignment-record&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Assignors ====&lt;br /&gt;
&lt;br /&gt;
Here are the columns in the assignors table:&lt;br /&gt;
* reel_no&lt;br /&gt;
* frame_no&lt;br /&gt;
* assignor_name&lt;br /&gt;
* execution_date&lt;br /&gt;
&lt;br /&gt;
The corresponding XML node is :&lt;br /&gt;
&lt;br /&gt;
 -&amp;lt;patent-assignors&amp;gt;&lt;br /&gt;
    -&amp;lt;patent-assignor&amp;gt;&lt;br /&gt;
       &amp;lt;name&amp;gt;WALKER, MATTHEW J.&amp;lt;/name&amp;gt;&lt;br /&gt;
      -&amp;lt;execution-date&amp;gt;&lt;br /&gt;
          &amp;lt;date&amp;gt;20090512&amp;lt;/date&amp;gt;&lt;br /&gt;
       &amp;lt;/execution-date&amp;gt;&lt;br /&gt;
     &amp;lt;/patent-assignor&amp;gt;&lt;br /&gt;
    -&amp;lt;patent-assignor&amp;gt;&lt;br /&gt;
       &amp;lt;name&amp;gt;OLSZEWSKI, MARK E.&amp;lt;/name&amp;gt;&lt;br /&gt;
      -&amp;lt;execution-date&amp;gt;&lt;br /&gt;
          &amp;lt;date&amp;gt;20090512&amp;lt;/date&amp;gt;&lt;br /&gt;
       &amp;lt;/execution-date&amp;gt;&lt;br /&gt;
     &amp;lt;/patent-assignor&amp;gt;&lt;br /&gt;
   &amp;lt;/patent-assignors&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Assignees ====&lt;br /&gt;
&lt;br /&gt;
Here are the columns in the assignees table:&lt;br /&gt;
&lt;br /&gt;
* reel_no&lt;br /&gt;
* frame_no&lt;br /&gt;
* assignee_name&lt;br /&gt;
* assignee_address_1&lt;br /&gt;
* assignee_address_2&lt;br /&gt;
* assignee_city&lt;br /&gt;
* assignee_state&lt;br /&gt;
* assignee_country&lt;br /&gt;
* assignee_postcode&lt;br /&gt;
&lt;br /&gt;
The corresponding XML nodes are:&lt;br /&gt;
&lt;br /&gt;
  -&amp;lt;patent-assignees&amp;gt;&lt;br /&gt;
    -&amp;lt;patent-assignee&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;KONINKLIJKE PHILIPS ELECTRONICS N V&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;address-1&amp;gt;GROENEWOUDSEWEG 1&amp;lt;/address-1&amp;gt;&lt;br /&gt;
        &amp;lt;city&amp;gt;EINDHOVEN&amp;lt;/city&amp;gt;&lt;br /&gt;
        &amp;lt;country-name&amp;gt;NETHERLANDS&amp;lt;/country-name&amp;gt;&lt;br /&gt;
        &amp;lt;postcode&amp;gt;5621 BA&amp;lt;/postcode&amp;gt;&lt;br /&gt;
      &amp;lt;/patent-assignee&amp;gt;&lt;br /&gt;
    &amp;lt;/patent-assignees&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Patent Properties ====&lt;br /&gt;
&lt;br /&gt;
Here are the columns in the properties table:&lt;br /&gt;
&lt;br /&gt;
* reel_no&lt;br /&gt;
* frame_no&lt;br /&gt;
* documentid&lt;br /&gt;
* country&lt;br /&gt;
* kind&lt;br /&gt;
* filingdate&lt;br /&gt;
* invention_title&lt;br /&gt;
&lt;br /&gt;
The corresponding XML segment would be:&lt;br /&gt;
&lt;br /&gt;
  -&amp;lt;patent-properties&amp;gt;&lt;br /&gt;
    -&amp;lt;patent-property&amp;gt;&lt;br /&gt;
      -&amp;lt;document-id&amp;gt;&lt;br /&gt;
          &amp;lt;country&amp;gt;US&amp;lt;/country&amp;gt;&lt;br /&gt;
          &amp;lt;doc-number&amp;gt;14143589&amp;lt;/doc-number&amp;gt;&lt;br /&gt;
          &amp;lt;kind&amp;gt;X0&amp;lt;/kind&amp;gt;&lt;br /&gt;
          &amp;lt;date&amp;gt;20131230&amp;lt;/date&amp;gt;&lt;br /&gt;
       &amp;lt;/document-id&amp;gt;&lt;br /&gt;
      -&amp;lt;document-id&amp;gt;&lt;br /&gt;
          &amp;lt;country&amp;gt;US&amp;lt;/country&amp;gt;&lt;br /&gt;
          &amp;lt;doc-number&amp;gt;20140260305&amp;lt;/doc-number&amp;gt;&lt;br /&gt;
          &amp;lt;kind&amp;gt;A1&amp;lt;/kind&amp;gt;&lt;br /&gt;
          &amp;lt;date&amp;gt;20140918&amp;lt;/date&amp;gt;&lt;br /&gt;
       &amp;lt;/document-id&amp;gt;&lt;br /&gt;
      &amp;lt;invention-title lang=&amp;quot;en&amp;quot;&amp;gt;LEAN AZIMUTHAL FLAME COMBUSTOR&amp;lt;/invention-title&amp;gt;&lt;br /&gt;
    &amp;lt;/patent-property&amp;gt;&lt;br /&gt;
  &amp;lt;/patent-properties&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Patent properties have a many-to-one relationship : one patent can have more than one properties.&lt;br /&gt;
 Note: We are not sure what documents with kind 'X0' say&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Patent Assignment ====&lt;br /&gt;
&lt;br /&gt;
Every XML file download has some fields associated with it, in addition to a number of patent assignment nodes.&lt;br /&gt;
&lt;br /&gt;
Here are the columns in the table:&lt;br /&gt;
&lt;br /&gt;
* reel_no&lt;br /&gt;
* frame_no&lt;br /&gt;
* action_key_code&lt;br /&gt;
* USPTO_Transaction_Date&lt;br /&gt;
* USPTO_Date_Produced&lt;br /&gt;
* version&lt;br /&gt;
&lt;br /&gt;
Here is what the XML in a downloaded file looks like:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
  &amp;lt;!DOCTYPE us-patent-assignments&amp;gt;&lt;br /&gt;
 -&amp;lt;us-patent-assignments date-produced=&amp;quot;20131101&amp;quot; dtd-version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;action-key-code&amp;gt;DA&amp;lt;/action-key-code&amp;gt;&lt;br /&gt;
    -&amp;lt;transaction-date&amp;gt;&lt;br /&gt;
        &amp;lt;date&amp;gt;20160122&amp;lt;/date&amp;gt;&lt;br /&gt;
     &amp;lt;/transaction-date&amp;gt;&lt;br /&gt;
    -&amp;lt;patent-assignments&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignment&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignment&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignment&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignment&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignment&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignment&amp;gt;&lt;br /&gt;
             .&lt;br /&gt;
             .&lt;br /&gt;
             .&lt;br /&gt;
      &amp;lt;/patent-assignments&amp;gt;&lt;br /&gt;
  &amp;lt;/us-patent-assignments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====DTD====&lt;br /&gt;
Here is the DTD specified by the USPTO, which specifies optional fields and :&lt;br /&gt;
    &lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt; &lt;br /&gt;
 &amp;lt;!DOCTYPE us-patent-assignments [&amp;lt;!ELEMENT us-patent-assignments (action-key-code, transaction-date, patent-assignments)&amp;gt;&lt;br /&gt;
 &amp;lt;!ATTLIST us-patent-assignments  dtd-version   CDATA  #IMPLIED &lt;br /&gt;
 				 date-produced CDATA  #IMPLIED&amp;gt; &lt;br /&gt;
 &amp;lt;!ELEMENT action-key-code (#PCDATA)&amp;gt; &lt;br /&gt;
 &amp;lt;!ELEMENT transaction-date (date)&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT patent-assignments (data-available-code | patent-assignment+)&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT date (#PCDATA)&amp;gt; &lt;br /&gt;
 &amp;lt;!ELEMENT data-available-code (#PCDATA)&amp;gt; &lt;br /&gt;
 &amp;lt;!ELEMENT patent-assignment (assignment-record, patent-assignors, patent-assignees, patent-properties)&amp;gt; &lt;br /&gt;
 &amp;lt;!ELEMENT assignment-record (reel-no, frame-no, last-update-date, purge-indicator, recorded-date, page-count?, correspondent, conveyance-text)&amp;gt; &lt;br /&gt;
 &amp;lt;!ELEMENT patent-assignors (patent-assignor+)&amp;gt; &lt;br /&gt;
 &amp;lt;!ELEMENT patent-assignees (patent-assignee+)&amp;gt; &lt;br /&gt;
 &amp;lt;!ELEMENT patent-properties (patent-property+)&amp;gt; &lt;br /&gt;
 &amp;lt;!ELEMENT reel-no (#PCDATA)&amp;gt; &lt;br /&gt;
 &amp;lt;!ELEMENT frame-no (#PCDATA)&amp;gt; &lt;br /&gt;
 &amp;lt;!ELEMENT last-update-date (date)&amp;gt; &lt;br /&gt;
 &amp;lt;!ELEMENT purge-indicator (#PCDATA)&amp;gt;  &lt;br /&gt;
 &amp;lt;!ELEMENT recorded-date (date)&amp;gt; &lt;br /&gt;
 &amp;lt;!ELEMENT page-count (#PCDATA)&amp;gt; &lt;br /&gt;
 &amp;lt;!ELEMENT correspondent (name, address-1?, address-2?, address-3?, address-4?)&amp;gt; &lt;br /&gt;
 &amp;lt;!ELEMENT conveyance-text (#PCDATA)&amp;gt; &lt;br /&gt;
 &amp;lt;!ELEMENT patent-assignor (name, execution-date?, date-acknowledged?)&amp;gt; &lt;br /&gt;
 &amp;lt;!ELEMENT patent-assignee (name, address-1?, address-2?, city?, state?, country-name?, postcode?)&amp;gt; &lt;br /&gt;
 &amp;lt;!ELEMENT patent-property (document-id*, invention-title?)&amp;gt; &lt;br /&gt;
 &amp;lt;!ELEMENT name (#PCDATA)&amp;gt; &lt;br /&gt;
 &amp;lt;!ATTLIST name name-type (natural | legal)  #IMPLIED&amp;gt; &lt;br /&gt;
 &amp;lt;!ELEMENT address-1 (#PCDATA)&amp;gt; &lt;br /&gt;
 &amp;lt;!ELEMENT address-2 (#PCDATA)&amp;gt; &lt;br /&gt;
 &amp;lt;!ELEMENT address-3 (#PCDATA)&amp;gt; &lt;br /&gt;
 &amp;lt;!ELEMENT address-4 (#PCDATA)&amp;gt; &lt;br /&gt;
 &amp;lt;!ELEMENT execution-date (date)&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT date-acknowledged (date)&amp;gt; &lt;br /&gt;
 &amp;lt;!ELEMENT city (#PCDATA)&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT state (#PCDATA)&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT country-name (#PCDATA)&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT postcode (#PCDATA)&amp;gt; &lt;br /&gt;
 &amp;lt;!ELEMENT document-id (country, doc-number, kind?, name?, date?)&amp;gt; &lt;br /&gt;
 &amp;lt;!ELEMENT invention-title (#PCDATA | b | i | u | sup | sub)*&amp;gt;&lt;br /&gt;
 &amp;lt;!ATTLIST invention-title  id   ID     #IMPLIED &lt;br /&gt;
 			   lang CDATA  #REQUIRED&amp;gt; &lt;br /&gt;
 &amp;lt;!ELEMENT country (#PCDATA)&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT doc-number (#PCDATA)&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT kind (#PCDATA)&amp;gt;&lt;br /&gt;
 &amp;lt;!--bold formatting for text--&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT b (#PCDATA | i | u | smallcaps)*&amp;gt;&lt;br /&gt;
 &amp;lt;!--italic formatting for text--&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT i (#PCDATA | b | u | smallcaps)*&amp;gt;&lt;br /&gt;
 &amp;lt;!--underscore: style - single is default--&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT u (#PCDATA | b | i | smallcaps)*&amp;gt;&lt;br /&gt;
 &amp;lt;!ATTLIST u  style  (single | double | dash | dots )  'single' &amp;gt;&lt;br /&gt;
 &amp;lt;!--superscripted text--&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT sup (#PCDATA | b | u | i)*&amp;gt;&lt;br /&gt;
 &amp;lt;!--subscripted text--&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT sub (#PCDATA | b | u | i)*&amp;gt;&lt;br /&gt;
 &amp;lt;!--small capitals--&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT smallcaps (#PCDATA | b | u | i)*&amp;gt;&lt;br /&gt;
 ]&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Inserting Extracted Data into Tables ===&lt;br /&gt;
&lt;br /&gt;
===Clean Up ===&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Bulk_Patent_Assignee_Processing&amp;diff=4296</id>
		<title>Bulk Patent Assignee Processing</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Bulk_Patent_Assignee_Processing&amp;diff=4296"/>
		<updated>2016-07-01T16:04:42Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: /* DTD */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== USPTO Assignees Data ==&lt;br /&gt;
&lt;br /&gt;
We would like to download and absorb data from this location on the USPTO website into our tables. The objective is to determine whether this dataset is better than the current version of our patent data (a combination of the data in the patent_2015 and patentdata databases.&lt;br /&gt;
&lt;br /&gt;
== Steps Followed to Extract the Data ==&lt;br /&gt;
&lt;br /&gt;
===Extracting Data from XML Files ===&lt;br /&gt;
&lt;br /&gt;
All the historical USPTO data is available as XML files. Here is the tree structure for the XML files:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;patent-assignment&amp;gt;&lt;br /&gt;
        +&amp;lt;assignment-record&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignors&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignees&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-properties&amp;gt;&lt;br /&gt;
 &amp;lt;/patent-assignment&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each of the above internal nodes is mandatory, and is a logical grouping of information fields. Each node has a corresponding table created with more or less the same fields as the XML elements.&lt;br /&gt;
&lt;br /&gt;
Corresponding tables are:&lt;br /&gt;
*assignment-records : assignment&lt;br /&gt;
*patent-assignors : assignors&lt;br /&gt;
*patent-assignees : assignees&lt;br /&gt;
*patent-properties : properties&lt;br /&gt;
&lt;br /&gt;
Additionally, for each file that is downloaded, there are some associated specs. All of these are stored in the PatentAssignment table. Here is the data model diagram.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Records ====&lt;br /&gt;
&lt;br /&gt;
The fields in the assignment record are:&lt;br /&gt;
* last_update_date&lt;br /&gt;
* purge_indicator&lt;br /&gt;
* recorded_date&lt;br /&gt;
* correspondent_name&lt;br /&gt;
* correspondent_address_1&lt;br /&gt;
* correspondent_address_2&lt;br /&gt;
* correspondent_address_3&lt;br /&gt;
* correspondent_address_4&lt;br /&gt;
* conveyance_text&lt;br /&gt;
&lt;br /&gt;
Here is the corresponding XML that we are mapping:&lt;br /&gt;
 &lt;br /&gt;
   -&amp;lt;assignment-record&amp;gt;&lt;br /&gt;
       &amp;lt;reel-no&amp;gt;27132&amp;lt;/reel-no&amp;gt;&lt;br /&gt;
       &amp;lt;frame-no&amp;gt;841&amp;lt;/frame-no&amp;gt;&lt;br /&gt;
      -&amp;lt;last-update-date&amp;gt;&lt;br /&gt;
          &amp;lt;date&amp;gt;20160122&amp;lt;/date&amp;gt;&lt;br /&gt;
       &amp;lt;/last-update-date&amp;gt;&lt;br /&gt;
       &amp;lt;purge-indicator&amp;gt;N&amp;lt;/purge-indicator&amp;gt;&lt;br /&gt;
          -&amp;lt;recorded-date&amp;gt;&lt;br /&gt;
              &amp;lt;date&amp;gt;20111027&amp;lt;/date&amp;gt;&lt;br /&gt;
           &amp;lt;/recorded-date&amp;gt;&lt;br /&gt;
         &amp;lt;page-count&amp;gt;2&amp;lt;/page-count&amp;gt;&lt;br /&gt;
      -&amp;lt;correspondent&amp;gt;&lt;br /&gt;
           &amp;lt;name&amp;gt;DOUGLAS B. MCKNIGHT&amp;lt;/name&amp;gt;&lt;br /&gt;
           &amp;lt;address-1&amp;gt;595 MINER ROAD&amp;lt;/address-1&amp;gt;&lt;br /&gt;
           &amp;lt;address-2&amp;gt;INTELLECTUAL PROPERTY &amp;amp; STANDARDS&amp;lt;/address-2&amp;gt;&lt;br /&gt;
           &amp;lt;address-3&amp;gt;CLEVELAND, OH 44143&amp;lt;/address-3&amp;gt;&lt;br /&gt;
        &amp;lt;/correspondent&amp;gt;&lt;br /&gt;
        &amp;lt;conveyance-text&amp;gt;ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS).&amp;lt;/conveyance-text&amp;gt;&lt;br /&gt;
  &amp;lt;/assignment-record&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Assignors ====&lt;br /&gt;
&lt;br /&gt;
Here are the columns in the assignors table:&lt;br /&gt;
* reel_no&lt;br /&gt;
* frame_no&lt;br /&gt;
* assignor_name&lt;br /&gt;
* execution_date&lt;br /&gt;
&lt;br /&gt;
The corresponding XML node is :&lt;br /&gt;
&lt;br /&gt;
 -&amp;lt;patent-assignors&amp;gt;&lt;br /&gt;
    -&amp;lt;patent-assignor&amp;gt;&lt;br /&gt;
       &amp;lt;name&amp;gt;WALKER, MATTHEW J.&amp;lt;/name&amp;gt;&lt;br /&gt;
      -&amp;lt;execution-date&amp;gt;&lt;br /&gt;
          &amp;lt;date&amp;gt;20090512&amp;lt;/date&amp;gt;&lt;br /&gt;
       &amp;lt;/execution-date&amp;gt;&lt;br /&gt;
     &amp;lt;/patent-assignor&amp;gt;&lt;br /&gt;
    -&amp;lt;patent-assignor&amp;gt;&lt;br /&gt;
       &amp;lt;name&amp;gt;OLSZEWSKI, MARK E.&amp;lt;/name&amp;gt;&lt;br /&gt;
      -&amp;lt;execution-date&amp;gt;&lt;br /&gt;
          &amp;lt;date&amp;gt;20090512&amp;lt;/date&amp;gt;&lt;br /&gt;
       &amp;lt;/execution-date&amp;gt;&lt;br /&gt;
     &amp;lt;/patent-assignor&amp;gt;&lt;br /&gt;
   &amp;lt;/patent-assignors&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Assignees ====&lt;br /&gt;
&lt;br /&gt;
Here are the columns in the assignees table:&lt;br /&gt;
&lt;br /&gt;
* reel_no&lt;br /&gt;
* frame_no&lt;br /&gt;
* assignee_name&lt;br /&gt;
* assignee_address_1&lt;br /&gt;
* assignee_address_2&lt;br /&gt;
* assignee_city&lt;br /&gt;
* assignee_state&lt;br /&gt;
* assignee_country&lt;br /&gt;
* assignee_postcode&lt;br /&gt;
&lt;br /&gt;
The corresponding XML nodes are:&lt;br /&gt;
&lt;br /&gt;
  -&amp;lt;patent-assignees&amp;gt;&lt;br /&gt;
    -&amp;lt;patent-assignee&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;KONINKLIJKE PHILIPS ELECTRONICS N V&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;address-1&amp;gt;GROENEWOUDSEWEG 1&amp;lt;/address-1&amp;gt;&lt;br /&gt;
        &amp;lt;city&amp;gt;EINDHOVEN&amp;lt;/city&amp;gt;&lt;br /&gt;
        &amp;lt;country-name&amp;gt;NETHERLANDS&amp;lt;/country-name&amp;gt;&lt;br /&gt;
        &amp;lt;postcode&amp;gt;5621 BA&amp;lt;/postcode&amp;gt;&lt;br /&gt;
      &amp;lt;/patent-assignee&amp;gt;&lt;br /&gt;
    &amp;lt;/patent-assignees&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Patent Properties ====&lt;br /&gt;
&lt;br /&gt;
Here are the columns in the properties table:&lt;br /&gt;
&lt;br /&gt;
* reel_no&lt;br /&gt;
* frame_no&lt;br /&gt;
* documentid&lt;br /&gt;
* country&lt;br /&gt;
* kind&lt;br /&gt;
* filingdate&lt;br /&gt;
* invention_title&lt;br /&gt;
&lt;br /&gt;
The corresponding XML segment would be:&lt;br /&gt;
&lt;br /&gt;
  -&amp;lt;patent-properties&amp;gt;&lt;br /&gt;
    -&amp;lt;patent-property&amp;gt;&lt;br /&gt;
      -&amp;lt;document-id&amp;gt;&lt;br /&gt;
          &amp;lt;country&amp;gt;US&amp;lt;/country&amp;gt;&lt;br /&gt;
          &amp;lt;doc-number&amp;gt;14143589&amp;lt;/doc-number&amp;gt;&lt;br /&gt;
          &amp;lt;kind&amp;gt;X0&amp;lt;/kind&amp;gt;&lt;br /&gt;
          &amp;lt;date&amp;gt;20131230&amp;lt;/date&amp;gt;&lt;br /&gt;
       &amp;lt;/document-id&amp;gt;&lt;br /&gt;
      -&amp;lt;document-id&amp;gt;&lt;br /&gt;
          &amp;lt;country&amp;gt;US&amp;lt;/country&amp;gt;&lt;br /&gt;
          &amp;lt;doc-number&amp;gt;20140260305&amp;lt;/doc-number&amp;gt;&lt;br /&gt;
          &amp;lt;kind&amp;gt;A1&amp;lt;/kind&amp;gt;&lt;br /&gt;
          &amp;lt;date&amp;gt;20140918&amp;lt;/date&amp;gt;&lt;br /&gt;
       &amp;lt;/document-id&amp;gt;&lt;br /&gt;
      &amp;lt;invention-title lang=&amp;quot;en&amp;quot;&amp;gt;LEAN AZIMUTHAL FLAME COMBUSTOR&amp;lt;/invention-title&amp;gt;&lt;br /&gt;
    &amp;lt;/patent-property&amp;gt;&lt;br /&gt;
  &amp;lt;/patent-properties&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Patent properties have a many-to-one relationship : one patent can have more than one properties.&lt;br /&gt;
 Note: We are not sure what documents with kind 'X0' say&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Patent Assignment ====&lt;br /&gt;
&lt;br /&gt;
Every XML file download has some fields associated with it, in addition to a number of patent assignment nodes.&lt;br /&gt;
&lt;br /&gt;
Here are the columns in the table:&lt;br /&gt;
&lt;br /&gt;
* reel_no&lt;br /&gt;
* frame_no&lt;br /&gt;
* action_key_code&lt;br /&gt;
* USPTO_Transaction_Date&lt;br /&gt;
* USPTO_Date_Produced&lt;br /&gt;
* version&lt;br /&gt;
&lt;br /&gt;
Here is what the XML in a downloaded file looks like:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
  &amp;lt;!DOCTYPE us-patent-assignments&amp;gt;&lt;br /&gt;
 -&amp;lt;us-patent-assignments date-produced=&amp;quot;20131101&amp;quot; dtd-version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;action-key-code&amp;gt;DA&amp;lt;/action-key-code&amp;gt;&lt;br /&gt;
    -&amp;lt;transaction-date&amp;gt;&lt;br /&gt;
        &amp;lt;date&amp;gt;20160122&amp;lt;/date&amp;gt;&lt;br /&gt;
     &amp;lt;/transaction-date&amp;gt;&lt;br /&gt;
    -&amp;lt;patent-assignments&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignment&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignment&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignment&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignment&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignment&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignment&amp;gt;&lt;br /&gt;
             .&lt;br /&gt;
             .&lt;br /&gt;
             .&lt;br /&gt;
      &amp;lt;/patent-assignments&amp;gt;&lt;br /&gt;
  &amp;lt;/us-patent-assignments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====DTD====&lt;br /&gt;
Here is the DTD specified by the USPTO, which specifies optional fields and :&lt;br /&gt;
    &lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt; &lt;br /&gt;
 &amp;lt;!DOCTYPE us-patent-assignments [&amp;lt;!ELEMENT us-patent-assignments (action-key-code, transaction-date, patent-assignments)&amp;gt;&lt;br /&gt;
 &amp;lt;!ATTLIST us-patent-assignments  dtd-version   CDATA  #IMPLIED &lt;br /&gt;
 				 date-produced CDATA  #IMPLIED&amp;gt; &lt;br /&gt;
 &amp;lt;!ELEMENT action-key-code (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT transaction-date (date)&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT patent-assignments (data-available-code | patent-assignment+)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT date (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT data-available-code (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT patent-assignment (assignment-record, patent-assignors, patent-assignees, patent-properties)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT assignment-record (reel-no, frame-no, last-update-date, purge-indicator, recorded-date, page-count?, correspondent, conveyance-text)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT patent-assignors (patent-assignor+)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT patent-assignees (patent-assignee+)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT patent-properties (patent-property+)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT reel-no (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT frame-no (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT last-update-date (date)&amp;gt; &amp;lt;br&amp;gt; &lt;br /&gt;
 &amp;lt;!ELEMENT purge-indicator (#PCDATA)&amp;gt; &amp;lt;br&amp;gt; &lt;br /&gt;
 &amp;lt;!ELEMENT recorded-date (date)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT page-count (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT correspondent (name, address-1?, address-2?, address-3?, address-4?)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT conveyance-text (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT patent-assignor (name, execution-date?, date-acknowledged?)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT patent-assignee (name, address-1?, address-2?, city?, state?, country-name?, postcode?)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT patent-property (document-id*, invention-title?)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT name (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ATTLIST name name-type (natural | legal)  #IMPLIED&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT address-1 (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT address-2 (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT address-3 (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT address-4 (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT execution-date (date)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT date-acknowledged (date)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT city (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT state (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT country-name (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT postcode (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT document-id (country, doc-number, kind?, name?, date?)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT invention-title (#PCDATA | b | i | u | sup | sub)*&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ATTLIST invention-title  id   ID     #IMPLIED &amp;lt;br&amp;gt;&lt;br /&gt;
 			   lang CDATA  #REQUIRED&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT country (#PCDATA)&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT doc-number (#PCDATA)&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT kind (#PCDATA)&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!--bold formatting for text--&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT b (#PCDATA | i | u | smallcaps)*&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!--italic formatting for text--&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT i (#PCDATA | b | u | smallcaps)*&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!--underscore: style - single is default--&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT u (#PCDATA | b | i | smallcaps)*&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ATTLIST u  style  (single | double | dash | dots )  'single' &amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!--superscripted text--&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT sup (#PCDATA | b | u | i)*&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!--subscripted text--&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT sub (#PCDATA | b | u | i)*&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!--small capitals--&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT smallcaps (#PCDATA | b | u | i)*&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 ]&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Inserting Extracted Data into Tables ===&lt;br /&gt;
&lt;br /&gt;
===Clean Up ===&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Bulk_Patent_Assignee_Processing&amp;diff=4295</id>
		<title>Bulk Patent Assignee Processing</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Bulk_Patent_Assignee_Processing&amp;diff=4295"/>
		<updated>2016-07-01T16:04:10Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: /* DTD */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== USPTO Assignees Data ==&lt;br /&gt;
&lt;br /&gt;
We would like to download and absorb data from this location on the USPTO website into our tables. The objective is to determine whether this dataset is better than the current version of our patent data (a combination of the data in the patent_2015 and patentdata databases.&lt;br /&gt;
&lt;br /&gt;
== Steps Followed to Extract the Data ==&lt;br /&gt;
&lt;br /&gt;
===Extracting Data from XML Files ===&lt;br /&gt;
&lt;br /&gt;
All the historical USPTO data is available as XML files. Here is the tree structure for the XML files:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;patent-assignment&amp;gt;&lt;br /&gt;
        +&amp;lt;assignment-record&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignors&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignees&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-properties&amp;gt;&lt;br /&gt;
 &amp;lt;/patent-assignment&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each of the above internal nodes is mandatory, and is a logical grouping of information fields. Each node has a corresponding table created with more or less the same fields as the XML elements.&lt;br /&gt;
&lt;br /&gt;
Corresponding tables are:&lt;br /&gt;
*assignment-records : assignment&lt;br /&gt;
*patent-assignors : assignors&lt;br /&gt;
*patent-assignees : assignees&lt;br /&gt;
*patent-properties : properties&lt;br /&gt;
&lt;br /&gt;
Additionally, for each file that is downloaded, there are some associated specs. All of these are stored in the PatentAssignment table. Here is the data model diagram.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Records ====&lt;br /&gt;
&lt;br /&gt;
The fields in the assignment record are:&lt;br /&gt;
* last_update_date&lt;br /&gt;
* purge_indicator&lt;br /&gt;
* recorded_date&lt;br /&gt;
* correspondent_name&lt;br /&gt;
* correspondent_address_1&lt;br /&gt;
* correspondent_address_2&lt;br /&gt;
* correspondent_address_3&lt;br /&gt;
* correspondent_address_4&lt;br /&gt;
* conveyance_text&lt;br /&gt;
&lt;br /&gt;
Here is the corresponding XML that we are mapping:&lt;br /&gt;
 &lt;br /&gt;
   -&amp;lt;assignment-record&amp;gt;&lt;br /&gt;
       &amp;lt;reel-no&amp;gt;27132&amp;lt;/reel-no&amp;gt;&lt;br /&gt;
       &amp;lt;frame-no&amp;gt;841&amp;lt;/frame-no&amp;gt;&lt;br /&gt;
      -&amp;lt;last-update-date&amp;gt;&lt;br /&gt;
          &amp;lt;date&amp;gt;20160122&amp;lt;/date&amp;gt;&lt;br /&gt;
       &amp;lt;/last-update-date&amp;gt;&lt;br /&gt;
       &amp;lt;purge-indicator&amp;gt;N&amp;lt;/purge-indicator&amp;gt;&lt;br /&gt;
          -&amp;lt;recorded-date&amp;gt;&lt;br /&gt;
              &amp;lt;date&amp;gt;20111027&amp;lt;/date&amp;gt;&lt;br /&gt;
           &amp;lt;/recorded-date&amp;gt;&lt;br /&gt;
         &amp;lt;page-count&amp;gt;2&amp;lt;/page-count&amp;gt;&lt;br /&gt;
      -&amp;lt;correspondent&amp;gt;&lt;br /&gt;
           &amp;lt;name&amp;gt;DOUGLAS B. MCKNIGHT&amp;lt;/name&amp;gt;&lt;br /&gt;
           &amp;lt;address-1&amp;gt;595 MINER ROAD&amp;lt;/address-1&amp;gt;&lt;br /&gt;
           &amp;lt;address-2&amp;gt;INTELLECTUAL PROPERTY &amp;amp; STANDARDS&amp;lt;/address-2&amp;gt;&lt;br /&gt;
           &amp;lt;address-3&amp;gt;CLEVELAND, OH 44143&amp;lt;/address-3&amp;gt;&lt;br /&gt;
        &amp;lt;/correspondent&amp;gt;&lt;br /&gt;
        &amp;lt;conveyance-text&amp;gt;ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS).&amp;lt;/conveyance-text&amp;gt;&lt;br /&gt;
  &amp;lt;/assignment-record&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Assignors ====&lt;br /&gt;
&lt;br /&gt;
Here are the columns in the assignors table:&lt;br /&gt;
* reel_no&lt;br /&gt;
* frame_no&lt;br /&gt;
* assignor_name&lt;br /&gt;
* execution_date&lt;br /&gt;
&lt;br /&gt;
The corresponding XML node is :&lt;br /&gt;
&lt;br /&gt;
 -&amp;lt;patent-assignors&amp;gt;&lt;br /&gt;
    -&amp;lt;patent-assignor&amp;gt;&lt;br /&gt;
       &amp;lt;name&amp;gt;WALKER, MATTHEW J.&amp;lt;/name&amp;gt;&lt;br /&gt;
      -&amp;lt;execution-date&amp;gt;&lt;br /&gt;
          &amp;lt;date&amp;gt;20090512&amp;lt;/date&amp;gt;&lt;br /&gt;
       &amp;lt;/execution-date&amp;gt;&lt;br /&gt;
     &amp;lt;/patent-assignor&amp;gt;&lt;br /&gt;
    -&amp;lt;patent-assignor&amp;gt;&lt;br /&gt;
       &amp;lt;name&amp;gt;OLSZEWSKI, MARK E.&amp;lt;/name&amp;gt;&lt;br /&gt;
      -&amp;lt;execution-date&amp;gt;&lt;br /&gt;
          &amp;lt;date&amp;gt;20090512&amp;lt;/date&amp;gt;&lt;br /&gt;
       &amp;lt;/execution-date&amp;gt;&lt;br /&gt;
     &amp;lt;/patent-assignor&amp;gt;&lt;br /&gt;
   &amp;lt;/patent-assignors&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Assignees ====&lt;br /&gt;
&lt;br /&gt;
Here are the columns in the assignees table:&lt;br /&gt;
&lt;br /&gt;
* reel_no&lt;br /&gt;
* frame_no&lt;br /&gt;
* assignee_name&lt;br /&gt;
* assignee_address_1&lt;br /&gt;
* assignee_address_2&lt;br /&gt;
* assignee_city&lt;br /&gt;
* assignee_state&lt;br /&gt;
* assignee_country&lt;br /&gt;
* assignee_postcode&lt;br /&gt;
&lt;br /&gt;
The corresponding XML nodes are:&lt;br /&gt;
&lt;br /&gt;
  -&amp;lt;patent-assignees&amp;gt;&lt;br /&gt;
    -&amp;lt;patent-assignee&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;KONINKLIJKE PHILIPS ELECTRONICS N V&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;address-1&amp;gt;GROENEWOUDSEWEG 1&amp;lt;/address-1&amp;gt;&lt;br /&gt;
        &amp;lt;city&amp;gt;EINDHOVEN&amp;lt;/city&amp;gt;&lt;br /&gt;
        &amp;lt;country-name&amp;gt;NETHERLANDS&amp;lt;/country-name&amp;gt;&lt;br /&gt;
        &amp;lt;postcode&amp;gt;5621 BA&amp;lt;/postcode&amp;gt;&lt;br /&gt;
      &amp;lt;/patent-assignee&amp;gt;&lt;br /&gt;
    &amp;lt;/patent-assignees&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Patent Properties ====&lt;br /&gt;
&lt;br /&gt;
Here are the columns in the properties table:&lt;br /&gt;
&lt;br /&gt;
* reel_no&lt;br /&gt;
* frame_no&lt;br /&gt;
* documentid&lt;br /&gt;
* country&lt;br /&gt;
* kind&lt;br /&gt;
* filingdate&lt;br /&gt;
* invention_title&lt;br /&gt;
&lt;br /&gt;
The corresponding XML segment would be:&lt;br /&gt;
&lt;br /&gt;
  -&amp;lt;patent-properties&amp;gt;&lt;br /&gt;
    -&amp;lt;patent-property&amp;gt;&lt;br /&gt;
      -&amp;lt;document-id&amp;gt;&lt;br /&gt;
          &amp;lt;country&amp;gt;US&amp;lt;/country&amp;gt;&lt;br /&gt;
          &amp;lt;doc-number&amp;gt;14143589&amp;lt;/doc-number&amp;gt;&lt;br /&gt;
          &amp;lt;kind&amp;gt;X0&amp;lt;/kind&amp;gt;&lt;br /&gt;
          &amp;lt;date&amp;gt;20131230&amp;lt;/date&amp;gt;&lt;br /&gt;
       &amp;lt;/document-id&amp;gt;&lt;br /&gt;
      -&amp;lt;document-id&amp;gt;&lt;br /&gt;
          &amp;lt;country&amp;gt;US&amp;lt;/country&amp;gt;&lt;br /&gt;
          &amp;lt;doc-number&amp;gt;20140260305&amp;lt;/doc-number&amp;gt;&lt;br /&gt;
          &amp;lt;kind&amp;gt;A1&amp;lt;/kind&amp;gt;&lt;br /&gt;
          &amp;lt;date&amp;gt;20140918&amp;lt;/date&amp;gt;&lt;br /&gt;
       &amp;lt;/document-id&amp;gt;&lt;br /&gt;
      &amp;lt;invention-title lang=&amp;quot;en&amp;quot;&amp;gt;LEAN AZIMUTHAL FLAME COMBUSTOR&amp;lt;/invention-title&amp;gt;&lt;br /&gt;
    &amp;lt;/patent-property&amp;gt;&lt;br /&gt;
  &amp;lt;/patent-properties&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Patent properties have a many-to-one relationship : one patent can have more than one properties.&lt;br /&gt;
 Note: We are not sure what documents with kind 'X0' say&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Patent Assignment ====&lt;br /&gt;
&lt;br /&gt;
Every XML file download has some fields associated with it, in addition to a number of patent assignment nodes.&lt;br /&gt;
&lt;br /&gt;
Here are the columns in the table:&lt;br /&gt;
&lt;br /&gt;
* reel_no&lt;br /&gt;
* frame_no&lt;br /&gt;
* action_key_code&lt;br /&gt;
* USPTO_Transaction_Date&lt;br /&gt;
* USPTO_Date_Produced&lt;br /&gt;
* version&lt;br /&gt;
&lt;br /&gt;
Here is what the XML in a downloaded file looks like:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
  &amp;lt;!DOCTYPE us-patent-assignments&amp;gt;&lt;br /&gt;
 -&amp;lt;us-patent-assignments date-produced=&amp;quot;20131101&amp;quot; dtd-version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;action-key-code&amp;gt;DA&amp;lt;/action-key-code&amp;gt;&lt;br /&gt;
    -&amp;lt;transaction-date&amp;gt;&lt;br /&gt;
        &amp;lt;date&amp;gt;20160122&amp;lt;/date&amp;gt;&lt;br /&gt;
     &amp;lt;/transaction-date&amp;gt;&lt;br /&gt;
    -&amp;lt;patent-assignments&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignment&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignment&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignment&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignment&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignment&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignment&amp;gt;&lt;br /&gt;
             .&lt;br /&gt;
             .&lt;br /&gt;
             .&lt;br /&gt;
      &amp;lt;/patent-assignments&amp;gt;&lt;br /&gt;
  &amp;lt;/us-patent-assignments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====DTD====&lt;br /&gt;
Here is the DTD specified by the USPTO, which specifies optional fields and :&lt;br /&gt;
    &lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE us-patent-assignments [&amp;lt;!ELEMENT us-patent-assignments (action-key-code, transaction-date, patent-assignments)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ATTLIST us-patent-assignments  dtd-version   CDATA  #IMPLIED &amp;lt;br&amp;gt;&lt;br /&gt;
 				 date-produced CDATA  #IMPLIED&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT action-key-code (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT transaction-date (date)&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT patent-assignments (data-available-code | patent-assignment+)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT date (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT data-available-code (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT patent-assignment (assignment-record, patent-assignors, patent-assignees, patent-properties)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT assignment-record (reel-no, frame-no, last-update-date, purge-indicator, recorded-date, page-count?, correspondent, conveyance-text)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT patent-assignors (patent-assignor+)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT patent-assignees (patent-assignee+)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT patent-properties (patent-property+)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT reel-no (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT frame-no (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT last-update-date (date)&amp;gt; &amp;lt;br&amp;gt; &lt;br /&gt;
 &amp;lt;!ELEMENT purge-indicator (#PCDATA)&amp;gt; &amp;lt;br&amp;gt; &lt;br /&gt;
 &amp;lt;!ELEMENT recorded-date (date)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT page-count (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT correspondent (name, address-1?, address-2?, address-3?, address-4?)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT conveyance-text (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT patent-assignor (name, execution-date?, date-acknowledged?)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT patent-assignee (name, address-1?, address-2?, city?, state?, country-name?, postcode?)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT patent-property (document-id*, invention-title?)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT name (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ATTLIST name name-type (natural | legal)  #IMPLIED&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT address-1 (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT address-2 (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT address-3 (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT address-4 (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT execution-date (date)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT date-acknowledged (date)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT city (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT state (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT country-name (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT postcode (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT document-id (country, doc-number, kind?, name?, date?)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT invention-title (#PCDATA | b | i | u | sup | sub)*&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ATTLIST invention-title  id   ID     #IMPLIED &amp;lt;br&amp;gt;&lt;br /&gt;
 			   lang CDATA  #REQUIRED&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT country (#PCDATA)&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT doc-number (#PCDATA)&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT kind (#PCDATA)&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!--bold formatting for text--&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT b (#PCDATA | i | u | smallcaps)*&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!--italic formatting for text--&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT i (#PCDATA | b | u | smallcaps)*&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!--underscore: style - single is default--&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT u (#PCDATA | b | i | smallcaps)*&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ATTLIST u  style  (single | double | dash | dots )  'single' &amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!--superscripted text--&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT sup (#PCDATA | b | u | i)*&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!--subscripted text--&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT sub (#PCDATA | b | u | i)*&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!--small capitals--&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT smallcaps (#PCDATA | b | u | i)*&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 ]&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Inserting Extracted Data into Tables ===&lt;br /&gt;
&lt;br /&gt;
===Clean Up ===&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Bulk_Patent_Assignee_Processing&amp;diff=4290</id>
		<title>Bulk Patent Assignee Processing</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Bulk_Patent_Assignee_Processing&amp;diff=4290"/>
		<updated>2016-07-01T16:02:06Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: /* DTD */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== USPTO Assignees Data ==&lt;br /&gt;
&lt;br /&gt;
We would like to download and absorb data from this location on the USPTO website into our tables. The objective is to determine whether this dataset is better than the current version of our patent data (a combination of the data in the patent_2015 and patentdata databases.&lt;br /&gt;
&lt;br /&gt;
== Steps Followed to Extract the Data ==&lt;br /&gt;
&lt;br /&gt;
===Extracting Data from XML Files ===&lt;br /&gt;
&lt;br /&gt;
All the historical USPTO data is available as XML files. Here is the tree structure for the XML files:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;patent-assignment&amp;gt;&lt;br /&gt;
        +&amp;lt;assignment-record&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignors&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignees&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-properties&amp;gt;&lt;br /&gt;
 &amp;lt;/patent-assignment&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each of the above internal nodes is mandatory, and is a logical grouping of information fields. Each node has a corresponding table created with more or less the same fields as the XML elements.&lt;br /&gt;
&lt;br /&gt;
Corresponding tables are:&lt;br /&gt;
*assignment-records : assignment&lt;br /&gt;
*patent-assignors : assignors&lt;br /&gt;
*patent-assignees : assignees&lt;br /&gt;
*patent-properties : properties&lt;br /&gt;
&lt;br /&gt;
Additionally, for each file that is downloaded, there are some associated specs. All of these are stored in the PatentAssignment table. Here is the data model diagram.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Records ====&lt;br /&gt;
&lt;br /&gt;
The fields in the assignment record are:&lt;br /&gt;
* last_update_date&lt;br /&gt;
* purge_indicator&lt;br /&gt;
* recorded_date&lt;br /&gt;
* correspondent_name&lt;br /&gt;
* correspondent_address_1&lt;br /&gt;
* correspondent_address_2&lt;br /&gt;
* correspondent_address_3&lt;br /&gt;
* correspondent_address_4&lt;br /&gt;
* conveyance_text&lt;br /&gt;
&lt;br /&gt;
Here is the corresponding XML that we are mapping:&lt;br /&gt;
 &lt;br /&gt;
   -&amp;lt;assignment-record&amp;gt;&lt;br /&gt;
       &amp;lt;reel-no&amp;gt;27132&amp;lt;/reel-no&amp;gt;&lt;br /&gt;
       &amp;lt;frame-no&amp;gt;841&amp;lt;/frame-no&amp;gt;&lt;br /&gt;
      -&amp;lt;last-update-date&amp;gt;&lt;br /&gt;
          &amp;lt;date&amp;gt;20160122&amp;lt;/date&amp;gt;&lt;br /&gt;
       &amp;lt;/last-update-date&amp;gt;&lt;br /&gt;
       &amp;lt;purge-indicator&amp;gt;N&amp;lt;/purge-indicator&amp;gt;&lt;br /&gt;
          -&amp;lt;recorded-date&amp;gt;&lt;br /&gt;
              &amp;lt;date&amp;gt;20111027&amp;lt;/date&amp;gt;&lt;br /&gt;
           &amp;lt;/recorded-date&amp;gt;&lt;br /&gt;
         &amp;lt;page-count&amp;gt;2&amp;lt;/page-count&amp;gt;&lt;br /&gt;
      -&amp;lt;correspondent&amp;gt;&lt;br /&gt;
           &amp;lt;name&amp;gt;DOUGLAS B. MCKNIGHT&amp;lt;/name&amp;gt;&lt;br /&gt;
           &amp;lt;address-1&amp;gt;595 MINER ROAD&amp;lt;/address-1&amp;gt;&lt;br /&gt;
           &amp;lt;address-2&amp;gt;INTELLECTUAL PROPERTY &amp;amp; STANDARDS&amp;lt;/address-2&amp;gt;&lt;br /&gt;
           &amp;lt;address-3&amp;gt;CLEVELAND, OH 44143&amp;lt;/address-3&amp;gt;&lt;br /&gt;
        &amp;lt;/correspondent&amp;gt;&lt;br /&gt;
        &amp;lt;conveyance-text&amp;gt;ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS).&amp;lt;/conveyance-text&amp;gt;&lt;br /&gt;
  &amp;lt;/assignment-record&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Assignors ====&lt;br /&gt;
&lt;br /&gt;
Here are the columns in the assignors table:&lt;br /&gt;
* reel_no&lt;br /&gt;
* frame_no&lt;br /&gt;
* assignor_name&lt;br /&gt;
* execution_date&lt;br /&gt;
&lt;br /&gt;
The corresponding XML node is :&lt;br /&gt;
&lt;br /&gt;
 -&amp;lt;patent-assignors&amp;gt;&lt;br /&gt;
    -&amp;lt;patent-assignor&amp;gt;&lt;br /&gt;
       &amp;lt;name&amp;gt;WALKER, MATTHEW J.&amp;lt;/name&amp;gt;&lt;br /&gt;
      -&amp;lt;execution-date&amp;gt;&lt;br /&gt;
          &amp;lt;date&amp;gt;20090512&amp;lt;/date&amp;gt;&lt;br /&gt;
       &amp;lt;/execution-date&amp;gt;&lt;br /&gt;
     &amp;lt;/patent-assignor&amp;gt;&lt;br /&gt;
    -&amp;lt;patent-assignor&amp;gt;&lt;br /&gt;
       &amp;lt;name&amp;gt;OLSZEWSKI, MARK E.&amp;lt;/name&amp;gt;&lt;br /&gt;
      -&amp;lt;execution-date&amp;gt;&lt;br /&gt;
          &amp;lt;date&amp;gt;20090512&amp;lt;/date&amp;gt;&lt;br /&gt;
       &amp;lt;/execution-date&amp;gt;&lt;br /&gt;
     &amp;lt;/patent-assignor&amp;gt;&lt;br /&gt;
   &amp;lt;/patent-assignors&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Assignees ====&lt;br /&gt;
&lt;br /&gt;
Here are the columns in the assignees table:&lt;br /&gt;
&lt;br /&gt;
* reel_no&lt;br /&gt;
* frame_no&lt;br /&gt;
* assignee_name&lt;br /&gt;
* assignee_address_1&lt;br /&gt;
* assignee_address_2&lt;br /&gt;
* assignee_city&lt;br /&gt;
* assignee_state&lt;br /&gt;
* assignee_country&lt;br /&gt;
* assignee_postcode&lt;br /&gt;
&lt;br /&gt;
The corresponding XML nodes are:&lt;br /&gt;
&lt;br /&gt;
  -&amp;lt;patent-assignees&amp;gt;&lt;br /&gt;
    -&amp;lt;patent-assignee&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;KONINKLIJKE PHILIPS ELECTRONICS N V&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;address-1&amp;gt;GROENEWOUDSEWEG 1&amp;lt;/address-1&amp;gt;&lt;br /&gt;
        &amp;lt;city&amp;gt;EINDHOVEN&amp;lt;/city&amp;gt;&lt;br /&gt;
        &amp;lt;country-name&amp;gt;NETHERLANDS&amp;lt;/country-name&amp;gt;&lt;br /&gt;
        &amp;lt;postcode&amp;gt;5621 BA&amp;lt;/postcode&amp;gt;&lt;br /&gt;
      &amp;lt;/patent-assignee&amp;gt;&lt;br /&gt;
    &amp;lt;/patent-assignees&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Patent Properties ====&lt;br /&gt;
&lt;br /&gt;
Here are the columns in the properties table:&lt;br /&gt;
&lt;br /&gt;
* reel_no&lt;br /&gt;
* frame_no&lt;br /&gt;
* documentid&lt;br /&gt;
* country&lt;br /&gt;
* kind&lt;br /&gt;
* filingdate&lt;br /&gt;
* invention_title&lt;br /&gt;
&lt;br /&gt;
The corresponding XML segment would be:&lt;br /&gt;
&lt;br /&gt;
  -&amp;lt;patent-properties&amp;gt;&lt;br /&gt;
    -&amp;lt;patent-property&amp;gt;&lt;br /&gt;
      -&amp;lt;document-id&amp;gt;&lt;br /&gt;
          &amp;lt;country&amp;gt;US&amp;lt;/country&amp;gt;&lt;br /&gt;
          &amp;lt;doc-number&amp;gt;14143589&amp;lt;/doc-number&amp;gt;&lt;br /&gt;
          &amp;lt;kind&amp;gt;X0&amp;lt;/kind&amp;gt;&lt;br /&gt;
          &amp;lt;date&amp;gt;20131230&amp;lt;/date&amp;gt;&lt;br /&gt;
       &amp;lt;/document-id&amp;gt;&lt;br /&gt;
      -&amp;lt;document-id&amp;gt;&lt;br /&gt;
          &amp;lt;country&amp;gt;US&amp;lt;/country&amp;gt;&lt;br /&gt;
          &amp;lt;doc-number&amp;gt;20140260305&amp;lt;/doc-number&amp;gt;&lt;br /&gt;
          &amp;lt;kind&amp;gt;A1&amp;lt;/kind&amp;gt;&lt;br /&gt;
          &amp;lt;date&amp;gt;20140918&amp;lt;/date&amp;gt;&lt;br /&gt;
       &amp;lt;/document-id&amp;gt;&lt;br /&gt;
      &amp;lt;invention-title lang=&amp;quot;en&amp;quot;&amp;gt;LEAN AZIMUTHAL FLAME COMBUSTOR&amp;lt;/invention-title&amp;gt;&lt;br /&gt;
    &amp;lt;/patent-property&amp;gt;&lt;br /&gt;
  &amp;lt;/patent-properties&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Patent properties have a many-to-one relationship : one patent can have more than one properties.&lt;br /&gt;
 Note: We are not sure what documents with kind 'X0' say&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Patent Assignment ====&lt;br /&gt;
&lt;br /&gt;
Every XML file download has some fields associated with it, in addition to a number of patent assignment nodes.&lt;br /&gt;
&lt;br /&gt;
Here are the columns in the table:&lt;br /&gt;
&lt;br /&gt;
* reel_no&lt;br /&gt;
* frame_no&lt;br /&gt;
* action_key_code&lt;br /&gt;
* USPTO_Transaction_Date&lt;br /&gt;
* USPTO_Date_Produced&lt;br /&gt;
* version&lt;br /&gt;
&lt;br /&gt;
Here is what the XML in a downloaded file looks like:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
  &amp;lt;!DOCTYPE us-patent-assignments&amp;gt;&lt;br /&gt;
 -&amp;lt;us-patent-assignments date-produced=&amp;quot;20131101&amp;quot; dtd-version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;action-key-code&amp;gt;DA&amp;lt;/action-key-code&amp;gt;&lt;br /&gt;
    -&amp;lt;transaction-date&amp;gt;&lt;br /&gt;
        &amp;lt;date&amp;gt;20160122&amp;lt;/date&amp;gt;&lt;br /&gt;
     &amp;lt;/transaction-date&amp;gt;&lt;br /&gt;
    -&amp;lt;patent-assignments&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignment&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignment&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignment&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignment&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignment&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignment&amp;gt;&lt;br /&gt;
             .&lt;br /&gt;
             .&lt;br /&gt;
             .&lt;br /&gt;
      &amp;lt;/patent-assignments&amp;gt;&lt;br /&gt;
  &amp;lt;/us-patent-assignments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====DTD====&lt;br /&gt;
Here is the DTD specified by the USPTO, which specifies optional fields and :&lt;br /&gt;
    &lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE us-patent-assignments [&amp;lt;!ELEMENT us-patent-assignments (action-key-code, transaction-date, patent-assignments)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ATTLIST us-patent-assignments  dtd-version   CDATA  #IMPLIED &amp;lt;br&amp;gt;&lt;br /&gt;
 				 date-produced CDATA  #IMPLIED&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT action-key-code (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;!ELEMENT transaction-date (date)&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT patent-assignments (data-available-code | patent-assignment+)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT date (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT data-available-code (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT patent-assignment (assignment-record, patent-assignors, patent-assignees, patent-properties)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT assignment-record (reel-no, frame-no, last-update-date, purge-indicator, recorded-date, page-count?, correspondent, conveyance-text)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT patent-assignors (patent-assignor+)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT patent-assignees (patent-assignee+)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT patent-properties (patent-property+)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT reel-no (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT frame-no (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT last-update-date (date)&amp;gt; &amp;lt;br&amp;gt; &lt;br /&gt;
	&amp;lt;!ELEMENT purge-indicator (#PCDATA)&amp;gt; &amp;lt;br&amp;gt; &lt;br /&gt;
	&amp;lt;!ELEMENT recorded-date (date)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT page-count (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT correspondent (name, address-1?, address-2?, address-3?, address-4?)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT conveyance-text (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT patent-assignor (name, execution-date?, date-acknowledged?)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT patent-assignee (name, address-1?, address-2?, city?, state?, country-name?, postcode?)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT patent-property (document-id*, invention-title?)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT name (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ATTLIST name name-type (natural | legal)  #IMPLIED&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT address-1 (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT address-2 (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT address-3 (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT address-4 (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT execution-date (date)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT date-acknowledged (date)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT city (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT state (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT country-name (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT postcode (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT document-id (country, doc-number, kind?, name?, date?)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT invention-title (#PCDATA | b | i | u | sup | sub)*&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ATTLIST invention-title  id   ID     #IMPLIED &amp;lt;br&amp;gt;&lt;br /&gt;
				   lang CDATA  #REQUIRED&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT country (#PCDATA)&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT doc-number (#PCDATA)&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT kind (#PCDATA)&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!--bold formatting for text--&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT b (#PCDATA | i | u | smallcaps)*&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!--italic formatting for text--&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT i (#PCDATA | b | u | smallcaps)*&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!--underscore: style - single is default--&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT u (#PCDATA | b | i | smallcaps)*&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ATTLIST u  style  (single | double | dash | dots )  'single' &amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!--superscripted text--&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT sup (#PCDATA | b | u | i)*&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!--subscripted text--&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT sub (#PCDATA | b | u | i)*&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!--small capitals--&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT smallcaps (#PCDATA | b | u | i)*&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
	]&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Inserting Extracted Data into Tables ===&lt;br /&gt;
&lt;br /&gt;
===Clean Up ===&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Bulk_Patent_Assignee_Processing&amp;diff=4289</id>
		<title>Bulk Patent Assignee Processing</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Bulk_Patent_Assignee_Processing&amp;diff=4289"/>
		<updated>2016-07-01T16:00:57Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: /* DTD */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== USPTO Assignees Data ==&lt;br /&gt;
&lt;br /&gt;
We would like to download and absorb data from this location on the USPTO website into our tables. The objective is to determine whether this dataset is better than the current version of our patent data (a combination of the data in the patent_2015 and patentdata databases.&lt;br /&gt;
&lt;br /&gt;
== Steps Followed to Extract the Data ==&lt;br /&gt;
&lt;br /&gt;
===Extracting Data from XML Files ===&lt;br /&gt;
&lt;br /&gt;
All the historical USPTO data is available as XML files. Here is the tree structure for the XML files:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;patent-assignment&amp;gt;&lt;br /&gt;
        +&amp;lt;assignment-record&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignors&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignees&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-properties&amp;gt;&lt;br /&gt;
 &amp;lt;/patent-assignment&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each of the above internal nodes is mandatory, and is a logical grouping of information fields. Each node has a corresponding table created with more or less the same fields as the XML elements.&lt;br /&gt;
&lt;br /&gt;
Corresponding tables are:&lt;br /&gt;
*assignment-records : assignment&lt;br /&gt;
*patent-assignors : assignors&lt;br /&gt;
*patent-assignees : assignees&lt;br /&gt;
*patent-properties : properties&lt;br /&gt;
&lt;br /&gt;
Additionally, for each file that is downloaded, there are some associated specs. All of these are stored in the PatentAssignment table. Here is the data model diagram.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Records ====&lt;br /&gt;
&lt;br /&gt;
The fields in the assignment record are:&lt;br /&gt;
* last_update_date&lt;br /&gt;
* purge_indicator&lt;br /&gt;
* recorded_date&lt;br /&gt;
* correspondent_name&lt;br /&gt;
* correspondent_address_1&lt;br /&gt;
* correspondent_address_2&lt;br /&gt;
* correspondent_address_3&lt;br /&gt;
* correspondent_address_4&lt;br /&gt;
* conveyance_text&lt;br /&gt;
&lt;br /&gt;
Here is the corresponding XML that we are mapping:&lt;br /&gt;
 &lt;br /&gt;
   -&amp;lt;assignment-record&amp;gt;&lt;br /&gt;
       &amp;lt;reel-no&amp;gt;27132&amp;lt;/reel-no&amp;gt;&lt;br /&gt;
       &amp;lt;frame-no&amp;gt;841&amp;lt;/frame-no&amp;gt;&lt;br /&gt;
      -&amp;lt;last-update-date&amp;gt;&lt;br /&gt;
          &amp;lt;date&amp;gt;20160122&amp;lt;/date&amp;gt;&lt;br /&gt;
       &amp;lt;/last-update-date&amp;gt;&lt;br /&gt;
       &amp;lt;purge-indicator&amp;gt;N&amp;lt;/purge-indicator&amp;gt;&lt;br /&gt;
          -&amp;lt;recorded-date&amp;gt;&lt;br /&gt;
              &amp;lt;date&amp;gt;20111027&amp;lt;/date&amp;gt;&lt;br /&gt;
           &amp;lt;/recorded-date&amp;gt;&lt;br /&gt;
         &amp;lt;page-count&amp;gt;2&amp;lt;/page-count&amp;gt;&lt;br /&gt;
      -&amp;lt;correspondent&amp;gt;&lt;br /&gt;
           &amp;lt;name&amp;gt;DOUGLAS B. MCKNIGHT&amp;lt;/name&amp;gt;&lt;br /&gt;
           &amp;lt;address-1&amp;gt;595 MINER ROAD&amp;lt;/address-1&amp;gt;&lt;br /&gt;
           &amp;lt;address-2&amp;gt;INTELLECTUAL PROPERTY &amp;amp; STANDARDS&amp;lt;/address-2&amp;gt;&lt;br /&gt;
           &amp;lt;address-3&amp;gt;CLEVELAND, OH 44143&amp;lt;/address-3&amp;gt;&lt;br /&gt;
        &amp;lt;/correspondent&amp;gt;&lt;br /&gt;
        &amp;lt;conveyance-text&amp;gt;ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS).&amp;lt;/conveyance-text&amp;gt;&lt;br /&gt;
  &amp;lt;/assignment-record&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Assignors ====&lt;br /&gt;
&lt;br /&gt;
Here are the columns in the assignors table:&lt;br /&gt;
* reel_no&lt;br /&gt;
* frame_no&lt;br /&gt;
* assignor_name&lt;br /&gt;
* execution_date&lt;br /&gt;
&lt;br /&gt;
The corresponding XML node is :&lt;br /&gt;
&lt;br /&gt;
 -&amp;lt;patent-assignors&amp;gt;&lt;br /&gt;
    -&amp;lt;patent-assignor&amp;gt;&lt;br /&gt;
       &amp;lt;name&amp;gt;WALKER, MATTHEW J.&amp;lt;/name&amp;gt;&lt;br /&gt;
      -&amp;lt;execution-date&amp;gt;&lt;br /&gt;
          &amp;lt;date&amp;gt;20090512&amp;lt;/date&amp;gt;&lt;br /&gt;
       &amp;lt;/execution-date&amp;gt;&lt;br /&gt;
     &amp;lt;/patent-assignor&amp;gt;&lt;br /&gt;
    -&amp;lt;patent-assignor&amp;gt;&lt;br /&gt;
       &amp;lt;name&amp;gt;OLSZEWSKI, MARK E.&amp;lt;/name&amp;gt;&lt;br /&gt;
      -&amp;lt;execution-date&amp;gt;&lt;br /&gt;
          &amp;lt;date&amp;gt;20090512&amp;lt;/date&amp;gt;&lt;br /&gt;
       &amp;lt;/execution-date&amp;gt;&lt;br /&gt;
     &amp;lt;/patent-assignor&amp;gt;&lt;br /&gt;
   &amp;lt;/patent-assignors&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Assignees ====&lt;br /&gt;
&lt;br /&gt;
Here are the columns in the assignees table:&lt;br /&gt;
&lt;br /&gt;
* reel_no&lt;br /&gt;
* frame_no&lt;br /&gt;
* assignee_name&lt;br /&gt;
* assignee_address_1&lt;br /&gt;
* assignee_address_2&lt;br /&gt;
* assignee_city&lt;br /&gt;
* assignee_state&lt;br /&gt;
* assignee_country&lt;br /&gt;
* assignee_postcode&lt;br /&gt;
&lt;br /&gt;
The corresponding XML nodes are:&lt;br /&gt;
&lt;br /&gt;
  -&amp;lt;patent-assignees&amp;gt;&lt;br /&gt;
    -&amp;lt;patent-assignee&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;KONINKLIJKE PHILIPS ELECTRONICS N V&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;address-1&amp;gt;GROENEWOUDSEWEG 1&amp;lt;/address-1&amp;gt;&lt;br /&gt;
        &amp;lt;city&amp;gt;EINDHOVEN&amp;lt;/city&amp;gt;&lt;br /&gt;
        &amp;lt;country-name&amp;gt;NETHERLANDS&amp;lt;/country-name&amp;gt;&lt;br /&gt;
        &amp;lt;postcode&amp;gt;5621 BA&amp;lt;/postcode&amp;gt;&lt;br /&gt;
      &amp;lt;/patent-assignee&amp;gt;&lt;br /&gt;
    &amp;lt;/patent-assignees&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Patent Properties ====&lt;br /&gt;
&lt;br /&gt;
Here are the columns in the properties table:&lt;br /&gt;
&lt;br /&gt;
* reel_no&lt;br /&gt;
* frame_no&lt;br /&gt;
* documentid&lt;br /&gt;
* country&lt;br /&gt;
* kind&lt;br /&gt;
* filingdate&lt;br /&gt;
* invention_title&lt;br /&gt;
&lt;br /&gt;
The corresponding XML segment would be:&lt;br /&gt;
&lt;br /&gt;
  -&amp;lt;patent-properties&amp;gt;&lt;br /&gt;
    -&amp;lt;patent-property&amp;gt;&lt;br /&gt;
      -&amp;lt;document-id&amp;gt;&lt;br /&gt;
          &amp;lt;country&amp;gt;US&amp;lt;/country&amp;gt;&lt;br /&gt;
          &amp;lt;doc-number&amp;gt;14143589&amp;lt;/doc-number&amp;gt;&lt;br /&gt;
          &amp;lt;kind&amp;gt;X0&amp;lt;/kind&amp;gt;&lt;br /&gt;
          &amp;lt;date&amp;gt;20131230&amp;lt;/date&amp;gt;&lt;br /&gt;
       &amp;lt;/document-id&amp;gt;&lt;br /&gt;
      -&amp;lt;document-id&amp;gt;&lt;br /&gt;
          &amp;lt;country&amp;gt;US&amp;lt;/country&amp;gt;&lt;br /&gt;
          &amp;lt;doc-number&amp;gt;20140260305&amp;lt;/doc-number&amp;gt;&lt;br /&gt;
          &amp;lt;kind&amp;gt;A1&amp;lt;/kind&amp;gt;&lt;br /&gt;
          &amp;lt;date&amp;gt;20140918&amp;lt;/date&amp;gt;&lt;br /&gt;
       &amp;lt;/document-id&amp;gt;&lt;br /&gt;
      &amp;lt;invention-title lang=&amp;quot;en&amp;quot;&amp;gt;LEAN AZIMUTHAL FLAME COMBUSTOR&amp;lt;/invention-title&amp;gt;&lt;br /&gt;
    &amp;lt;/patent-property&amp;gt;&lt;br /&gt;
  &amp;lt;/patent-properties&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Patent properties have a many-to-one relationship : one patent can have more than one properties.&lt;br /&gt;
 Note: We are not sure what documents with kind 'X0' say&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Patent Assignment ====&lt;br /&gt;
&lt;br /&gt;
Every XML file download has some fields associated with it, in addition to a number of patent assignment nodes.&lt;br /&gt;
&lt;br /&gt;
Here are the columns in the table:&lt;br /&gt;
&lt;br /&gt;
* reel_no&lt;br /&gt;
* frame_no&lt;br /&gt;
* action_key_code&lt;br /&gt;
* USPTO_Transaction_Date&lt;br /&gt;
* USPTO_Date_Produced&lt;br /&gt;
* version&lt;br /&gt;
&lt;br /&gt;
Here is what the XML in a downloaded file looks like:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
  &amp;lt;!DOCTYPE us-patent-assignments&amp;gt;&lt;br /&gt;
 -&amp;lt;us-patent-assignments date-produced=&amp;quot;20131101&amp;quot; dtd-version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;action-key-code&amp;gt;DA&amp;lt;/action-key-code&amp;gt;&lt;br /&gt;
    -&amp;lt;transaction-date&amp;gt;&lt;br /&gt;
        &amp;lt;date&amp;gt;20160122&amp;lt;/date&amp;gt;&lt;br /&gt;
     &amp;lt;/transaction-date&amp;gt;&lt;br /&gt;
    -&amp;lt;patent-assignments&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignment&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignment&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignment&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignment&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignment&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignment&amp;gt;&lt;br /&gt;
             .&lt;br /&gt;
             .&lt;br /&gt;
             .&lt;br /&gt;
      &amp;lt;/patent-assignments&amp;gt;&lt;br /&gt;
  &amp;lt;/us-patent-assignments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====DTD====&lt;br /&gt;
Here is the DTD specified by the USPTO, which specifies optional fields and :&lt;br /&gt;
    &lt;br /&gt;
	&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!DOCTYPE us-patent-assignments [&amp;lt;!ELEMENT us-patent-assignments (action-key-code, transaction-date, patent-assignments)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ATTLIST us-patent-assignments  dtd-version   CDATA  #IMPLIED &amp;lt;br&amp;gt;&lt;br /&gt;
					 date-produced CDATA  #IMPLIED&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT action-key-code (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT transaction-date (date)&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT patent-assignments (data-available-code | patent-assignment+)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT date (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT data-available-code (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT patent-assignment (assignment-record, patent-assignors, patent-assignees, patent-properties)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT assignment-record (reel-no, frame-no, last-update-date, purge-indicator, recorded-date, page-count?, correspondent, conveyance-text)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT patent-assignors (patent-assignor+)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT patent-assignees (patent-assignee+)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT patent-properties (patent-property+)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT reel-no (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT frame-no (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT last-update-date (date)&amp;gt; &amp;lt;br&amp;gt; &lt;br /&gt;
	&amp;lt;!ELEMENT purge-indicator (#PCDATA)&amp;gt; &amp;lt;br&amp;gt; &lt;br /&gt;
	&amp;lt;!ELEMENT recorded-date (date)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT page-count (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT correspondent (name, address-1?, address-2?, address-3?, address-4?)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT conveyance-text (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT patent-assignor (name, execution-date?, date-acknowledged?)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT patent-assignee (name, address-1?, address-2?, city?, state?, country-name?, postcode?)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT patent-property (document-id*, invention-title?)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT name (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ATTLIST name name-type (natural | legal)  #IMPLIED&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT address-1 (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT address-2 (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT address-3 (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT address-4 (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT execution-date (date)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT date-acknowledged (date)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT city (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT state (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT country-name (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT postcode (#PCDATA)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT document-id (country, doc-number, kind?, name?, date?)&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT invention-title (#PCDATA | b | i | u | sup | sub)*&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ATTLIST invention-title  id   ID     #IMPLIED &amp;lt;br&amp;gt;&lt;br /&gt;
				   lang CDATA  #REQUIRED&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT country (#PCDATA)&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT doc-number (#PCDATA)&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT kind (#PCDATA)&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!--bold formatting for text--&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT b (#PCDATA | i | u | smallcaps)*&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!--italic formatting for text--&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT i (#PCDATA | b | u | smallcaps)*&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!--underscore: style - single is default--&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT u (#PCDATA | b | i | smallcaps)*&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ATTLIST u  style  (single | double | dash | dots )  'single' &amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!--superscripted text--&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT sup (#PCDATA | b | u | i)*&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!--subscripted text--&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT sub (#PCDATA | b | u | i)*&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!--small capitals--&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT smallcaps (#PCDATA | b | u | i)*&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
	]&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Inserting Extracted Data into Tables ===&lt;br /&gt;
&lt;br /&gt;
===Clean Up ===&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Bulk_Patent_Assignee_Processing&amp;diff=4287</id>
		<title>Bulk Patent Assignee Processing</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Bulk_Patent_Assignee_Processing&amp;diff=4287"/>
		<updated>2016-07-01T15:58:59Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: /* Extracting Data from XML Files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== USPTO Assignees Data ==&lt;br /&gt;
&lt;br /&gt;
We would like to download and absorb data from this location on the USPTO website into our tables. The objective is to determine whether this dataset is better than the current version of our patent data (a combination of the data in the patent_2015 and patentdata databases.&lt;br /&gt;
&lt;br /&gt;
== Steps Followed to Extract the Data ==&lt;br /&gt;
&lt;br /&gt;
===Extracting Data from XML Files ===&lt;br /&gt;
&lt;br /&gt;
All the historical USPTO data is available as XML files. Here is the tree structure for the XML files:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;patent-assignment&amp;gt;&lt;br /&gt;
        +&amp;lt;assignment-record&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignors&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignees&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-properties&amp;gt;&lt;br /&gt;
 &amp;lt;/patent-assignment&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each of the above internal nodes is mandatory, and is a logical grouping of information fields. Each node has a corresponding table created with more or less the same fields as the XML elements.&lt;br /&gt;
&lt;br /&gt;
Corresponding tables are:&lt;br /&gt;
*assignment-records : assignment&lt;br /&gt;
*patent-assignors : assignors&lt;br /&gt;
*patent-assignees : assignees&lt;br /&gt;
*patent-properties : properties&lt;br /&gt;
&lt;br /&gt;
Additionally, for each file that is downloaded, there are some associated specs. All of these are stored in the PatentAssignment table. Here is the data model diagram.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Records ====&lt;br /&gt;
&lt;br /&gt;
The fields in the assignment record are:&lt;br /&gt;
* last_update_date&lt;br /&gt;
* purge_indicator&lt;br /&gt;
* recorded_date&lt;br /&gt;
* correspondent_name&lt;br /&gt;
* correspondent_address_1&lt;br /&gt;
* correspondent_address_2&lt;br /&gt;
* correspondent_address_3&lt;br /&gt;
* correspondent_address_4&lt;br /&gt;
* conveyance_text&lt;br /&gt;
&lt;br /&gt;
Here is the corresponding XML that we are mapping:&lt;br /&gt;
 &lt;br /&gt;
   -&amp;lt;assignment-record&amp;gt;&lt;br /&gt;
       &amp;lt;reel-no&amp;gt;27132&amp;lt;/reel-no&amp;gt;&lt;br /&gt;
       &amp;lt;frame-no&amp;gt;841&amp;lt;/frame-no&amp;gt;&lt;br /&gt;
      -&amp;lt;last-update-date&amp;gt;&lt;br /&gt;
          &amp;lt;date&amp;gt;20160122&amp;lt;/date&amp;gt;&lt;br /&gt;
       &amp;lt;/last-update-date&amp;gt;&lt;br /&gt;
       &amp;lt;purge-indicator&amp;gt;N&amp;lt;/purge-indicator&amp;gt;&lt;br /&gt;
          -&amp;lt;recorded-date&amp;gt;&lt;br /&gt;
              &amp;lt;date&amp;gt;20111027&amp;lt;/date&amp;gt;&lt;br /&gt;
           &amp;lt;/recorded-date&amp;gt;&lt;br /&gt;
         &amp;lt;page-count&amp;gt;2&amp;lt;/page-count&amp;gt;&lt;br /&gt;
      -&amp;lt;correspondent&amp;gt;&lt;br /&gt;
           &amp;lt;name&amp;gt;DOUGLAS B. MCKNIGHT&amp;lt;/name&amp;gt;&lt;br /&gt;
           &amp;lt;address-1&amp;gt;595 MINER ROAD&amp;lt;/address-1&amp;gt;&lt;br /&gt;
           &amp;lt;address-2&amp;gt;INTELLECTUAL PROPERTY &amp;amp; STANDARDS&amp;lt;/address-2&amp;gt;&lt;br /&gt;
           &amp;lt;address-3&amp;gt;CLEVELAND, OH 44143&amp;lt;/address-3&amp;gt;&lt;br /&gt;
        &amp;lt;/correspondent&amp;gt;&lt;br /&gt;
        &amp;lt;conveyance-text&amp;gt;ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS).&amp;lt;/conveyance-text&amp;gt;&lt;br /&gt;
  &amp;lt;/assignment-record&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Assignors ====&lt;br /&gt;
&lt;br /&gt;
Here are the columns in the assignors table:&lt;br /&gt;
* reel_no&lt;br /&gt;
* frame_no&lt;br /&gt;
* assignor_name&lt;br /&gt;
* execution_date&lt;br /&gt;
&lt;br /&gt;
The corresponding XML node is :&lt;br /&gt;
&lt;br /&gt;
 -&amp;lt;patent-assignors&amp;gt;&lt;br /&gt;
    -&amp;lt;patent-assignor&amp;gt;&lt;br /&gt;
       &amp;lt;name&amp;gt;WALKER, MATTHEW J.&amp;lt;/name&amp;gt;&lt;br /&gt;
      -&amp;lt;execution-date&amp;gt;&lt;br /&gt;
          &amp;lt;date&amp;gt;20090512&amp;lt;/date&amp;gt;&lt;br /&gt;
       &amp;lt;/execution-date&amp;gt;&lt;br /&gt;
     &amp;lt;/patent-assignor&amp;gt;&lt;br /&gt;
    -&amp;lt;patent-assignor&amp;gt;&lt;br /&gt;
       &amp;lt;name&amp;gt;OLSZEWSKI, MARK E.&amp;lt;/name&amp;gt;&lt;br /&gt;
      -&amp;lt;execution-date&amp;gt;&lt;br /&gt;
          &amp;lt;date&amp;gt;20090512&amp;lt;/date&amp;gt;&lt;br /&gt;
       &amp;lt;/execution-date&amp;gt;&lt;br /&gt;
     &amp;lt;/patent-assignor&amp;gt;&lt;br /&gt;
   &amp;lt;/patent-assignors&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Assignees ====&lt;br /&gt;
&lt;br /&gt;
Here are the columns in the assignees table:&lt;br /&gt;
&lt;br /&gt;
* reel_no&lt;br /&gt;
* frame_no&lt;br /&gt;
* assignee_name&lt;br /&gt;
* assignee_address_1&lt;br /&gt;
* assignee_address_2&lt;br /&gt;
* assignee_city&lt;br /&gt;
* assignee_state&lt;br /&gt;
* assignee_country&lt;br /&gt;
* assignee_postcode&lt;br /&gt;
&lt;br /&gt;
The corresponding XML nodes are:&lt;br /&gt;
&lt;br /&gt;
  -&amp;lt;patent-assignees&amp;gt;&lt;br /&gt;
    -&amp;lt;patent-assignee&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;KONINKLIJKE PHILIPS ELECTRONICS N V&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;address-1&amp;gt;GROENEWOUDSEWEG 1&amp;lt;/address-1&amp;gt;&lt;br /&gt;
        &amp;lt;city&amp;gt;EINDHOVEN&amp;lt;/city&amp;gt;&lt;br /&gt;
        &amp;lt;country-name&amp;gt;NETHERLANDS&amp;lt;/country-name&amp;gt;&lt;br /&gt;
        &amp;lt;postcode&amp;gt;5621 BA&amp;lt;/postcode&amp;gt;&lt;br /&gt;
      &amp;lt;/patent-assignee&amp;gt;&lt;br /&gt;
    &amp;lt;/patent-assignees&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Patent Properties ====&lt;br /&gt;
&lt;br /&gt;
Here are the columns in the properties table:&lt;br /&gt;
&lt;br /&gt;
* reel_no&lt;br /&gt;
* frame_no&lt;br /&gt;
* documentid&lt;br /&gt;
* country&lt;br /&gt;
* kind&lt;br /&gt;
* filingdate&lt;br /&gt;
* invention_title&lt;br /&gt;
&lt;br /&gt;
The corresponding XML segment would be:&lt;br /&gt;
&lt;br /&gt;
  -&amp;lt;patent-properties&amp;gt;&lt;br /&gt;
    -&amp;lt;patent-property&amp;gt;&lt;br /&gt;
      -&amp;lt;document-id&amp;gt;&lt;br /&gt;
          &amp;lt;country&amp;gt;US&amp;lt;/country&amp;gt;&lt;br /&gt;
          &amp;lt;doc-number&amp;gt;14143589&amp;lt;/doc-number&amp;gt;&lt;br /&gt;
          &amp;lt;kind&amp;gt;X0&amp;lt;/kind&amp;gt;&lt;br /&gt;
          &amp;lt;date&amp;gt;20131230&amp;lt;/date&amp;gt;&lt;br /&gt;
       &amp;lt;/document-id&amp;gt;&lt;br /&gt;
      -&amp;lt;document-id&amp;gt;&lt;br /&gt;
          &amp;lt;country&amp;gt;US&amp;lt;/country&amp;gt;&lt;br /&gt;
          &amp;lt;doc-number&amp;gt;20140260305&amp;lt;/doc-number&amp;gt;&lt;br /&gt;
          &amp;lt;kind&amp;gt;A1&amp;lt;/kind&amp;gt;&lt;br /&gt;
          &amp;lt;date&amp;gt;20140918&amp;lt;/date&amp;gt;&lt;br /&gt;
       &amp;lt;/document-id&amp;gt;&lt;br /&gt;
      &amp;lt;invention-title lang=&amp;quot;en&amp;quot;&amp;gt;LEAN AZIMUTHAL FLAME COMBUSTOR&amp;lt;/invention-title&amp;gt;&lt;br /&gt;
    &amp;lt;/patent-property&amp;gt;&lt;br /&gt;
  &amp;lt;/patent-properties&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Patent properties have a many-to-one relationship : one patent can have more than one properties.&lt;br /&gt;
 Note: We are not sure what documents with kind 'X0' say&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Patent Assignment ====&lt;br /&gt;
&lt;br /&gt;
Every XML file download has some fields associated with it, in addition to a number of patent assignment nodes.&lt;br /&gt;
&lt;br /&gt;
Here are the columns in the table:&lt;br /&gt;
&lt;br /&gt;
* reel_no&lt;br /&gt;
* frame_no&lt;br /&gt;
* action_key_code&lt;br /&gt;
* USPTO_Transaction_Date&lt;br /&gt;
* USPTO_Date_Produced&lt;br /&gt;
* version&lt;br /&gt;
&lt;br /&gt;
Here is what the XML in a downloaded file looks like:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
  &amp;lt;!DOCTYPE us-patent-assignments&amp;gt;&lt;br /&gt;
 -&amp;lt;us-patent-assignments date-produced=&amp;quot;20131101&amp;quot; dtd-version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;action-key-code&amp;gt;DA&amp;lt;/action-key-code&amp;gt;&lt;br /&gt;
    -&amp;lt;transaction-date&amp;gt;&lt;br /&gt;
        &amp;lt;date&amp;gt;20160122&amp;lt;/date&amp;gt;&lt;br /&gt;
     &amp;lt;/transaction-date&amp;gt;&lt;br /&gt;
    -&amp;lt;patent-assignments&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignment&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignment&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignment&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignment&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignment&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignment&amp;gt;&lt;br /&gt;
             .&lt;br /&gt;
             .&lt;br /&gt;
             .&lt;br /&gt;
      &amp;lt;/patent-assignments&amp;gt;&lt;br /&gt;
  &amp;lt;/us-patent-assignments&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====DTD====&lt;br /&gt;
Here is the DTD specified by the USPTO, which specifies optional fields and :&lt;br /&gt;
    &lt;br /&gt;
	&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt; &lt;br /&gt;
	&amp;lt;!DOCTYPE us-patent-assignments [&amp;lt;!ELEMENT us-patent-assignments (action-key-code, transaction-date, patent-assignments)&amp;gt; &lt;br /&gt;
	&amp;lt;!ATTLIST us-patent-assignments  dtd-version   CDATA  #IMPLIED &lt;br /&gt;
					 date-produced CDATA  #IMPLIED&amp;gt; &lt;br /&gt;
	&amp;lt;!ELEMENT action-key-code (#PCDATA)&amp;gt; &lt;br /&gt;
	&amp;lt;!ELEMENT transaction-date (date)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT patent-assignments (data-available-code | patent-assignment+)&amp;gt; &lt;br /&gt;
	&amp;lt;!ELEMENT date (#PCDATA)&amp;gt; &lt;br /&gt;
	&amp;lt;!ELEMENT data-available-code (#PCDATA)&amp;gt; &lt;br /&gt;
	&amp;lt;!ELEMENT patent-assignment (assignment-record, patent-assignors, patent-assignees, patent-properties)&amp;gt; &lt;br /&gt;
	&amp;lt;!ELEMENT assignment-record (reel-no, frame-no, last-update-date, purge-indicator, recorded-date, page-count?, correspondent, conveyance-text)&amp;gt; &lt;br /&gt;
	&amp;lt;!ELEMENT patent-assignors (patent-assignor+)&amp;gt; &lt;br /&gt;
	&amp;lt;!ELEMENT patent-assignees (patent-assignee+)&amp;gt; &lt;br /&gt;
	&amp;lt;!ELEMENT patent-properties (patent-property+)&amp;gt; &lt;br /&gt;
	&amp;lt;!ELEMENT reel-no (#PCDATA)&amp;gt; &lt;br /&gt;
	&amp;lt;!ELEMENT frame-no (#PCDATA)&amp;gt; &lt;br /&gt;
	&amp;lt;!ELEMENT last-update-date (date)&amp;gt; &lt;br /&gt;
	&amp;lt;!ELEMENT purge-indicator (#PCDATA)&amp;gt; &lt;br /&gt;
	&amp;lt;!ELEMENT recorded-date (date)&amp;gt; &lt;br /&gt;
	&amp;lt;!ELEMENT page-count (#PCDATA)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT correspondent (name, address-1?, address-2?, address-3?, address-4?)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT conveyance-text (#PCDATA)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT patent-assignor (name, execution-date?, date-acknowledged?)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT patent-assignee (name, address-1?, address-2?, city?, state?, country-name?, postcode?)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT patent-property (document-id*, invention-title?)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT name (#PCDATA)&amp;gt;&lt;br /&gt;
	&amp;lt;!ATTLIST name name-type (natural | legal)  #IMPLIED&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT address-1 (#PCDATA)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT address-2 (#PCDATA)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT address-3 (#PCDATA)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT address-4 (#PCDATA)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT execution-date (date)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT date-acknowledged (date)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT city (#PCDATA)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT state (#PCDATA)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT country-name (#PCDATA)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT postcode (#PCDATA)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT document-id (country, doc-number, kind?, name?, date?)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT invention-title (#PCDATA | b | i | u | sup | sub)*&amp;gt;&lt;br /&gt;
	&amp;lt;!ATTLIST invention-title  id   ID     #IMPLIED&lt;br /&gt;
				   lang CDATA  #REQUIRED&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT country (#PCDATA)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT doc-number (#PCDATA)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT kind (#PCDATA)&amp;gt;&lt;br /&gt;
	&amp;lt;!--bold formatting for text--&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT b (#PCDATA | i | u | smallcaps)*&amp;gt;&lt;br /&gt;
	&amp;lt;!--italic formatting for text--&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT i (#PCDATA | b | u | smallcaps)*&amp;gt;&lt;br /&gt;
	&amp;lt;!--underscore: style - single is default--&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT u (#PCDATA | b | i | smallcaps)*&amp;gt;&lt;br /&gt;
	&amp;lt;!ATTLIST u  style  (single | double | dash | dots )  'single' &amp;gt;&lt;br /&gt;
	&amp;lt;!--superscripted text--&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT sup (#PCDATA | b | u | i)*&amp;gt;&lt;br /&gt;
	&amp;lt;!--subscripted text--&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT sub (#PCDATA | b | u | i)*&amp;gt;&lt;br /&gt;
	&amp;lt;!--small capitals--&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT smallcaps (#PCDATA | b | u | i)*&amp;gt;&lt;br /&gt;
	]&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Inserting Extracted Data into Tables ===&lt;br /&gt;
&lt;br /&gt;
===Clean Up ===&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Bulk_Patent_Assignee_Processing&amp;diff=4285</id>
		<title>Bulk Patent Assignee Processing</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Bulk_Patent_Assignee_Processing&amp;diff=4285"/>
		<updated>2016-07-01T15:47:48Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: /* Patent Properties */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== USPTO Assignees Data ==&lt;br /&gt;
&lt;br /&gt;
We would like to download and absorb data from this location on the USPTO website into our tables. The objective is to determine whether this dataset is better than the current version of our patent data (a combination of the data in the patent_2015 and patentdata databases.&lt;br /&gt;
&lt;br /&gt;
== Steps Followed to Extract the Data ==&lt;br /&gt;
&lt;br /&gt;
===Extracting Data from XML Files ===&lt;br /&gt;
&lt;br /&gt;
All the historical USPTO data is available as XML files. Here is the tree structure for the XML files:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;patent-assignment&amp;gt;&lt;br /&gt;
        +&amp;lt;assignment-record&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignors&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignees&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-properties&amp;gt;&lt;br /&gt;
 &amp;lt;/patent-assignment&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each of the above internal nodes is mandatory, and is a logical grouping of information fields. Each node has a corresponding table created with more or less the same fields as the XML elements.&lt;br /&gt;
&lt;br /&gt;
Corresponding tables are:&lt;br /&gt;
*assignment-records : assignment&lt;br /&gt;
*patent-assignors : assignors&lt;br /&gt;
*patent-assignees : assignees&lt;br /&gt;
*patent-properties : properties&lt;br /&gt;
&lt;br /&gt;
Additionally, for each file that is downloaded, there are some associated specs. All of these are stored in the PatentAssignment table. Here is the data model diagram.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Records ====&lt;br /&gt;
&lt;br /&gt;
The fields in the assignment record are:&lt;br /&gt;
* last_update_date&lt;br /&gt;
* purge_indicator&lt;br /&gt;
* recorded_date&lt;br /&gt;
* correspondent_name&lt;br /&gt;
* correspondent_address_1&lt;br /&gt;
* correspondent_address_2&lt;br /&gt;
* correspondent_address_3&lt;br /&gt;
* correspondent_address_4&lt;br /&gt;
* conveyance_text&lt;br /&gt;
&lt;br /&gt;
Here is the corresponding XML that we are mapping:&lt;br /&gt;
 &lt;br /&gt;
   -&amp;lt;assignment-record&amp;gt;&lt;br /&gt;
       &amp;lt;reel-no&amp;gt;27132&amp;lt;/reel-no&amp;gt;&lt;br /&gt;
       &amp;lt;frame-no&amp;gt;841&amp;lt;/frame-no&amp;gt;&lt;br /&gt;
      -&amp;lt;last-update-date&amp;gt;&lt;br /&gt;
          &amp;lt;date&amp;gt;20160122&amp;lt;/date&amp;gt;&lt;br /&gt;
       &amp;lt;/last-update-date&amp;gt;&lt;br /&gt;
       &amp;lt;purge-indicator&amp;gt;N&amp;lt;/purge-indicator&amp;gt;&lt;br /&gt;
          -&amp;lt;recorded-date&amp;gt;&lt;br /&gt;
              &amp;lt;date&amp;gt;20111027&amp;lt;/date&amp;gt;&lt;br /&gt;
           &amp;lt;/recorded-date&amp;gt;&lt;br /&gt;
         &amp;lt;page-count&amp;gt;2&amp;lt;/page-count&amp;gt;&lt;br /&gt;
      -&amp;lt;correspondent&amp;gt;&lt;br /&gt;
           &amp;lt;name&amp;gt;DOUGLAS B. MCKNIGHT&amp;lt;/name&amp;gt;&lt;br /&gt;
           &amp;lt;address-1&amp;gt;595 MINER ROAD&amp;lt;/address-1&amp;gt;&lt;br /&gt;
           &amp;lt;address-2&amp;gt;INTELLECTUAL PROPERTY &amp;amp; STANDARDS&amp;lt;/address-2&amp;gt;&lt;br /&gt;
           &amp;lt;address-3&amp;gt;CLEVELAND, OH 44143&amp;lt;/address-3&amp;gt;&lt;br /&gt;
        &amp;lt;/correspondent&amp;gt;&lt;br /&gt;
        &amp;lt;conveyance-text&amp;gt;ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS).&amp;lt;/conveyance-text&amp;gt;&lt;br /&gt;
  &amp;lt;/assignment-record&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Assignors ====&lt;br /&gt;
&lt;br /&gt;
Here are the columns in the assignors table:&lt;br /&gt;
* reel_no&lt;br /&gt;
* frame_no&lt;br /&gt;
* assignor_name&lt;br /&gt;
* execution_date&lt;br /&gt;
&lt;br /&gt;
The corresponding XML node is :&lt;br /&gt;
&lt;br /&gt;
 -&amp;lt;patent-assignors&amp;gt;&lt;br /&gt;
    -&amp;lt;patent-assignor&amp;gt;&lt;br /&gt;
       &amp;lt;name&amp;gt;WALKER, MATTHEW J.&amp;lt;/name&amp;gt;&lt;br /&gt;
      -&amp;lt;execution-date&amp;gt;&lt;br /&gt;
          &amp;lt;date&amp;gt;20090512&amp;lt;/date&amp;gt;&lt;br /&gt;
       &amp;lt;/execution-date&amp;gt;&lt;br /&gt;
     &amp;lt;/patent-assignor&amp;gt;&lt;br /&gt;
    -&amp;lt;patent-assignor&amp;gt;&lt;br /&gt;
       &amp;lt;name&amp;gt;OLSZEWSKI, MARK E.&amp;lt;/name&amp;gt;&lt;br /&gt;
      -&amp;lt;execution-date&amp;gt;&lt;br /&gt;
          &amp;lt;date&amp;gt;20090512&amp;lt;/date&amp;gt;&lt;br /&gt;
       &amp;lt;/execution-date&amp;gt;&lt;br /&gt;
     &amp;lt;/patent-assignor&amp;gt;&lt;br /&gt;
   &amp;lt;/patent-assignors&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Assignees ====&lt;br /&gt;
&lt;br /&gt;
Here are the columns in the assignees table:&lt;br /&gt;
&lt;br /&gt;
* reel_no&lt;br /&gt;
* frame_no&lt;br /&gt;
* assignee_name&lt;br /&gt;
* assignee_address_1&lt;br /&gt;
* assignee_address_2&lt;br /&gt;
* assignee_city&lt;br /&gt;
* assignee_state&lt;br /&gt;
* assignee_country&lt;br /&gt;
* assignee_postcode&lt;br /&gt;
&lt;br /&gt;
The corresponding XML nodes are:&lt;br /&gt;
&lt;br /&gt;
  -&amp;lt;patent-assignees&amp;gt;&lt;br /&gt;
    -&amp;lt;patent-assignee&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;KONINKLIJKE PHILIPS ELECTRONICS N V&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;address-1&amp;gt;GROENEWOUDSEWEG 1&amp;lt;/address-1&amp;gt;&lt;br /&gt;
        &amp;lt;city&amp;gt;EINDHOVEN&amp;lt;/city&amp;gt;&lt;br /&gt;
        &amp;lt;country-name&amp;gt;NETHERLANDS&amp;lt;/country-name&amp;gt;&lt;br /&gt;
        &amp;lt;postcode&amp;gt;5621 BA&amp;lt;/postcode&amp;gt;&lt;br /&gt;
      &amp;lt;/patent-assignee&amp;gt;&lt;br /&gt;
    &amp;lt;/patent-assignees&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Patent Properties ====&lt;br /&gt;
&lt;br /&gt;
Here are the columns in the properties table:&lt;br /&gt;
&lt;br /&gt;
* reel_no&lt;br /&gt;
* frame_no&lt;br /&gt;
* documentid&lt;br /&gt;
* country&lt;br /&gt;
* kind&lt;br /&gt;
* filingdate&lt;br /&gt;
* invention_title&lt;br /&gt;
&lt;br /&gt;
The corresponding XML segment would be:&lt;br /&gt;
&lt;br /&gt;
  -&amp;lt;patent-properties&amp;gt;&lt;br /&gt;
    -&amp;lt;patent-property&amp;gt;&lt;br /&gt;
      -&amp;lt;document-id&amp;gt;&lt;br /&gt;
          &amp;lt;country&amp;gt;US&amp;lt;/country&amp;gt;&lt;br /&gt;
          &amp;lt;doc-number&amp;gt;14143589&amp;lt;/doc-number&amp;gt;&lt;br /&gt;
          &amp;lt;kind&amp;gt;X0&amp;lt;/kind&amp;gt;&lt;br /&gt;
          &amp;lt;date&amp;gt;20131230&amp;lt;/date&amp;gt;&lt;br /&gt;
       &amp;lt;/document-id&amp;gt;&lt;br /&gt;
      -&amp;lt;document-id&amp;gt;&lt;br /&gt;
          &amp;lt;country&amp;gt;US&amp;lt;/country&amp;gt;&lt;br /&gt;
          &amp;lt;doc-number&amp;gt;20140260305&amp;lt;/doc-number&amp;gt;&lt;br /&gt;
          &amp;lt;kind&amp;gt;A1&amp;lt;/kind&amp;gt;&lt;br /&gt;
          &amp;lt;date&amp;gt;20140918&amp;lt;/date&amp;gt;&lt;br /&gt;
       &amp;lt;/document-id&amp;gt;&lt;br /&gt;
      &amp;lt;invention-title lang=&amp;quot;en&amp;quot;&amp;gt;LEAN AZIMUTHAL FLAME COMBUSTOR&amp;lt;/invention-title&amp;gt;&lt;br /&gt;
    &amp;lt;/patent-property&amp;gt;&lt;br /&gt;
  &amp;lt;/patent-properties&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Patent properties have a many-to-one relationship : one patent can have more than one properties.&lt;br /&gt;
 Note: We are not sure what documents with kind 'X0' say&lt;br /&gt;
&lt;br /&gt;
====DTD====&lt;br /&gt;
Here is the DTD specified by the USPTO, which specifies optional fields and :&lt;br /&gt;
    &lt;br /&gt;
	&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt; &lt;br /&gt;
	&amp;lt;!DOCTYPE us-patent-assignments [&amp;lt;!ELEMENT us-patent-assignments (action-key-code, transaction-date, patent-assignments)&amp;gt; &lt;br /&gt;
	&amp;lt;!ATTLIST us-patent-assignments  dtd-version   CDATA  #IMPLIED &lt;br /&gt;
					 date-produced CDATA  #IMPLIED&amp;gt; &lt;br /&gt;
	&amp;lt;!ELEMENT action-key-code (#PCDATA)&amp;gt; &lt;br /&gt;
	&amp;lt;!ELEMENT transaction-date (date)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT patent-assignments (data-available-code | patent-assignment+)&amp;gt; &lt;br /&gt;
	&amp;lt;!ELEMENT date (#PCDATA)&amp;gt; &lt;br /&gt;
	&amp;lt;!ELEMENT data-available-code (#PCDATA)&amp;gt; &lt;br /&gt;
	&amp;lt;!ELEMENT patent-assignment (assignment-record, patent-assignors, patent-assignees, patent-properties)&amp;gt; &lt;br /&gt;
	&amp;lt;!ELEMENT assignment-record (reel-no, frame-no, last-update-date, purge-indicator, recorded-date, page-count?, correspondent, conveyance-text)&amp;gt; &lt;br /&gt;
	&amp;lt;!ELEMENT patent-assignors (patent-assignor+)&amp;gt; &lt;br /&gt;
	&amp;lt;!ELEMENT patent-assignees (patent-assignee+)&amp;gt; &lt;br /&gt;
	&amp;lt;!ELEMENT patent-properties (patent-property+)&amp;gt; &lt;br /&gt;
	&amp;lt;!ELEMENT reel-no (#PCDATA)&amp;gt; &lt;br /&gt;
	&amp;lt;!ELEMENT frame-no (#PCDATA)&amp;gt; &lt;br /&gt;
	&amp;lt;!ELEMENT last-update-date (date)&amp;gt; &lt;br /&gt;
	&amp;lt;!ELEMENT purge-indicator (#PCDATA)&amp;gt; &lt;br /&gt;
	&amp;lt;!ELEMENT recorded-date (date)&amp;gt; &lt;br /&gt;
	&amp;lt;!ELEMENT page-count (#PCDATA)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT correspondent (name, address-1?, address-2?, address-3?, address-4?)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT conveyance-text (#PCDATA)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT patent-assignor (name, execution-date?, date-acknowledged?)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT patent-assignee (name, address-1?, address-2?, city?, state?, country-name?, postcode?)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT patent-property (document-id*, invention-title?)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT name (#PCDATA)&amp;gt;&lt;br /&gt;
	&amp;lt;!ATTLIST name name-type (natural | legal)  #IMPLIED&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT address-1 (#PCDATA)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT address-2 (#PCDATA)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT address-3 (#PCDATA)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT address-4 (#PCDATA)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT execution-date (date)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT date-acknowledged (date)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT city (#PCDATA)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT state (#PCDATA)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT country-name (#PCDATA)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT postcode (#PCDATA)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT document-id (country, doc-number, kind?, name?, date?)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT invention-title (#PCDATA | b | i | u | sup | sub)*&amp;gt;&lt;br /&gt;
	&amp;lt;!ATTLIST invention-title  id   ID     #IMPLIED&lt;br /&gt;
				   lang CDATA  #REQUIRED&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT country (#PCDATA)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT doc-number (#PCDATA)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT kind (#PCDATA)&amp;gt;&lt;br /&gt;
	&amp;lt;!--bold formatting for text--&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT b (#PCDATA | i | u | smallcaps)*&amp;gt;&lt;br /&gt;
	&amp;lt;!--italic formatting for text--&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT i (#PCDATA | b | u | smallcaps)*&amp;gt;&lt;br /&gt;
	&amp;lt;!--underscore: style - single is default--&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT u (#PCDATA | b | i | smallcaps)*&amp;gt;&lt;br /&gt;
	&amp;lt;!ATTLIST u  style  (single | double | dash | dots )  'single' &amp;gt;&lt;br /&gt;
	&amp;lt;!--superscripted text--&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT sup (#PCDATA | b | u | i)*&amp;gt;&lt;br /&gt;
	&amp;lt;!--subscripted text--&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT sub (#PCDATA | b | u | i)*&amp;gt;&lt;br /&gt;
	&amp;lt;!--small capitals--&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT smallcaps (#PCDATA | b | u | i)*&amp;gt;&lt;br /&gt;
	]&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Inserting Extracted Data into Tables ===&lt;br /&gt;
&lt;br /&gt;
===Clean Up ===&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Bulk_Patent_Assignee_Processing&amp;diff=4283</id>
		<title>Bulk Patent Assignee Processing</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Bulk_Patent_Assignee_Processing&amp;diff=4283"/>
		<updated>2016-07-01T15:38:50Z</updated>

		<summary type="html">&lt;p&gt;RavaliKruthiventi: /* Extracting Data from XML Files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== USPTO Assignees Data ==&lt;br /&gt;
&lt;br /&gt;
We would like to download and absorb data from this location on the USPTO website into our tables. The objective is to determine whether this dataset is better than the current version of our patent data (a combination of the data in the patent_2015 and patentdata databases.&lt;br /&gt;
&lt;br /&gt;
== Steps Followed to Extract the Data ==&lt;br /&gt;
&lt;br /&gt;
===Extracting Data from XML Files ===&lt;br /&gt;
&lt;br /&gt;
All the historical USPTO data is available as XML files. Here is the tree structure for the XML files:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;patent-assignment&amp;gt;&lt;br /&gt;
        +&amp;lt;assignment-record&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignors&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-assignees&amp;gt;&lt;br /&gt;
        +&amp;lt;patent-properties&amp;gt;&lt;br /&gt;
 &amp;lt;/patent-assignment&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each of the above internal nodes is mandatory, and is a logical grouping of information fields. Each node has a corresponding table created with more or less the same fields as the XML elements.&lt;br /&gt;
&lt;br /&gt;
Corresponding tables are:&lt;br /&gt;
*assignment-records : assignment&lt;br /&gt;
*patent-assignors : assignors&lt;br /&gt;
*patent-assignees : assignees&lt;br /&gt;
*patent-properties : properties&lt;br /&gt;
&lt;br /&gt;
Additionally, for each file that is downloaded, there are some associated specs. All of these are stored in the PatentAssignment table. Here is the data model diagram.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Records ====&lt;br /&gt;
&lt;br /&gt;
The fields in the assignment record are:&lt;br /&gt;
* last_update_date&lt;br /&gt;
* purge_indicator&lt;br /&gt;
* recorded_date&lt;br /&gt;
* correspondent_name&lt;br /&gt;
* correspondent_address_1&lt;br /&gt;
* correspondent_address_2&lt;br /&gt;
* correspondent_address_3&lt;br /&gt;
* correspondent_address_4&lt;br /&gt;
* conveyance_text&lt;br /&gt;
&lt;br /&gt;
Here is the corresponding XML that we are mapping:&lt;br /&gt;
 &lt;br /&gt;
   -&amp;lt;assignment-record&amp;gt;&lt;br /&gt;
       &amp;lt;reel-no&amp;gt;27132&amp;lt;/reel-no&amp;gt;&lt;br /&gt;
       &amp;lt;frame-no&amp;gt;841&amp;lt;/frame-no&amp;gt;&lt;br /&gt;
      -&amp;lt;last-update-date&amp;gt;&lt;br /&gt;
          &amp;lt;date&amp;gt;20160122&amp;lt;/date&amp;gt;&lt;br /&gt;
       &amp;lt;/last-update-date&amp;gt;&lt;br /&gt;
       &amp;lt;purge-indicator&amp;gt;N&amp;lt;/purge-indicator&amp;gt;&lt;br /&gt;
          -&amp;lt;recorded-date&amp;gt;&lt;br /&gt;
              &amp;lt;date&amp;gt;20111027&amp;lt;/date&amp;gt;&lt;br /&gt;
           &amp;lt;/recorded-date&amp;gt;&lt;br /&gt;
         &amp;lt;page-count&amp;gt;2&amp;lt;/page-count&amp;gt;&lt;br /&gt;
      -&amp;lt;correspondent&amp;gt;&lt;br /&gt;
           &amp;lt;name&amp;gt;DOUGLAS B. MCKNIGHT&amp;lt;/name&amp;gt;&lt;br /&gt;
           &amp;lt;address-1&amp;gt;595 MINER ROAD&amp;lt;/address-1&amp;gt;&lt;br /&gt;
           &amp;lt;address-2&amp;gt;INTELLECTUAL PROPERTY &amp;amp; STANDARDS&amp;lt;/address-2&amp;gt;&lt;br /&gt;
           &amp;lt;address-3&amp;gt;CLEVELAND, OH 44143&amp;lt;/address-3&amp;gt;&lt;br /&gt;
        &amp;lt;/correspondent&amp;gt;&lt;br /&gt;
        &amp;lt;conveyance-text&amp;gt;ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS).&amp;lt;/conveyance-text&amp;gt;&lt;br /&gt;
  &amp;lt;/assignment-record&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Assignors ====&lt;br /&gt;
&lt;br /&gt;
Here are the columns in the assignors table:&lt;br /&gt;
* reel_no&lt;br /&gt;
* frame_no&lt;br /&gt;
* assignor_name&lt;br /&gt;
* execution_date&lt;br /&gt;
&lt;br /&gt;
The corresponding XML node is :&lt;br /&gt;
&lt;br /&gt;
 -&amp;lt;patent-assignors&amp;gt;&lt;br /&gt;
    -&amp;lt;patent-assignor&amp;gt;&lt;br /&gt;
       &amp;lt;name&amp;gt;WALKER, MATTHEW J.&amp;lt;/name&amp;gt;&lt;br /&gt;
      -&amp;lt;execution-date&amp;gt;&lt;br /&gt;
          &amp;lt;date&amp;gt;20090512&amp;lt;/date&amp;gt;&lt;br /&gt;
       &amp;lt;/execution-date&amp;gt;&lt;br /&gt;
     &amp;lt;/patent-assignor&amp;gt;&lt;br /&gt;
    -&amp;lt;patent-assignor&amp;gt;&lt;br /&gt;
       &amp;lt;name&amp;gt;OLSZEWSKI, MARK E.&amp;lt;/name&amp;gt;&lt;br /&gt;
      -&amp;lt;execution-date&amp;gt;&lt;br /&gt;
          &amp;lt;date&amp;gt;20090512&amp;lt;/date&amp;gt;&lt;br /&gt;
       &amp;lt;/execution-date&amp;gt;&lt;br /&gt;
     &amp;lt;/patent-assignor&amp;gt;&lt;br /&gt;
   &amp;lt;/patent-assignors&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Assignees ====&lt;br /&gt;
&lt;br /&gt;
Here are the columns in the assignees table:&lt;br /&gt;
&lt;br /&gt;
* reel_no&lt;br /&gt;
* frame_no&lt;br /&gt;
* assignee_name&lt;br /&gt;
* assignee_address_1&lt;br /&gt;
* assignee_address_2&lt;br /&gt;
* assignee_city&lt;br /&gt;
* assignee_state&lt;br /&gt;
* assignee_country&lt;br /&gt;
* assignee_postcode&lt;br /&gt;
&lt;br /&gt;
The corresponding XML nodes are:&lt;br /&gt;
&lt;br /&gt;
  -&amp;lt;patent-assignees&amp;gt;&lt;br /&gt;
    -&amp;lt;patent-assignee&amp;gt;&lt;br /&gt;
        &amp;lt;name&amp;gt;KONINKLIJKE PHILIPS ELECTRONICS N V&amp;lt;/name&amp;gt;&lt;br /&gt;
        &amp;lt;address-1&amp;gt;GROENEWOUDSEWEG 1&amp;lt;/address-1&amp;gt;&lt;br /&gt;
        &amp;lt;city&amp;gt;EINDHOVEN&amp;lt;/city&amp;gt;&lt;br /&gt;
        &amp;lt;country-name&amp;gt;NETHERLANDS&amp;lt;/country-name&amp;gt;&lt;br /&gt;
        &amp;lt;postcode&amp;gt;5621 BA&amp;lt;/postcode&amp;gt;&lt;br /&gt;
      &amp;lt;/patent-assignee&amp;gt;&lt;br /&gt;
    &amp;lt;/patent-assignees&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Patent Properties ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====DTD====&lt;br /&gt;
Here is the DTD specified by the USPTO, which specifies optional fields and :&lt;br /&gt;
    &lt;br /&gt;
	&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt; &lt;br /&gt;
	&amp;lt;!DOCTYPE us-patent-assignments [&amp;lt;!ELEMENT us-patent-assignments (action-key-code, transaction-date, patent-assignments)&amp;gt; &lt;br /&gt;
	&amp;lt;!ATTLIST us-patent-assignments  dtd-version   CDATA  #IMPLIED &lt;br /&gt;
					 date-produced CDATA  #IMPLIED&amp;gt; &lt;br /&gt;
	&amp;lt;!ELEMENT action-key-code (#PCDATA)&amp;gt; &lt;br /&gt;
	&amp;lt;!ELEMENT transaction-date (date)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT patent-assignments (data-available-code | patent-assignment+)&amp;gt; &lt;br /&gt;
	&amp;lt;!ELEMENT date (#PCDATA)&amp;gt; &lt;br /&gt;
	&amp;lt;!ELEMENT data-available-code (#PCDATA)&amp;gt; &lt;br /&gt;
	&amp;lt;!ELEMENT patent-assignment (assignment-record, patent-assignors, patent-assignees, patent-properties)&amp;gt; &lt;br /&gt;
	&amp;lt;!ELEMENT assignment-record (reel-no, frame-no, last-update-date, purge-indicator, recorded-date, page-count?, correspondent, conveyance-text)&amp;gt; &lt;br /&gt;
	&amp;lt;!ELEMENT patent-assignors (patent-assignor+)&amp;gt; &lt;br /&gt;
	&amp;lt;!ELEMENT patent-assignees (patent-assignee+)&amp;gt; &lt;br /&gt;
	&amp;lt;!ELEMENT patent-properties (patent-property+)&amp;gt; &lt;br /&gt;
	&amp;lt;!ELEMENT reel-no (#PCDATA)&amp;gt; &lt;br /&gt;
	&amp;lt;!ELEMENT frame-no (#PCDATA)&amp;gt; &lt;br /&gt;
	&amp;lt;!ELEMENT last-update-date (date)&amp;gt; &lt;br /&gt;
	&amp;lt;!ELEMENT purge-indicator (#PCDATA)&amp;gt; &lt;br /&gt;
	&amp;lt;!ELEMENT recorded-date (date)&amp;gt; &lt;br /&gt;
	&amp;lt;!ELEMENT page-count (#PCDATA)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT correspondent (name, address-1?, address-2?, address-3?, address-4?)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT conveyance-text (#PCDATA)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT patent-assignor (name, execution-date?, date-acknowledged?)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT patent-assignee (name, address-1?, address-2?, city?, state?, country-name?, postcode?)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT patent-property (document-id*, invention-title?)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT name (#PCDATA)&amp;gt;&lt;br /&gt;
	&amp;lt;!ATTLIST name name-type (natural | legal)  #IMPLIED&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT address-1 (#PCDATA)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT address-2 (#PCDATA)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT address-3 (#PCDATA)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT address-4 (#PCDATA)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT execution-date (date)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT date-acknowledged (date)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT city (#PCDATA)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT state (#PCDATA)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT country-name (#PCDATA)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT postcode (#PCDATA)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT document-id (country, doc-number, kind?, name?, date?)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT invention-title (#PCDATA | b | i | u | sup | sub)*&amp;gt;&lt;br /&gt;
	&amp;lt;!ATTLIST invention-title  id   ID     #IMPLIED&lt;br /&gt;
				   lang CDATA  #REQUIRED&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT country (#PCDATA)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT doc-number (#PCDATA)&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT kind (#PCDATA)&amp;gt;&lt;br /&gt;
	&amp;lt;!--bold formatting for text--&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT b (#PCDATA | i | u | smallcaps)*&amp;gt;&lt;br /&gt;
	&amp;lt;!--italic formatting for text--&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT i (#PCDATA | b | u | smallcaps)*&amp;gt;&lt;br /&gt;
	&amp;lt;!--underscore: style - single is default--&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT u (#PCDATA | b | i | smallcaps)*&amp;gt;&lt;br /&gt;
	&amp;lt;!ATTLIST u  style  (single | double | dash | dots )  'single' &amp;gt;&lt;br /&gt;
	&amp;lt;!--superscripted text--&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT sup (#PCDATA | b | u | i)*&amp;gt;&lt;br /&gt;
	&amp;lt;!--subscripted text--&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT sub (#PCDATA | b | u | i)*&amp;gt;&lt;br /&gt;
	&amp;lt;!--small capitals--&amp;gt;&lt;br /&gt;
	&amp;lt;!ELEMENT smallcaps (#PCDATA | b | u | i)*&amp;gt;&lt;br /&gt;
	]&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Inserting Extracted Data into Tables ===&lt;br /&gt;
&lt;br /&gt;
===Clean Up ===&lt;/div&gt;</summary>
		<author><name>RavaliKruthiventi</name></author>
		
	</entry>
</feed>