Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Wednesday, November 11, 2026
About Us
Magazine
Open Source
CVS
Services
Index  »  Projects  »  phpMyEdit  »  Forum  »  Asset database creation

phpMyEdit General     Asset database creation
Post new topic   Reply to topic    
 
petef     Joined: 02 Jul 2008   Posts: 3  
Post Posted: 2008-07-03 16:52
Back to top  Reply with quote     

Hi guys

Im pretty new to this so please bear with me. I've created an asset database using pme with a html front end. The table information is listed below, as you can see a lot of fields, I have created seperate tables for the dropdown boxes like location, type etc and seperate input screens to update these tables. The seperate tables have there own keys etc Ive read about using foreign keys and joins in mysql but have no experience in implementing this with pme.

My problem is that a pc could have more than one piece of software installed\attached to it, my current database only allows for the recording of the windows os and the office version but obviously there could be a lot of other software installed, I could add loads more fields but this could just make it unusable. Any suggestions on how best to rectify this problem ??

Thanks for your time and help

Pete

hw prefix = hardware
sw prefix = software

asset_id | int(11) | NO | PRI | NULL | auto_increment |
| asset_no | int(11) | YES | | NULL | |
| purchase_date | date | YES | | NULL | |
| hw_purchase_order | int(15) | YES | | NULL | |
| hw_capex_no | int(15) | YES | | NULL | |
| hw_invoice_no | int(20) | YES | | NULL | |
| x_nightspeed | varchar(1) | NO | | | |
| user | varchar(30) | NO | | Invalid no user | |
| machine_name | varchar(30) | YES | | NULL | |
| department_id | int(11) | NO | | | |
| department | varchar(30) | YES | | NULL | |
| location | varchar(30) | YES | | NULL | |
| make | varchar(20) | YES | | NULL | |
| model | varchar(20) | YES | | NULL | |
| serial_number | varchar(20) | YES | | NULL | |
| type | varchar(20) | YES | | NULL | |
| CPU_speed | varchar(20) | YES | | NULL | |
| CPU_type | varchar(20) | YES | | NULL | |
| RAM_size | int(11) | YES | | NULL | |
| HardDisk_size | int(11) | YES | | NULL | |
| sw_supplier | varchar(40) | YES | | NULL | |
| sw_purchase_order | int(15) | NO | | | |
| sw_capex_no | int(15) | NO | | | |
| sw_invoice_no | int(10) | NO | | | |
| OS_version | varchar(10) | YES | | NULL | |
| OS_license | varchar(30) | YES | | NULL | |
| software_version | varchar(30) | YES | | NULL | |
| sw_type | varchar(20) | NO | | | |
| Office_license | varchar(30) | YES | | NULL | |
| VirusScan_version | int(11) | YES | | NULL | |
| screen_asset | int(11) | NO | | | |
| screen_make | varchar(20) | YES | | NULL | |
| screen_model | varchar(20) | YES | | NULL | |
| screen_serial | varchar(20) | YES | | NULL | |
| hw_supplier | varchar(40) | YES | | NULL | |
| last_change | timestamp | YES | | 0000-00-00 00:00:00 | |

 
michal     Joined: 17 Jun 2003   Posts: 537   Location: Slovakia
Post Posted: 2008-07-08 02:32
Back to top  Reply with quote     

http://opensource.platon.sk/projects/doc.php/phpMyEdit/html/configuration.input-restrictions.html

is a good start. however you will be stuck if a computer has two monitors.

 
petef     Joined: 02 Jul 2008   Posts: 3  
Post Posted: 2008-07-08 09:29
Back to top  Reply with quote     

Hi Michal,

Thanks for replying, you are correct and thats exactly my problem if I want to add lots of software for instance to my database to each machine I cannot as I am restricted to only adding windows keys and Office keys unless I add loads more fields. Im a little confused as to how to now change the database to be relational based on the users.

I have made a copy of the database and tried slicing it up into seperate tables but now Im stuck ??

Any help or examples greatly appreciated

Pete

 
Icehawg     Joined: 09 Apr 2008   Posts: 20  
Post Posted: 2008-07-08 19:35
Back to top  Reply with quote     

You need to change your implementation to make it work the way you want. Minimum of 3 tables.

Table 1
User table.
unique ID
Username
userid
location
etc...

Table 2
Assets table
unique ID
Asset Name
Serial #
Make
Model
etc....

Table 3
Assignment table. (where you assign users to assets or vice versa)
user_ID (using unique ID from user table)
asset_ID (using unique ID from asset table)

You would then need 3 front end web pages.
1 to admin users
1 to admin assets
1 to admin assets to users and users to assets.

 
petef     Joined: 02 Jul 2008   Posts: 3  
Post Posted: 2008-07-09 16:39
Back to top  Reply with quote     

Thanks for the reply Icehawg,

Im still confused I'm afraid. I have created a new database where i have split the data into seperate tables ie, users, locations, hardware_assets, software_assets, suppliers etc and now I have mutliple tables with individual keys. How do I now JOIN and associate the information ie:

Table Unique ID Data
user ID = 1 = Fred Blogs
Location ID = 2 = IT
Hardware Asset ID = 1 = HP 4300
Software ID = 1 = Windows XP license 222 -222 - 222
= 3 = Office 2003 license 111-111-111-111
= 5 = Visio 2003 license 111-111-111-111


Thanks

Pete

 
Post new topic   Reply to topic    

Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top · Feedback form · Application form
Report bug on PLATON.SK website · Terms of use · Privacy policy