0

I am developing a website similar to a job seeker's site. There is also a 3rd party involved here as well (like Job Seeker, Employer and Job/Recruitment_Agency). The 3rd party arranges the transaction between the first 2 parties.

What approach i would follow? How the schema would look like? Also can someone refer some good links or sample schemas as well. Thanks

Muhammad Maqsoodur Rehman
  • 33,681
  • 34
  • 84
  • 124

3 Answers3

2

Assuming you want to work with relational databases:

Classic schema (like an orm-generated one):

Table 1: Job_Seeker
Table 2: Employer
Table 3: Recruitment_Agency
Table 4: Job_Seeker__Employer__Recruitment_Agency
    foreign keys:
    *job_seeker_id
    *employer_id
    *recruitment_agency_id

And ensure indexes over those three foreign keys to achieve better performances.

This way you can immediately query what you want, starting from any table. For example you can use the Table 4 to start any join between Table 1 and Table 2 adding conditions on Table 3 Pseudocode for selecting all the records coming from agency #4:

 join table1, table2 on job_seeker_id=table1.id, employer_id=table2.id having recruitment_agency_id=4

Which requires "only" one join. Then you could add other intermediate tables if you only need to join two tables, but that depends entirely on what you are doing. Obviously in the long run joins are not really fast, are memory consuming and will jeopardize scalability in (especially if you join on multiple tables with many columns), therefore what you could do if your website is supposed to scale a lot is to denormalize your schema (i.e. avoid referencing other rows but rather copying them into the one you search).

The extreme option of denormalization and scalability would be with a schema free database (let's say a document based like mongodb for sake of simplicity). Then my documents would be of this kind:

{
 "_id":1, 
 "job_seeker":{"name":"John Doe","address","New York"}, 
 "employer" : {"name":"Mario Rossi","address","Rome"}, 
 "agency" : {"name":"My agency","address","London"}
}

Obviously non-rel database are ok for you only if you don't have really strange queries (which would still be possible with Map/Reduce but would be tedious to write).

For a general reference I especially like this article.

For a more intense knowledge of relational databases this is a must-have-book (AFAIK it's the reference text for the first database course at Stanford).

luke14free
  • 2,529
  • 1
  • 17
  • 25
0

You write tests describing what the application should do. Do that for each user story (As a job seeker, I want to register in order to be able to be contacted by a recruitment agency). Prioritize the user stories. Each story makes for a few small changes in the database scheme.

Stephan Eggermont
  • 15,847
  • 1
  • 38
  • 65
0
Employer
- Id
- profile

JobSeeker
- Id
- Educational info
- Professional info

Job/Recruitment_Agency
- Id
- Join date 

Transactions:
- Id
-Customer ID: ID of customers in transaction.
-Completed
-Amount (Credit)
-Reciept ID: the ID returned from Payment Gateway.
-Created Date: set the created date of the transaction 
-Payment Method: set payment method for the transaction 
-Detail: enter the detail information of the transaction (optional) 

- Employer_id
- JobSeeker_id
- Job/Recruitment_Agency_id 
Angelin Nadar
  • 8,944
  • 10
  • 43
  • 53