- Avoid such wide tables
- More natural SQL modelling
- Conceptual redundancy between human.name and doc.name
CREATE TABLE human ( # http://www.w3.org/2000/10/swap/test/demo1/biology#Human
id INT PRIMARY KEY,
name varchar(255), # http://www.w3.org/2000/10/swap/test/demo1/friends-vocab#name
pet INT # http://www.w3.org/2000/10/swap/test/demo1/friends-vocab#pet
);
CREATE TABLE dog ( # http://www.w3.org/2000/10/swap/test/demo1/biology#Dog
id INT PRIMARY KEY,
name varchar(255) # http://www.w3.org/2000/10/swap/test/demo1/friends-vocab#name
);
INSERT INTO human VALUES (6, 'Pat Smith', 7);
INSERT INTO dog VALUES (7, 'Rover');
mysql> select * from human, dog where human.pet=dog.id;
+----+-----------+------+----+-------+
| id | name | pet | id | name |
+----+-----------+------+----+-------+
| 6 | Pat Smith | 7 | 7 | Rover |
+----+-----------+------+----+-------+