• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: db design and WOIFrame or AJaxUpdateCOntainer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: db design and WOIFrame or AJaxUpdateCOntainer


  • Subject: Re: db design and WOIFrame or AJaxUpdateCOntainer
  • From: David Avendasora <email@hidden>
  • Date: Fri, 3 Oct 2008 11:35:17 -0400


On Oct 3, 2008, at 11:00 AM, WebObjects wrote:

Hello, Well I have a dilemma here. Im not too good with db desings,.. so what I have its the following:

A table Employee with the following attributes:

id:PK
eMail
name
password.

a table Turn with the following

day (The name of the week day)
id:PK
code
startingTime
endTime
maxEmployee

What is code? What is maxEmployee?



and a Join table created via (create relationship button)

TurnXEmployee
id:pk
dateOfTurn
code
idEmployee
idTurn

the code's atributes are like the oid's

Hmm.... This implies that each Turn can have multiple employees working on it and the dateOfTurn and code can be different for each Employee/Turn combination. That doesn't seem right. If two employees can be assigned to one Turn, then the date should be the same too, right?


ok so a few questions... should I put the eMail as Pk in the EOModel..

NO! Email addresses can change. Also, since you are designing a DB from scratch, NEVER use a real-world piece of information as a PK. NEVER. You are only asking for trouble later when something that everyone says will never change, changes.


or just put it as Unique in the db schema in openbase?

Yes, if it is really, truly unique. Is it possible for an Employee to have more than one address? Can an address migrate from person to person as they come and go?


the same question as for the codes.?

Same answer and questions as eMail.

in the TurnXEmployee, I will need to add the code as pk(inEOModeler) or unique(in the DB)? this is because a Employee may have multiple turns, btu at the same time multiple turns of day "monday" ie.
and the same question for eMail in Employee table?

What exactly is the code field doing for you?

Now. I asked a few days ago about the way to make this work. Overview: An Employee will log in to the system ( via eMail and password) and then a new page loads with a selectable calendar made with JS. when the user selects a day then in the right part of the page the turns for the selected day (day of the week) (mon - sun) will appear and the user can select during what time he want to work. and then submit. I read about the AjaxUpdateContainer, and the bindings it should have. but I dont know too much about JS or Ajax. (Im on the process in learning, pain in the ass), my question its.. if a WOIframe will work too? or will be easier and nicer to do it with the AjaxUpdateContainer. I tried to see the examples but could not find them...

Stop. Get the model right before you worry about what the UI is going to look like. Obviously you need to have an idea of what kind of information the user will be seeing/selecting, but don't worry about the design of the UI yet. If the data/object model is right, the UI will be obvious.


So let me review:

You have Employees that will be signing up for Turns to work, right?
The thing you need to know about the Employees is just their name (worry about how they log in later).
The thing you need to know about the Turns are What the starting date & time, the ending date and time.


Key questions:

1) Can more than one Employee sign up for the same Turn?
2) Are Turns the same (same start and end) from day-to-day? For each day of the week?
3) Can turns span two days?
4) Are any of these assumptions likely to change?


Dave








_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >db design and WOIFrame or AJaxUpdateCOntainer (From: WebObjects <email@hidden>)

  • Prev by Date: updating WO
  • Next by Date: Re: [solved] Re: Apple dropping WO from own sites
  • Previous by thread: db design and WOIFrame or AJaxUpdateCOntainer
  • Next by thread: Re: db design and WOIFrame or AJaxUpdateCOntainer
  • Index(es):
    • Date
    • Thread