> 50% at the end of 2 weeks when database design and architecture is finalized
Unless the system is that simple, the design is never the final representation of the system. Sooner or later, some unanticipated snag (or gaping hole) will be found which upsets the whole program.
Yes, 50% for this is extreme IMO.
> 20% at the end of 22 weeks upon project completion.
I would expect 4 or 5 milestones in this, each of which would trigger a payment.
Split the pot 50:50
One pot is paid pro-rata on the basis of work being done. Each week you get a statement of activities and achievements, and you hand over a bit of money.
The other pot is split into say 5 equal parts, and each part is handed over at the successful completion of a milestone.
If they still want an advance, then I would bargain. Maybe even consider some
Escrow arrangement if you feel the amount up front is too much. Make sure you have a good contract.