Tokyo Sports Facility Service
Laravel history is less than a month.
Based on the "Reservation from date and time of use" system in the above link when creating a product for job hunting after learning authentication and basic CRUD, a detuned usage application (reservation application) web application I'm trying to create a table, but I'm troubled by the definition of the table.
Laravel 6.5.0
Homestead
Database …… MariaDB
The column that was written out as necessary for processing like the activity diagram is the first normalization part at the lower left of the table relationship diagram.
Think about it yourself and feel that the relationship between the user and the facility will be many-to-many, and it is the upper part of the figure that I tried to define it, but understanding the table Add 5 columns to users or facilities in the reservation section, that is, reservation date/time, reservation number issued when applying, application date/time, and update (when application is changed) I thought it would be nice to create a separate table for the relation, or maybe I would like to point out some advice on whether there is a completely different definition.
Because it is a snake, the relationship between users and password_reset remains the default when Auth authentication is introduced.
-
Answer # 1
Related articles
- why sql throws incorrect definition of table for mariadb (mysql fork)
- reflection of table definition in mysql by laravel migration does not work well
- Example of importing and exporting MySQL table data
- Resolve the failure of MySQL table self-increment id overflow
- mysql - [laravel] how can i make an outer join in a many-to-many table?
- mysql, mariadb table creation error
- mysql - about er diagram entity definition document
- mysql - grouped according to the contents of the related table
- mysql - [beginner] i want to add columns to a db table created on aws
- mysql data table basic operation table structure operation, field operation example analysis
- is there an sql one-to-one table definition?
- i don't know how to get (column name, data type) in a table with mysql in php
- mysql - best practices for table design with multiple parent tables
- i don't know how to get the db table comment in php mysql
- mysql - external table is denormalized and displayed by sql select
- mysql basic table data insertion
- mysql - select * from contents are not displayed even if the table name is displayed
- mysql - regarding production alter table a add
- mysql - [sql] cannot create table
- php - if there is data in the db table with mysql, please tell me how to insert if there is no update
- php : Assistance in the implementation of regular bus services
- unable to register user in db with docker + laravel + vuejs
- laravel and mysql connection
- php - [laravel] relationed data cannot be displayed in blade
- php - mysql insert limit
- mysql2 :: error :: connectionerror when trying to auto-deploy with bundle exec cap production deploy
- mysql - access denied for user error in xserver
- php - laravel detail screen creation
- gorm (v2) fails to get data from mysql db
- mysql - bundle install will not be executed
I think only 3 tables are needed.
(Column names and types are appropriate)
The points are below
No need for user_reservation
If only reservation_time is used, the start time and end time will be unknown, so it will not be possible to search for free time (if there is a limit of one set per day)
reservation_number is unnecessary by using id
Replace time with begin/end and abolish date to make it easier to search for reservations within the desired time zone (and can handle cases that span dates)
Although it is not considered, it is better to have something like a business hours table.