suggestions for database use from new horde app
Steffen <[email protected]>
| Newsgroups | gmane.comp.horde.devel |
|---|---|
| Message-ID | <alpine.DEB.2.11.1503201023190.3680@pc-2m63> |
Hi,
I'm developing a new Horde app, which hooks shall be able to store
arbitary data, mostly to record status information from call to call. The
intended useage is less than 1KB, but I do not have no idea, what can be
"sane", so the data may become GB in size. It's an admin-supplied value
after all.
I intend to offer the hooks an API like these snippets sketch:
putData(mixed $data);
$data = getData();
with this implemenation:
putData($data)
// INSERT / UPDATE data for primary key $user and field hook
this->lowLevelPut(this->$user, 'hook', serialize($data));
getData()
return unserialize(this->lowLevelGet(this->$user, 'hook'));
There are no searches, no calculations, no constrains or whatsoever.
'hook' is the fixed name of the attribute / SQL field name, user is the
current user. There shall exist one record per user at most, which is
updated or created by putData().
A SQL table would look like:
CREATE TABLE name (
owner VARCHAR(..) PRIMARY KEY NOT NULL,
-- ^^ user
hook TEXT,
-- ^^ unlimited TEXT field the lowLevel functions put into / get from
... other fields
);
===========
Is there a documentation, how to get started with databases at a
Horde-level, so I need not get into the deeps how to write the conf.xml in
order to allow the admin choose any database backend Horde supports, incl.
filesystem etc.pp.? Shall I go for RDO (like sesha)?
In fact, I'm currently looking into mnemo's way of accessing the database.
--
Steffen
--
dev mailing list
Frequently Asked Questions: http://wiki.horde.org/FAQ
To unsubscribe, mail: [email protected]