0
Table: Unit
ID NAME VALUE
1 Kilo 1000
2 Mega 1000000
3 Giga 1000000000
Table: Storage
ID Title Drive_value Drive_unit_ID Cache_value Cache_unit_ID
1 Seagate 100 3 400 1
2 Scansoft 250 3 80 2
關係:
Storage.Cache_unit_ID references Unit.ID
Storage.Drive_unit_ID references Unit.ID
預期目標: 做一個SELECT * FROM存儲,顯示 'AS' 驅動新列和 'AS' 緩存並通過乘以適當的單位來顯示.VALUE
Title Drive Cache
Seagate 100000000000 400000
Scansoft 250000000000 80000000000