Добавить новость
ru24.net
Все новости
Декабрь
2015

I Dreamed of a Perfect Database

0

Throughout my working life as a web programmer I have always had access to cheap or free databases. Databases are specialized software for creating, storing, managing, and analyzing data. Data is just stuff, or rather, structured stuff: The cells of a spreadsheet, the structure of a Word document, computer programs themselvesall data.

If you have a million customers you can’t just have a million files all over the place. You need to put them somewhere. Enter the database. The database is the unsung infrastructure of the world, the shared memory of every corporation, and the foundation of every major web site. And they are everywhere. Nearly every host-your-own-web-site package comes with access to a database called MySQL; just about every cell phone has SQLite3, a tiny, pocket-sized database, built in.

See that term, SQL? That’s the lingua franca of what’s called the relational database world. It stands for “Structured Query Language.” IBM makes DB2; Oracle has the Oracle Database, currently at version 12c. Then there’s Microsoft SQL Server, MySQL (open sourced and freely available, but owned by Oracle), PostgreSQL, and SQLite. These are just the more famous of the databases that “speak” SQL; what this means in practice is that were one to sit down before a command prompt of any of them and write “SELECT * FROM tracks WHERE musician = ‘Katy Perry’;” all the tracks by Katy Perry would be listed on the screen, assuming that a large database of tracks already exists where each track was associated with a musician’s full name.

Most online catalogues work along these linesthere are tables of, say, screwdrivers, and tables of customers, and there is another table that lists which customer bought which screwdrivers (they might purchase more than one); furthermore there are tables of shipping rates by screwdriver weight; tables of postal tariffs; tables of administrators who have the privileges necessary to update the screwdriver table (who might be separate from those who have the privileges necessary to update the postal tables).

All of these tables relate to one another; “screwdriver #123 was purchased by customer #456” is a fact. Where all this gets particularly interesting is wherever, by traversing the relations between tables (this is done, like anything, by commands issued in SQL), you can discover new things: Where in America do people use more Phillips than flat-head screwdrivers? Where do they buy the most screwdrivers? These are the merits of the “relational” database. Predictable, logical, capable of processing thousands of transactions with provable integrity, so that not one penny is lost: SQL is the perfect servant of capitalism. Who could need anything more?

More than a decade ago, after spending many years building web sites powered by relational databases, I became enamored of graph databases. It was in the air. The idea was that wethe citizens of the internetwould work together and create a “Semantic Web,” a giant open “knowledge graph” of statements in the form of subject, predicate, object, a “triple.” If Paul hasFriend Jim, and Jim hasFriend Betsy, well, then, can’t we infer that Paul and Betsy have Jim in common? We can! We can say all sorts of things about Paul, Jim, and Betsy. We can say that Betsy is a professor at a college and then follow that link to a list of all the departments in the college, or say that Jim is a fan of the Beatles and follow that link to A Hard Day’s Night. In addition to publishing web pages with words and headlines, we’d all start publishing our data in this open, connectable format, and everythingeverything, dammitwould be one giant connection of links.

This was a different approach to data than the relational model, triples instead of tables, with some different theoretical underpinnings. It necessitated new kinds of storage software and new kinds of databases. Begone, SQL databases! Hello, triple stores. There was even an effort called FOAF (which stands for “friend of a friend” and is pronounced “fofe”) that described the social network between individuals. It was totally decentralized and anyone could join it. All you had to do in order to get connected to this social network was find a web host and publish some FOAF RDF in XML format and thenwait, why are you checking Facebook?

Sigh. I once was in charge of the web site for a magazine (this was 2006), and I made the decision to migrate everything to the graph model. We had hundreds of thousands of pages of content, a whole archive, all connected by subjects. I made myself lord of the taxonomy. Instead of a relational database, I used a graph databasean experimental, alpha version. I revised my entire world into a huge set of hundreds of thousands of logical statements about pages, articles, issues, and subjects. Millions of spinning plates.

