design database and links

Discussion in 'Databases' started by Marlud, Nov 20, 2018.

  1. #1
    Good day.
    I'm trying to write my first program.
    I've tried creating database to use at our company for staff loans... I'm failing everytime. The program say my relationships is inconflict and then I miss some parts to write everything on the next try and every try it is another problem.

    Can someone just please tell me all the basic table's I need and what row goes in each one and the links to the other table.
    I made the table like this:
    Customer (rows is name,surname, client no, Invoice)
    Invoice (date, time, loan ID, Invoice no)
    Loan (Loan ID, Open amount, loan amount, Total)

    That is the way I'm trying but do not succeed for 5 months now. So I really tried every way I could think off except the correct way.

    Thanks for helping and enjoy your day.
     
    Marlud, Nov 20, 2018 IP
  2. sarahk

    sarahk iTamer Staff

    Messages:
    28,830
    Likes Received:
    4,541
    Best Answers:
    123
    Trophy Points:
    665
    #2
    Not having done anything with staff loans but having lots of CRM experience I'd imagine you'd need

    People
    • people_id
    • firstname
    • surname
    • mobile #
    • email
    Loan Type
    • loantype_id
    • name
    • fields that describe the loan, min loan amount, max loan amount etc
    Loan
    • loan_id
    • customer_id <-- the customer's people_id
    • loantype_id
    • amount
    • dateapproved
    • datedrawn
    • datedue
    • adminfees
    • approvedby_id <-- the people_id of the person who ok'd the loan
    Payments
    • payment_id
    • customer_id
    • loan_id
    • amount
    • datepaid
    • datereconciled <-- ensuring the payment shows up in bank account
    • reconciledby <-- the people_id of the person who reconciled the payment
    • status <-- pending, reconciled, reversed
    • datereversed
     
    sarahk, Nov 21, 2018 IP