Ferret File System/v0.1/SQL/map: Difference between revisions

From Woozle Writes Code
Jump to navigation Jump to search
(more explanation)
(redesign)
Line 2: Line 2:
* '''Purpose''': tracks methods of accessing folders on remote hosts, across different FileFerret clients. This is necessary because the root folder of some volumes may not be visible; we only have visibility within one or more specific folders. It is similar to the concept of "mount points"
* '''Purpose''': tracks methods of accessing folders on remote hosts, across different FileFerret clients. This is necessary because the root folder of some volumes may not be visible; we only have visibility within one or more specific folders. It is similar to the concept of "mount points"
** Each FileFerret client looks itself up in the {{l/same|hosts}} table to get its host ID, then filters this table by looking only at records with a matching ID_Host.
** Each FileFerret client looks itself up in the {{l/same|hosts}} table to get its host ID, then filters this table by looking only at records with a matching ID_Host.
* '''Fields''':
** '''ID_Host''': host ID of the computer for which the given record applies
** '''URL''': path from the given [[../hosts|host]] to the given [[../folders|folder]] (folder record specifies volume)
** '''ID_Folder''': folder which the given path allows us to access from the given host
* '''History''':
** '''2013-06-30''' redesigning for Linux's more powerful remote access methods
===Examples===
* '''Host''': 2 (Gonzo) '''Folder''': / on volume SesTera '''URL''': /media/woozle/SesTera
* '''Host''': 2 (Gonzo) '''Folder''': / on volume BunsenMain '''URL''': sftp://root@bunsen/
==SQL==
<mysql>CREATE TABLE `maps` (
  `ID`          INT NOT NULL AUTO_INCREMENT,
  `ID_Host`    INT NOT NULL COMMENT "hosts.ID",
  `ID_Folder`  INT NOT NULL COMMENT "folders.ID",
  `URL`        VARCHAR(255),
  PRIMARY KEY(`ID`)
)
ENGINE = MYISAM;</mysql>
==Obsolete==
This design made more sense for a Windows-only network, where drive root folders were rarely accessible.
* '''Fields''':
* '''Fields''':
** '''ID_Host''': host ID of the computer to whom each map applies
** '''ID_Host''': host ID of the computer to whom each map applies
** '''FileSpec''': absolute path to the root of the map (aka mount point) being described
** '''FileSpec''': absolute path to the root of the map (aka mount point) being described
==SQL==
 
<mysql>CREATE TABLE `maps` (
<mysql>CREATE TABLE `maps` (
   `ID`          INT NOT NULL AUTO_INCREMENT,
   `ID`          INT NOT NULL AUTO_INCREMENT,

Revision as of 22:23, 30 June 2013

About

  • Purpose: tracks methods of accessing folders on remote hosts, across different FileFerret clients. This is necessary because the root folder of some volumes may not be visible; we only have visibility within one or more specific folders. It is similar to the concept of "mount points"
    • Each FileFerret client looks itself up in the hosts table to get its host ID, then filters this table by looking only at records with a matching ID_Host.
  • Fields:
    • ID_Host: host ID of the computer for which the given record applies
    • URL: path from the given host to the given folder (folder record specifies volume)
    • ID_Folder: folder which the given path allows us to access from the given host
  • History:
    • 2013-06-30 redesigning for Linux's more powerful remote access methods

Examples

  • Host: 2 (Gonzo) Folder: / on volume SesTera URL: /media/woozle/SesTera
  • Host: 2 (Gonzo) Folder: / on volume BunsenMain URL: sftp://root@bunsen/

SQL

<mysql>CREATE TABLE `maps` (

 `ID`          INT NOT NULL AUTO_INCREMENT,
 `ID_Host`     INT NOT NULL COMMENT "hosts.ID",
 `ID_Folder`   INT NOT NULL COMMENT "folders.ID",
 `URL`         VARCHAR(255),
 PRIMARY KEY(`ID`)

) ENGINE = MYISAM;</mysql>

Obsolete

This design made more sense for a Windows-only network, where drive root folders were rarely accessible.

  • Fields:
    • ID_Host: host ID of the computer to whom each map applies
    • FileSpec: absolute path to the root of the map (aka mount point) being described

<mysql>CREATE TABLE `maps` (

 `ID`          INT NOT NULL AUTO_INCREMENT,
 `ID_Folder`   INT NOT NULL COMMENT "folders.ID",
 `ID_Host`     INT NOT NULL COMMENT "hosts.ID",
 `Name`        VARCHAR(63) NOT NULL COMMENT "short name for lists",
 `Descr`       VARCHAR(255) DEFAULT NULL COMMENT "longer description",
 `FileSpec`    VARCHAR(255) NOT NULL COMMENT "must not have terminating slash; will be used as prefix for folder chains",
 `isPrimary`   BOOL DEFAULT FALSE COMMENT "is Host primarily responsible for maintaining (scanning) this Folder?",
 `isDrive`     BOOL DEFAULT FALSE COMMENT "TRUE = can be queried for volume and capacity information; may be removable.",
 PRIMARY KEY(`ID`)

) ENGINE = MYISAM;</mysql>