I was ambitious in inverse proportion to my talent as a programmer, using untested technologies, flattering myself that I understood how they worked. The resulting site was a joy to contemplate, and worked well enough for the readers (who experienced it as a bunch of web pages, unaware of the toil beneath)—and a bear to maintain. About once a month everything would break and I’d stay awake for a night, carefully feeding files into the graph-database loader that I’d custom-coded, like a stoker feeding coal into a firebox. The upshot was that individual web pages took minutes to generate, so I had to “cache” them for later delivery. Instead of ditching the whole framework and starting again, I created yet more programs to manage the caching process, delivering inefficiency on top of inefficiency. No one could update a blog post unless I edited a file on a server in Texas, so I jammed WordPress, a blogging engine built on top of MySQL, on top of the whole thing and jury-rigged a connection between it and my monstrosity.

This is a risk of working alone, without anyone to tell you you’re insane. After it was done, I realized I had no one in particular with whom to share all my lovely knowledge base, except for a few researchers who sent me emails. Then again, everything worked well enough for the readers.

In the late 2000s, there arose the “NoSQL movement,” coalescing around a collective desire of many programmers to move beyond the strictures of the relational model and unshackle themselves from SQL. Our data is varied and diverse, they said, even if the programmers weren’t that varied and diverse, and we are tired of pretending that one technology will address our need for speed. Dozens of new databases appeared, each with different merits. There were the key-value databases, like Kyoto Cabinet, which optimized for speed of retrieval. There were search-engine libraries, like Apache Lucene, which made it relatively easy to search through enormous corpora of textyour own Google. There was MongoDB, which allowed for “documents,” big arbitrary blobs of data, to be stored without nice rows and consistent structure. People debated, and continue to debate, the value of each. Advocates of relational databases often pipe up and say, “You could do that with [insert name of an SQL database]!” and then other people say, “Yes but why should you?” and it goes around and around.

There is as yet no absolute challenger to the relational model. When people think database, they still think SQL. But if there is a true challenger, it is in the graph model. Because graph data structures power social networks, and social networks are the dominant technological organism of the era.

It is a good era for graph databases. In 2010, Google bought a company called FreeBase, which was trying to create a huge open map of reality and then it was, well, part of Google. Twitter released one later that year, called FlockDB. Neo4j is another popular open-sourced database, letting you store all of those knowledge-style relationships. A friend of mine from the Semantic Web days hung in there, and his company built a commercial graph database called StarDog; it has customers like JPMorgan Chase and nasa. There are knowledge graphs everywhere. And of course there’s Facebook, with its billion users and their countless likes, their lists of friends, and its enormous graph of information on just about everything. Facebook is a tremendous user of the graph model, the irony being that their store of facts is so huge, so world-spanning, that they need a flexible way to store all the data that it contains across thousands and thousands of machines. This service, the root source of truth, is provided by many, many versions of MySQL.


Sometimes I get a little wistful. The vision of a world of connected facts, one big, living library, remains beautiful, and unfulfilled. What we have instead are large pools of dataAmazon’s product catalog and reviews, Facebook’s set of likes and social connections, Twitter’s friends and followers, countless magazine and newspaper web sites. Each has its own pressing, commercial needs. They are not averse to sharing information, to seeing their signal spread far and wide. It’s just that everything needs to align with their business goals. That was the mistake I made in my twenties, thinking that somehow just sharing information would be enough, that information would seek out other information and a world library of open graph data would build itself. I don’t think that it is impossible that we’ll get there, someday; it’s just that without the motive power of capital, things move slowly. There are great islands of knowledge on the internet, but not one big pool of knowledge. I used to feel that such a thing was right around the corner. But the web was much smaller then, and now, well, it’s nice to imagine.




Moscow.media
Частные объявления сегодня





Rss.plus




Стратегическая сессия "Россия и соседние страны" пройдет 14 августа в Московском государственном психолого-педагогическом университете

Овик Аванесов: Пожары в Арцахе устроены специально, это часть спланированного культурного геноцида

Вывод песни для продвижения в Импульсе Яндекс Музыка.

В Москве прошла четвертая международная премия в области архитектуры, строительства и дизайна The Fashion Home & Interiors Awards


The 5 biggest global business rivalries to watch, and how their outcomes will shape the future

Ricky Hatton Names The Best British Fighter Of All Time And It’s Not Lennox Lewis

Jovic set for new opportunity after leaving Milan as free agent

£39m United star shouldn't be starting vs Arsenal, was gifting possession to Everton


Представители НПС доложили губернатору Подмосковья о ходе строительства моста в Дмитрове

Термотрансферный принтер этикеток корпоративного класса TSC TTP-342 Pro SUT

Вояж, вояж... VOYAH FREE, обзор от CARS.RU

Специалисты Нацпроектстроя – в фотовыставке ко Дню Строителя


Android-игроки раскритиковали сурвайвл-хоррор Jericho: Survival

Girl Rescue 1.0.3.3

Обзор на мобильную версию A Game About Digging A Hole

Black Hole io 1.5.1



Попади на концерт FEDUK с Like FM

В России появилась универсальная методология нагрузочного тестирования ERP-систем

Gayazov$ Brother$ в Зеленом театре ВДНХ! Like FM дарит билеты

LG CINEBEAM S: ПОГРУЖЕНИЕ В ПРОСМОТР И УНИВЕРСАЛЬНОСТЬ ИСПОЛЬЗОВАНИЯ




Кризис или коррекция. Выдача ипотеки на Алтае упала к показателям, которые были до «Господдержки 2020»

Хазин: Трамп сократил срок ультиматума для России из-за Европы

Велоспорт для всех: начни вместе с ENERGY

Попади на концерт FEDUK с Like FM


Карелия почти на 40% нарастила поставки своей лесопродукции на российский рынок

Воздушные суда из Москвы, Екатеринбурга, Санкт-Петербурга и Камрани 7 августа прилетают во Владивосток вне расписания

Миллиардер, спецпосланник Дональда Трампа перед встречей с Владимиром Путиным позавтракал чебуреком за 500 рублей

Трамп заявил, что не считает переговоры Уиткоффа с Путиным прорывом


Рублёв проиграл Фрицу в 1/4 финала турнира ATP в Торонто

Рублев не достиг полуфинала турнира "Мастерс" в Торонто

Осака достигла полуфинала на теннисном турнире в Монреале

Теннисист Хачанов обыграл Микельсена и вышел в полуфинал турнира ATP


Карелия почти на 40% нарастила поставки своей лесопродукции на российский рынок

Трамп заявил, что не считает переговоры Уиткоффа с Путиным прорывом

Кризис или коррекция. Выдача ипотеки на Алтае упала к показателям, которые были до «Господдержки 2020»

Миллиардер, спецпосланник Дональда Трампа перед встречей с Владимиром Путиным позавтракал чебуреком за 500 рублей


Музыкальные новости

Магазины удаляются от центра // Ввод торговой недвижимости снизится в 2026 году на 70%

В Тамбовской области пройдёт шестой фестиваль "Прима Домра"

Авраам Руссо: Шоу-бизнес потерял лицо

«Это треш, полная дичь»: Волочкова раскритиковала подтанцовку Булановой



Велоспорт для всех: начни вместе с ENERGY

Попади на концерт FEDUK с Like FM

Gayazov$ Brother$ в Зеленом театре ВДНХ! Like FM дарит билеты

LG CINEBEAM S: ПОГРУЖЕНИЕ В ПРОСМОТР И УНИВЕРСАЛЬНОСТЬ ИСПОЛЬЗОВАНИЯ


Москва и Санкт-Петербург: лидеры комфортной жизни для молодёжи России

Песков: для нормализации отношений между Россией и США нужно время

Доктора впервые заметили положительную динамику у впавшего в кому Кеосаяна

Как проверить качество получаемой медицинской помощи по ОМС...


