Taylor4484 / cs327e-wcdb

cs327e-wcdb
http://www.cs.utexas.edu/users/downing/cs327e/drupal/wcdb1
2 stars 1 forks source link

Databases #37

Closed Taylor4484 closed 11 years ago

Taylor4484 commented 11 years ago

https://piazza.com/class#spring2013/cs327e/174

Here are my thoughts about tables. You can't just have 3 tables. You have to have extra tables to deal with the multiplicity of certain data values (locations, crisis/people/org types, etc)

Downing suggests using joining tables, which is essentially the same thing.

Taylor4484 commented 11 years ago

Databases:

create table Crisis (
  crisisIdent text,
  Name text,
  Kind text,
  StartDateTime dateTime,
  EndDateTime dateTime,
  EconomicImpact text
  );

create table Organization (
  organizationIdent text,
  Name text,
  Kind text,
  History mediumtext,
  Telephone text,
  Fax text,
  Email text,
  StreetAddress text,
  Locality text,
  Region text,
  PostalCode text,
  Country text
  );

create table Person (
  personIdent text,
  FirstName text,
  MiddleName text,
  LastName text,
  Suffix text,
  Kind text
  );

create table Location (
  parentIdent text,
  Locality text,
  Region text,
  Country text
  );

create table Kind (
  parentIdent text,
  Type text,
  Name text,
  Description text
  );

create table ExternalResources (
  parentIdent text,
  Type text,
  Value text
  );

create table PersonRelation (
  personIdent text,
  otherIdent text,
  Type text
  );

create table CrisisRelation (
  crisisIdent text,
  otherIdent text,
  Type text
  );

create table OrganizationRelation (
  organizationIdent text,
  otherIdent text,
  Type text
  );

create table HumanImpact (
  parentIdent text,
  Type text,
  Number int
  );

create table ResourcesNeeded (
  parentIdent text,
  ResourceNeeded text
  );

create table WaysToHelp (
  parentIdent text,
  WaysToHelp text
  );