Large, Interconnected Data Belongs to a Database

Large, Interconnected Data Belongs to a Database

Diomidis Spinellis

iF YOUR APPLiCATiON is going to handle a large, persistent, interconnected set of data elements, don’t hesitate to store it in a relational database. In the past, RDBMSs used to be expensive, scarce, complex, and unwieldy beasts. This is no longer the case. Nowadays, RDBMS systems are easy to find—it is likely that the system you’re using already has one or two installed. Some very capable RDBMSs, like MySQL and PostgreSQL, are available as open source software, so cost of purchase is no longer an issue. Even better, so-called embedded database systems can be linked as libraries directly into your appli- cation, requiring almost no setup or management—two notable open source ones are SQLite and HSQLDB. These systems are extremely efficient.

If your application’s data is larger than the system’s RAM, an indexed RDBMS table will perform orders of magnitude faster than your library’s map collec- tion type, which will thrash virtual memory pages. Modern database offer- ings can easily grow with your needs. With proper care, you can scale up an embedded database to a larger database system when required. Later on, you can switch from a free, open source offering to a better-supported or more powerful proprietary system.

Once you get the hang of SQL, writing database-centric applications is a joy. After you’ve stored your properly normalized data in the database, it’s easy to extract facts efficiently with a readable SQL query; there’s no need to write any complex code. Similarly, a single SQL command can perform complex data changes. For one-off modifications—say, a change in the way you organize your persistent data—you don’t even need to write code: just fire up the database’s direct SQL interface. This same interface also allows you to experiment with queries, sidestepping a regular programming language’s compile–edit cycle.

??96 97 Things Every Programmer Should Know

?

???????????????Another advantage of basing your code around an RDBMS involves the han- dling of relationships between your data elements. You can describe consis- tency constraints on your data in a declarative way, avoiding the risk of the dangling pointers you get if you forget to update your data in an edge case. For example, you can specify that if a user is deleted, then the messages sent by that user should be removed as well.

You can also create efficient links between the entities stored in the database any time you want, simply by creating an index. There is no need to perform expensive and extensive refactorings of class fields. In addition, coding around a database allows multiple applications to access your data in a safe way. This makes it easy to upgrade your application for concurrent use and also to code each part of your application using the most appropriate language and platform. For instance, you could write the XML backend of a web-based application in Java, some auditing scripts in Ruby, and a visualization interface in Processing.*

Finally, keep in mind that the RDBMS will sweat hard to optimize your SQL commands, allowing you to concentrate on your application’s functional- ity rather than on algorithmic tuning. Advanced database systems will even take advantage of multicore processors behind your back. And, as technology improves, so will your application’s performance.

时间: 2024-10-12 16:20:55

Large, Interconnected Data Belongs to a Database的相关文章

Create Data Source when using DataBase

Open the control panel. Open "Administrator Tools" ? 3. Open "Data Source(ODBC)" and Select "Add" ? 4. Select "MySQL ODBC 5.3 Unicode Driver" or "MySQL ODBC ANDI Driver" and then "Finish" ? 5. De

Create Oracle Enterprise Manager repository data after restore a database from another server

1. Set password for SYS in password file: orapwd file=$ORACLE_HOME/dbs/orapw<ORACLE_SID> 2. Drop repos data copied from the original database ( you may need to unlock sysman user first ): emca -deconfig dbcontrol db -repos drop 3. If emca cannot dro

什么情况下使用large training data会非常有效

收集大量的数据可能比算法的优劣更重要 Banko和Brill在2001年做了一个研究,是关于在句子中对易混单词进行识别,画出了上图的右边的那个图,这个图显示了对于不同的算法,它们的表现相似,但是随着training set size的增加,不同的算法的性能都增加.这个说明了一个较劣势的算法,如果它有大量的数据的话,在这个例子中,它的表现会对优秀的算法只有少量的数据要好.了解到这个情况,我们就知道了,在特定的情况下(数据量的提升对改进算法有效),我们应该把精力放在收集大量的数据上,而不是用来选择某

Data Guard - Snapshot Standby Database配置

转载自:https://blogs.oracle.com/Database4CN/entry/data_guard_snapshot_standby_database 概述 一般情况下,物理standby数据库处于mount状态接收和应用主库的REDO日志,物理standby数据库不能对外提供访问.如果需要只读访问,那么可以临时以read-only的方式open物理备库,或者配置ACTIVE DATA GUARD,那么物理standby数据库可以进行只读(read-only)访问(比如报表业务查

[XAF] Simplifying integration of custom controls bound to data from XAF application database

ASP.NET:  http://www.screencast.com/t/OHhcHD9vy WinForms: http://www.screencast.com/t/8M8K4eskkYO9

On the development of a new generation of large data distributed relational database initiative

Li Wanhong The modern era has entered the age of big data, while the NoSQL database to support SQL and things not to force, therefore, the development of a new generation of large data distributed relational database is around the corner, this is a n

DataBase vs Data Warehouse

Database https://en.wikipedia.org/wiki/Database A database is an organized collection of data.[1] A relational database, more restrictively, is a collection of schemas, tables, queries, reports, views, and other elements. Database designers typically

Oracle Database 12c Data Redaction介绍

什么是Data Redaction Data Redaction是Oracle Database 12c的高级安全选项之中的一个新功能,Oracle中国在介绍这个功能的时候,翻译为“数据编纂”,在EM12c R3的中文界面中,这个功能被翻译成“数据编写”,我认为后一个翻译更贴切. 在12c发布前,某次以“数据库安全”为题目的技术交流中,有一个客户问我们,Oracle数据库里面能不能实现这么一个功能:符合条件的用户可以看到表里面的所有数据,而另外一些人(业务权限低的用户)虽然能查询表,但是某些敏感

How to reduce the size of logging database OR How to purge the old data from Logging Database

WSS logging database grows very fast and it cause the storage problem most of the time in sharepoint server 2010. To reduce the size of the logging database or to purge the old data from the logging database we can these steps. To find the Logging Da