Suggestions for table design
Posted by: Todd Schacherl
Date: July 01, 2020 11:28AM

Each day I get a CSV file of a list of computers. Right now what I do is delete everything and re-import the day's CSV file which includes the status of each. I'm wondering what would be the best way to import that data and then be able to look at the most recent status for each computer based on the most recent import.

Computers
---------------
id
hostname
status
account

Would it be better to split that into two tables like so:

Computers
---------------
computer_id
hostname
account

Computer_statuses
-----------------
status_id
computer_id
status

What would the query look like to get the most recent status for all computers in a particular account?

Options: ReplyQuote


Subject
Written By
Posted
Suggestions for table design
July 01, 2020 11:28AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.