I’m building a query and as I’m building it, I’m realizing that it’d be easier to write if some of the tables contained redundant fields; it’d save a few joins. However, doing so would mean that the database model would not be totally normalized.
I’m aiming for performance; will having a denormalized database impede performance? I’m using SQL Server.
Thanks.
I don’t know exactly what your implementation is, but it normally helps to have redundant index references, but not redundant fields per se.
For example, say you have three tables: tbl_building, tbl_room, and tbl_equipment. (An equipment belongs to a room, which belongs to a buildng)
tbl_building has a buildingID, tbl_room has a roomID and a reference to buildingID. It would save you a join if your tbl_equipment had a reference to both roomID and buildingID, even though you could infer the buildingID from the roomID.
Now, it would not be good if, for example, you have the field buildingSize on tbl_building and copy that buildingSize field to tbl_room and tbl_equipment.