modeling

Automatic update of MYSQL table according to date

I have a MYSQL table that holds events information. I need a mechanism that updates the status of each event according to its date ("over" if its a past date). What´s the best way to do such a thing? Update the status of the event when the any user logs in (useless routine for most users), create some sort of internal task (like a cron j...

Loading the data for a Simulink Lookup Table from a file

Hello, I've built a Matlab/Simulink model that I'm using to simulate the performance of an underwater robotic vehicle that uses acoustics for various key navigation and localisation functions. Since the characteristics of the ocean change with seasonality and geolocation, I would like this data to be dynamically loaded into the model f...

How do you model a table for unit conversion?

I'm looking to create a db model of various units and their relation to each other. For instance, 36 inches = 3 feet = 1 yard = .9144 meters etc. This table would also store cups in ounces, pounds, kg, grams, cm and all sorts of measurements. How do you do this? I was thinking about something like this: Amount | Units | Convers...

Easy to use UML-like documentation methods

Hi, I am working on product which is essentially procedural (C) code in OOPs body (C++) resulting in hard to understand architecture. As I dig through the code, I want to document my understanding in simplified notation. To give an example I would like to document a given function in following format Function Library Module Compon...

Power Set and Union

Following set is given: X := {Horse, Dog} Y := {Cat} I define the set: M := Pow(X) u {Y} u for union The resulting set of the power set operation is: Px := {0, {Horse}, {Dog}, {Horse, Dog}} 0 for empty set My question is referenced to the unio operation. How do I unite 0 and Y? M := {{Horse, Cat}, {Dog, Cat}, {Horse, Dog, Ca...

Relational database design - Two Relations 1:1 or one 1:2 ?

Hello everyone! This question is about how to design a SQL relationship. I am pretty newbie in this matter and I'd like to know the answers of (way) more experts guys... I am currently migrating a ZopeDB (Object oriented) database to MySQL (relational) using MeGrok and SqlAlchemy (although I don't think that's really too relevant, sinc...