version 1.57, 2003/07/30 16:49:27
|
version 1.58, 2004/05/03 16:20:57
|
Line 41 Note that a lonsql.pid file contains the
|
Line 41 Note that a lonsql.pid file contains the
|
|
|
=head1 OVERVIEW |
=head1 OVERVIEW |
|
|
The SQL database in LON-CAPA is used for catalog searches against |
|
resource metadata only. The authoritative version of the resource |
|
metadata is an XML-file on the normal file system (same file name as |
|
resource plus ".meta"). The SQL-database is a cache of these files, |
|
and can be reconstructed from the XML files at any time. |
|
|
|
The current database is implemented assuming a non-adjustable |
|
architecture involving these data fields (specific to each version of |
|
a resource). |
|
|
|
=over 4 |
|
|
|
=item * title |
|
|
|
=item * author |
|
|
|
=item * subject |
|
|
|
=item * notes |
|
|
|
=item * abstract |
|
|
|
=item * mime |
|
|
|
=item * language |
|
|
|
=item * creationdate |
|
|
|
=item * lastrevisiondate |
|
|
|
=item * owner |
|
|
|
=item * copyright |
|
|
|
=back |
|
|
|
=head2 Purpose within LON-CAPA |
=head2 Purpose within LON-CAPA |
|
|
LON-CAPA is meant to distribute A LOT of educational content to A LOT |
LON-CAPA is meant to distribute A LOT of educational content to A LOT |
Line 139 use strict;
|
Line 103 use strict;
|
|
|
use lib '/home/httpd/lib/perl/'; |
use lib '/home/httpd/lib/perl/'; |
use LONCAPA::Configuration; |
use LONCAPA::Configuration; |
|
use LONCAPA::lonmetadata(); |
|
|
use IO::Socket; |
use IO::Socket; |
use Symbol; |
use Symbol; |
Line 511 sub do_sql_query {
|
Line 476 sub do_sql_query {
|
#prepare and execute the query |
#prepare and execute the query |
my $sth = $dbh->prepare($query); |
my $sth = $dbh->prepare($query); |
unless ($sth->execute()) { |
unless ($sth->execute()) { |
&logthis("<font color=blue>WARNING: ". |
&logthis('<font color=blue>'. |
"Could not retrieve from database: $@</font>"); |
'WARNING: Could not retrieve from database:'. |
|
$sth->errstr().'</font>'); |
} else { |
} else { |
my $aref=$sth->fetchall_arrayref; |
my $aref=$sth->fetchall_arrayref; |
foreach my $row (@$aref) { |
foreach my $row (@$aref) { |
Line 971 sub DISCONNECT {
|
Line 937 sub DISCONNECT {
|
} |
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# ----------------------------------- POD (plain old documentation, CPAN style) |
|
|
|
=pod |
=pod |
|
|
=back |
=back |