It's UWAweek 47

help1402

This forum is provided to promote discussion amongst students enrolled in CITS1402 Relational Database Management Systems.

Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.

How do I ask a good question?
Displaying the 2 articles in this topic
Showing 2 of 684 articles.
Currently 78 other people reading this forum.


 UWA week 37 (2nd semester, week 7) ↓
SVG not supported

Login to reply

👍?
helpful
9:39am Wed 11th Sep, Mia S.

In the case study, it mentions that tariff type and depot should be recorded when a vehicle is hired - am I correct in thinking that these are foreign keys in the Hire entity (which connects Vehicles and Clients) and hence we shouldn't write them into the Hire attributes on the diagram or in the data dictionary? I'm assuming you'd record the id code of depot and tariff type so they would be FKs in Hire. Also, is there no need to connect the Hire entity with the Depot and Tariff Type entities directly seeing as Hire is connected to Vehicle which is in turn connected to Depot and additionally Vehicle connects to Make which connects to the Tariff Type entity? The case study also mentions that the odometer reading of a car is recorded when the car is hired - should 'odometer reading' then be written as an attribute in Hire, seeing as it is not a PK of Vehicles? Is hire time and date a single-valued attribute of type 'date'? Are type (EV, hybrid, fuel) and make different? Are hirers and clients the exact same? I have a composite key made up of two foreign keys A and B - can I write the composite key in its entity as A{PK} B{PK} in my diagram? And I'm guessing this composite key should be in the data dictionary. How should subclasses be expressed in the attributes data dictionary? Should we list them under the Entities column as usual but in their attributes only mention the attributes unique to that subclass? I'm guessing I should given an indication in the dictionary that they are a subclass of another entity as well. Thank you very much in advance.


SVG not supported

Login to reply

👍?
helpful
1:31am Thu 12th Sep, ANONYMOUS

In the case study, it mentions that tariff type and depot should be recorded when a vehicle is hired - am I correct in thinking that these are foreign keys in the Hire entity (which connects Vehicles and Clients) and hence we shouldn't write them into the Hire attributes on the diagram or in the data dictionary? I'm assuming you'd record the id code of depot and tariff type so they would be FKs in Hire.

From my understanding, UML ERDs are not the same as database schemas; foreign keys are not explicit attributes, they are the database form of relationships in an entity relationship model. Each relationship in the ERM implies foreign keys.

It's difficult to separate the concerns of the database from the ERD since there is specification of types. In my opinion, this is just so the same information can be used when we generate a database to represent the ERM

Also, is there no need to connect the Hire entity with the Depot and Tariff Type entities directly seeing as Hire is connected to Vehicle which is in turn connected to Depot and additionally Vehicle connects to Make which connects to the Tariff Type entity?

See if you run into this problem

fan trap

The case study also mentions that the odometer reading of a car is recorded when the car is hired - should 'odometer reading' then be written as an attribute in Hire, seeing as it is not a PK of Vehicles?

That logic checks out to me

Is hire time and date a single-valued attribute of type 'date'?

You might be asking this because people would think time and date are two different things. This is not true in software or SQL (typically).

Either way, just follow the specification exactly and you'll be fine.

Are type (EV, hybrid, fuel) and make different?

I am suspicious that 'make' is used incorrectly in the case study. Because they mentioned 'all cars are the current model'. That doesn't make sense to me since a Vehicle Make is the manufacturer.

Are hirers and clients the exact same?

Depends on your model.

I have a composite key made up of two foreign keys A and B - can I write the composite key in its entity as A{PK} B{PK} in my diagram? And I'm guessing this composite key should be in the data dictionary.

See my first comment

How should subclasses be expressed in the attributes data dictionary? Should we list them under the Entities column as usual but in their attributes only mention the attributes unique to that subclass? I'm guessing I should given an indication in the dictionary that they are a subclass of another entity as well.

Yeah that sounds right to me

Thank you very much in advance.

I think it's the blind leading the blind here

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  8:08AM Aug 25 2024
Privacy policy