I am sort of new to databases and am looking for a little guidance as to how to set up a database for the following information. I want one master table of all computer names in my domain, which has compname, domain, mac, and IP.
For each computer, I have gathered through a vbscript a list of all installed software and versions of that software. I want to make a table for each computer listing this info, but also dump each software title into a master software list so I have a whole rundown of what is on my domain.
Where I fail to comprehend is how to link the tables via keys and relationships. Unfortunately, my management will not approve a simple software inventory application so I have to resort to this. Any help would be appreciated.
If you have two tables with primary keys and non-key attributes then the final bit (setting up the foreign key) is easy peasy. ALTER TABLE (Transact-SQL) (although long winded, you want to concentrate on example "O")
So I have a table for Computer names with PID (int), CompName, Domain. Each computer has many software titles, and each software title has one version on each computer, but many overall. I guess what I am asking is what the relationship between the CompName table and its corresponding InstalledSoftwareTitles table would be.
You implement this with what is commonly known as an association table. Its primary key is a composite of the primary keys of the Computer and Software.
Lots of resources on the internets: association table database - Google Search