Društvo LJUDMILA
Rozmanova ulica 12
1000 Ljubljana
Slovenia
Prostori: osmo/za

Advanced PostgreSQL

Interfacing

  • Console
  • GUI: pgadmin, tora
  • Web: wdbi, phppgadmin
  • Programs

Mathematics

  • Sets
  • Domains
  • Relations
  • Primary keys

Users, Schemas, Catalogs, Databases

Cool SQL tricks

  • subqueries
  • views

Functions

  • Many languages: SQL, Perl, Python, C
  • Many libraries for these languages
  • DB serves as linker + application framework ==> stability, dynamic environment


Dynamic SQL

text wdbi.eval(sql_expression) - evaluate SQL expression, return result as text. Expression must return scalar.

numeric wdbi.execute(sql_statement) - execute SQL statement, return number of affected rows

Quote

Relational systems are useful for a wide variety of tasks specifically because they are limited in their expressive power. This limitation in their expressive power means that certain desirable properties are maintained.

The objects that are recognized in the relational programming model are scalars, tuples and tables. Most operations are closed on the set of all tables -- that is to say the take tables and produce tables. This means that you can compose operations in various kinds of ways and still have more raw material for further operations.

To take a more modern view of this: relational databases are about the reuse of facts. The process of designing a database is one of analyzing factual relationships so that eventually each fact is stored in one and only one place. This, along with the closed nature of relational operations, facilitates recombining these facts in various novel ways. I believe this is the source of the relational model's sustained popularity.

The cost is that the resultant [sic] model is not ideal for any single application. I believe this is the nature of the "impedence [sic] mismatch" -- you are dealing with an off-the-rack, one-size-fits-most-applications representation of data. Naturally, for complex applications with severe performance constraints, a more tailored representation is required.

--hey!, slashdot.org