В Москве на видео сняли затопленные до крыши автомобили

Автодилерам и независимым игрокам рынка расскажут, как эффективно продавать комиссионные авто

В Подмосковье на видео сняли разбитые в ДТП большегрузы, затруднившие движение

Клиенты компании «Байкал Сервис» экономят на перевозке сезонных товаров


Во Франции высказались о визите Уиткоффа в Москву

Рубио созвонился с Уиткоффом после встречи с Путиным

Интриги Эрдогана и Зеленского. «Джокер» Путина. Активность над секретным полигоном: Главное к утру

Завершились переговоры между Россией и Малайзией




В Москве задержаны четверо мужчин по делу о пожертвованиях организации «ФБК»

В Москве задержали четверых сторонников ФБК за пожертвования организации


Алексей Тамаров – искусство пластической хирургии

К доктору – без страха: сеть клиник «Будь Здоров» представила VR-решения для детского здоровья

Алексей Тамаров – искусство пластической хирургии

В Москве прошла седьмая премия в области здоровья и красоты THE MEDICAL STARS & BEAUTY AWARDS



Профессиональные бои состоятся в Нижнем Новгороде 9 августа

Велоспорт для всех: начни вместе с ENERGY

«Детям полезно принимать участие в любой движухе, связанной с творчеством, музыкой и спортом!» В Москве завершился Международный фест-форум «Голоса Мира» 2025

В депо «Вязьма» отметили профессиональный праздник соревнованиями по лазертагу




Сергей Собянин: В Москве запущен 220-й электробусный маршрут

Собянин сообщил о сокращении срока регистрации самоходной техники вдвое

Собянин открыл новый МФЦ для самоходной техники

Собянин: Москвариум заботится о тысячах водных обитателей


Частые осадки летом 2025-го являются последствием изменения климата

Энергоэффективность в цифрах: в среднем новые ЖК могут экономить более 20% всех ресурсов, но есть нюанс по платежкам

Мессенджер Max будут обязательно устанавливать на новые смартфоны с сентября

Эксперт обсудил будущие возможности возобновляемых источников энергии в России


"Зачем они так делают?": семья купила три места в купе и тут же кто-то занял четвертое

они лезут командавать вехде и здесь

Что известно о земной бабушке Иисуса и категорические запреты на Анну Летнюю, 7 августа 2025 года

Карелия почти на 40% нарастила поставки своей лесопродукции на российский рынок


Аномальная жара: До +41 °С в Чечне и Ингушетии, +30 °С в Карелии и Архангельске

Амурская область оказалась в числе аутсайдеров по качеству дорог

Защищённый планшет промышленного класса Saotron RT-W11

Коми, Камчатку, Архангельскую, Иркутскую, Калужскую, Костромскую, Курскую, Свердловскую и Оренбургскую области эксперты отнесли к регионам, где на осенних выборах "протестный потенциал выше среднего", говорится в докладе...


Поезда в Крым меняют маршруты и график

Компания «Гранд Сервис Экспресс» информирует об изменениях в курсировании некоторых поездов «Таврия» с осени 2025 года

Прогноз погоды в Крыму на 6 августа

Провокация Британии против РФ и рекорд цен на бензин – главное за день


"Зачем они так делают?": семья купила три места в купе и тут же кто-то занял четвертое

Что известно о земной бабушке Иисуса и категорические запреты на Анну Летнюю, 7 августа 2025 года

Хазин: Трамп сократил срок ультиматума для России из-за Европы

Baijiahao: Захарова поставила США в неловкое положение шуткой о госдолге












Спорт в России и мире

Новости спорта


Новости тенниса
ATP

Хачанов победил Михельсена и вышел в полуфинал турнира ATP в Торонто






К середине века климат в Москве будет напоминать черноморский

они лезут командавать вехде и здесь

"Зачем они так делают?": семья купила три места в купе и тут же кто-то занял четвертое

Карелия почти на 40% нарастила поставки своей лесопродукции на российский рынок