r/DatabaseHelp • • May 04 '18

Shared Data Across Different but similar objects

At work I'm building a database to interface with [TestProgram.exe] The test program needs to call and store the following typedef struts in a database:

Part Objects:

  • Shared info
  • Product family (Nokia, Samsung, Honda)
  • Product Model (Lumia, Galaxy, Civic)
  • Parts (inherits Shared info)
  • Life cycle Stage ([Active/End of Life/Obsolete])
  • Tests needed to pass (Camera test, call home, start engine)
  • Generic Tests (inherits Shared info)
  • Test ID number (SHA 256 Hash)
  • Last modified (date)
  • [Other generic data]
  • Specific Test Type A (inherits Generic Tests)
  • [Specific Test criteria For Test Machine A]
  • A Machine G-Code (Non-searchable)
  • Specific Test Type B (inherits Generic Tests)
  • [Specific Test criteria For Test Machine B]
  • B Machine G-Code (Non-searchable)

User Object

  • Tester
  • Name
  • ID no
  • PW Hash

Test Report Object

  • Report ( inherits Parts, Tester, and Specific Test Type A or B)
  • Part Info
  • Test Date
  • Test Type
  • Tester.Name
  • Pass/Fail
  • Test Report (In binary .rtf)

  1. How can I make my database tables best take advantage of the fact that the majority of the data of Specific Test Type A and Specific Test Type B is shared?
  2. Parts and Specific Test Type A/Specific Test Type B have a many to many relationship what is the best way I can represent this while taking advantage of the fact Generic Tests class?
1 Upvotes

0 comments sorted by