Hi, I'm designin sort of asset manager software and i'm already stuck with some SQL-querys... :) Tables don't have all the fields yet, because it's just a test version. I have these tables: 1)PC (Central database that holds the references to other tables, that hold the actual information) 2) Displays, Machines, Printers (Tables that hold the detailed information about the objects that are managed through this program. Has also the information about the in-house leasing information) 3) LeasingList (Holds references between managed object (display, printer, machine) and the leasing contract number) 4) LeasingContractDetails (Holds the time when certain leasing contract is active (start time, ending time, contract number) I need to make a query, that could fetch me detailed information about one row in PC-table. I need it to fetch the information about the machines leasing information, displays leasing information and also printers leasing information. Theres three different rows (maybe also null values) that i need displayed from the leasingContractDetails. Image of database with connections. Fields are in finnish, but there a some explanations.
I'm not sure is this bad database design or what, but i am open to suggestions. Thanks in advance, Jyrki Heinonen |