Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

mazed by the relationship between flight and date

 
chao cai
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For every flight can appear every day,so the flight object may have the date attribute,but this will lead to much duplicate information(especial persist the flight data in the table which include the flight number and date field).
But if move the attribute date to segment,not include the date field in flight table will lead us can not present the equipment changed on someday .
Did the exam winners include the date attribute in flight object?
 
chao cai
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do need to add flight schedule class to present the flight desparture date and time
 
Milan Veneziani
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you please tell me what are you reffering to? I suppose you are discussing some existing description of assigment -- can you please send me the link?
 
Ali Reza Hosseini
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i don't think that there is a flight schedule class necessary.

remember that the flight class is only the
object oriented representation of the data being stored in a
relational database so there is no need for having an one-to-one
mapping between the classes and the entity types.

if you want to reduce redundancy in the database, you can
improve a table having only flights and another table having
schedule information stored in it and make sure that there is
a relationship between these tables.

in the OO-representation you can read data from both tables an
join them to the flight object which has flight information
and schedule data as well.

alireza
 
chao cai
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
but I think flight and flight schedule(flight timetable) are two different concept,when mention to flight we mean from where to where,but flight schedule mean what time the flight will run?
 
Ali Reza Hosseini
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
chao,
your concept correct ...
what I want to mention is, that there not necessarily has to be
a flight schedule class, you can handle it with only one class.

as you also have surely experienced it already
there are always many different ways to solve the same problem.

alireza
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic