patternMinor
Schema for a lease platform
Viewed 0 times
leaseforschemaplatform
Problem
I have following tables:
it
prices for that specific period
and out dates (has member.id and room.id as ForeignKey
How will I handle the billing?
Billing so far:
- A room I want to lease (has user.id as ForeignKey)
- A users table for users who can rent
it
- An availability table for time periods the room is to use with
prices for that specific period
- A transaction table with check-in
and out dates (has member.id and room.id as ForeignKey
- A billing table
How will I handle the billing?
Billing so far:
Solution
If I were you I would make sure to separate all of the data. Is this going to be completely controlled in the database, or is there going to be an application? If it is an application I would have a users table and permissions tables for the people using the application. I would do a separate a customers table for your customers. I agree with the availability table, but if you are using a price based system I would store that separately. For billing I would set up a few tables. I would have a payment type table and a transaction table with due dates. I like the idea of a check in and out table as well.
Context
StackExchange Database Administrators Q#106818, answer score: 5
Revisions (0)
No revisions yet.