• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

mazed by the relationship between flight and date

 
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do need to add flight schedule class to present the flight desparture date and time
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Why is the word "abbreviation" so long? And this ad is so short?
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic