Hi Chas,
you can build a database for each school. XQuery has the ability to query over all these databases.
Another approach would be to create a collection and create for each school a document. Like: create db data add as schoolname <school name="school1/>
Your mentioned approach would work, too.
I guess it's a matter of how big the single documents (data) for each school would be.
-- Andreas
Am 13.03.2011 um 22:15 schrieb Charles F. Munat:
Hello,
I'm building a Web-based application that tracks students in various schools. Much of the data is tree-structured, and, after numerous attempts, I've given up on using an RDBMS. It's a hammer and I need a wrench.
The schema for each school's data will be the same. Sitting above the schools is the "project" for which the application is being built.
The project needs to be able to query across multiple or all schools in order to run various analyses. So I want all the data in a single database, if possible.
But each school, I think, should be it's own "segment" of the database. That way, when a project manager logs in, he or she can look across all the segments, but when a school coordinator logs in, he or she accesses only the data for that school. I hope this makes sense.
I am not really very familiar with how the BaseX DB is organized. I don't want individual XML files (do I?). I just want a database filled with data. So how do "collections" work? How would I segment the database so that schools are separate whiles still providing easy cross-school access for project personnel?
I could just do something like this:
<project> <project-data/> <school id="1"/> <school id="2"/> </project>
Where each school is simply an element under the root "project" element (with project data stashed away in a "project-data" element, or equivalent). But is there a better way?
What is the best practice here? I am running the DB unembedded.
Thanks!
Chas. Munat Somewhere in South America _______________________________________________ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk