Design / scratch document for the PostgreSQL schema for the 1.5 series

This design will be stringly based on Toby's 1.1 schema, with changes
necessitated by shelve implementation changes in 1.3.x

TABLES:
NameIndex (
	filename
	packagename
	arch 
	release
	epoch 
	version
	size)
SourceIndex (
	srcfilename
	packagename
	arch )
DependFiles (
	package
	dependsOnFilename )
DependPackages (
	package
	dependsOnPackage )
Provides (
	name
	flags
	vers )
Obsoletes (
	name
	flags
	vers )
Files (
	pkgname
	filename )
Channel (
	channelName
	rpmPackageName )

This is a basic list of what the first-revision would look like.  We're not
going to try to put it into some sort of normal form.

Note: This lists the types as well - some of the 'text' fileds could probably
be char(X)'s instead for speed...

PackageName (
	int pkgNum
	text pkgName
	);
		This table lists the package names (i.e. 'kernel')
RPMPackages (
	int pkgNum
	text filename
	text version
	text release
	text epoch
	text arch
	int size
	);
		This provides information on binary RPM packages
SRPMPackages (
	int pkgNum
	text filename
	);
		This provides information on source RPM packages
Files (
	int fileNum
	text fileName
	);
		This lists files within the packages (not filenames of
		packages)
DependFiles (
	int fileNum
	int pkgNum
	);
		This correlates file dependency information
DependPackages (
	int pkgNum
	int pkgNum
	);
		This correlates package dependency information
Provides (
	int provideNum
	text name
	text flags
	text vers
	);
		This stores information on what resources are provided
Obsoletes (
	int obsoleteNum
	text name
	text flags
	text vers
	);
		This stores information on what resources are obsoleted
PkgProvides (
	int pkgNum
	int provideNum
	);
		This correlates provision with package doing the providing
PkgObsoletes (
	int pkgNum
	int obsoleteNum
	);
		This correlates obsoletion with package doing the obsoleting
Channels (
	int channelNum
	text channelId
	int parentChannelNum
	text channelName
	text channelLabel
	text channelArch
	text channelRelease
	text channelDescription
	time channelLastUpdated
	);
		This lists the channels available
PkgChannels (
	int pkgNum
	int channelNum );
		This tells what packages are in what channels

Obviously, this is a first run only, isn't SQL code, and doesn't have any sort
if indices or anything...  comments?

---- NEW STUFF ----
This is where I'm going to start dropping hints of what I'm thinking about
for client tracking in the 1.7 series.  As of this writing, the 1.5 series
is pretty much ready for a 1.6.0 release, with only some code cleanups left
(although there are quite a few of those...).

My main goal for 1.7 is to enable tracking of specific clients.  I'm not 
planning on adding any sort of connection to users (admins?) at this point,
nor am I planning on doing any sort of interface coding for controlling the
client / channel memberships.  Initially, that will all be handled by issuing
SQL statements yourself - 1.7 is after all a development series.

We desperately need someone who's good with interfaces to help out with a
"client management" type thing - even if it's just a rough sketch at first.
I'm willing to work with you as much as I need to to get you up to speed on
what's in the DB and what you need to make available as far as functionality
to the user/admin/monkey on the other end of the HTTP/HTTPS connection.

So, with that said, here we go.

Items we need to track per client:
(I'm being as thorough as possible - if we don't need to track a certain item,
we can remove it later.)
Hardware profile (more details later)
Package list (will be join table)
sysauth_dict (i.e. the "system user id" - not actual user, just user ID)
user (actual users)
orgstuff (in register_product())
serial, OEMID

This is where it starts to get messy again.

The major important key that will appear throughout all the tables is the
sysid - yes, the same one passed back to the client, so be ready for
fun. (This is actually the system_id member of the sysid structure.)



