Open ilicmarko opened 2 years ago
Što se tiče imena tabela, slažem se, trebalo je da pišem ili na srpskom ili engleskom, i to ću da izmenim odmah.
Što se tiče ovog idHotela u tabeli apartmani, ja sam imao neku ideju, koju očigledno nisam najbolje realizovao, da podelim apartmane na hotelske sobe i apartmane, u stvari trebalo je da se napravi zasebna tabela za hotelske sobe koja će da bude u relaciji jedan:više sa hotelima.
Ja sam umesto deljenja na dve tabele, stavio da svaki apartman koji ima idHotela 1, bude apartman, a ostali da budu hotelske sobe
This refactoring can be a good opportunity to add Model classes to the project. You can do this if you want to practice and focus on BE.
You can create a model for each entity and have all the functions for inserting and fetching data there.
If you want to learn PHP MVC I still think one of the best options is to use CodeIgniter. It is a really simple and powerful framework that uses the basics of MVC without any magic.
I have a really old tutorial on this topic that you can use if you want.
I will split the review into three different issues.
1
2
Diagram
Without looking too much into what the platform goals are I will try to cover just the essential things I found.
General
blog_heading
->heading
.dateUploaded
isVARCHAR
should beTIMESTAMP
orDATETIME
as they can be automatically updated and have the right format.Hotels
There is some strange logic that is based on the
idHotela
I don really get but if there are two types of entitiesHotel Rooms
andApartments
that should be another table and connected to the Hotel entity.