User Tools

Site Tools


fdm:redesign

FDM redesign

Terms: will use FDM2 – as the name of future-redesign of current FDM.

Research

Preconditions

  • The FDM database become ugly with most of new features we added here
  • Sometimes the data dublicated from user's view like the same cinemas, the same countries
  • Most reports uses special calculation block to have the same results, and it's work too slow, very hard for the server
  • We can not move some code into quicker PHP code because the calculation block too complex
  • The program applies all exchange rates everytime on running any report, this process eat CPU power, the website is working slowly
  • Some of new features broke the basic FDM concepts used with first databases structure

Possible expectations after redesign

  • The database will have better logical structure
  • All dublicates in data will be removed
  • We can add some things that will be familar for users from other countries
  • We can use both PHP and C# code for FDM2 parts
  • Based on PHP libraries – we can add the support of HTML / PDF reports out
  • We'll minimize the volume of calculations for the unit Calc

Box office offer

We needed to fix all prices for every day. This is needed to eliminate bugs with differences in numbers.

These bugs coming everyday and every month. The reason – calculate-based design of FDM database.

I think we should remove this way, and make all numbers final.

So, box office record in FDM2 will be as a set of days 1-7.

Every day will have next structure

Name Primary Datatype Description
date_on x DateTime The real date of this day
films_id x int The id of the film (or use 'prints_id')
prints_id x int The id of the print copy (or use 'films_id')
screens_id x int The id of the screen in the 'screens' table (can be 2D/3D)
formats_id x int The format of the film (2DD, 3D, 35mm, IMAX)
usual int 0 – if it's usual data, 1 – part of fixed invoice
nbo_lc double The NBO value in the local currency
gbo_lc double The GBO value in the local currency
nbo_us double The NBO value in USD (final)
gbo_us double The GBO value in USD (final)
attd int Attendance
locked int 0 – if the data available for change, 1 – if the record is locked

Primary keys: date_on, films_id (may be prints_id), screens_id, formats_id, usual

Fields: nbo_lc, gbo_lc, attd, nbo_us, gbo_us, locked

Note: Fixed invoice will add more day records into the box_office line (usual = 0 – usual day, 1 – fixed)

Questions:

  • May be better to assign the day with the film copy (prints_id) than with the TITLE (films_id)?
  • Royalti? May be royalti also should be fixed and calculated here.
fdm/redesign.txt · Last modified: 2012/01/16 07:09 by yetidi