Task for a database of housing and communal services (housing and communal services, housing and communal services, housing maintenance service)
Housing and communal services in the city are charged for utilities. Tariffs installed on them do not change. Tenants must pay utility bills by the 15th day of each month. For late payment, a fine is charged for each day of delay in the amount of 0.1% of the total amount payable per month.
It is necessary to design a database of housing and communal services, the information of which will be used to identify non-payers for utilities, determine the monthly amount of payment by tenants for utilities, late payments for late payments,
The database should store information:
• Tenants (personal account, name, phone);
• Apartments (address (street, house, apartment), number of residents, area (m2));
• Services (service code, type of service (heating, hot water, TV channels, etc.), unit of measurement (gkal, m3, pcs, etc.), tariff (rubles));
• Payment for the service (personal account, service code, actually spent, pay by date (15.MM.YY), paid on time or not in time (Yes / No), payment date (indicated if payment was not made in time). .
When designing a database, the following should be considered:
• The tenant takes one apartment. The apartment has one tenant;
• The tenant makes payment for several services. Payment for the service is made by one tenant;
• the same service can be associated with several payments (it is paid by tenants in different months). Payment refers to one service.
In addition, please note:
• Every tenant must rent an apartment. Each apartment must have a tenant;
• Each tenant must pay for the service. The payment for each service is necessarily made by the tenant;
• the service is not necessarily payable (the service can not be provided to anyone). Payment for each service is required.