New database - help needed with Tables and Relationships please?

tonypony

New member
Local time
Today, 06:16
Joined
Jul 29, 2009
Messages
4
Hi all,

I have just joined the community and I have very basic Access skills. I am using Microsoft Access 2007 and I am trying to create the following database.

I have attached a picture of my relationships. Please ignore all the relationships that i have made as i know they are wrong. Ill try summarise what kind of database i am trying to make:

There are two ‘sides’ to the database. The one side is the ‘Stock’ side and the other side is the ‘Person’ side. I then used an affiliation table to link the two. If we start with Stock.

Stock is basically a ‘leasable’ or ‘saleable’ unit. There are 3 types of stock (Retail, Office and Industrial). Each stock has a status which is basically ForSale, ToLet and OffMarket. A stock could be for Sale AND To Let. What I did was create a Lookup under Status which is fine and I allowed multiple values as a stock can be ForSale AND To Let.



However, for Stock Types, each type brings new properties. If you see under the stock table I have listed all the properties that are common to ALL stock. Then where the properties of Retail, Office, and Industrial differ I have created new tables for each type. My problem here is that a stock could be Both Retail and Office, or Office and Retail, etc. Ideally what I would use is the same sort of option like with ‘Status’ as mentioned before, but if I choose for example 'Office' a pop-up for the properties of an office space should appear, and if I choose 'Industrial', the properties for Industrial should pop-up, or I can choose both ‘Office’ and ‘Industrial’ and the properties for both should pop-up. I hope Im not confusing. The reason why I want it like this is because if I need to search through all the stock for Offices, then all the ‘Stock’ that has offices part of it should be the result.

That is just the Stock side.

With the ‘Person’ table, I have done something similar, where a ‘Person’ could be a Client, Property Manager, Landlord, Tenant or Other. However, a ‘Person’ could be many of these types at the same time. Eg. A ‘Person’ could be a ‘Landlord’ for 1 ‘Stock’ and also a ‘Tenant’ for that stock. A ‘Person’ could be a ‘Tenant’ in 1 stock and then also a ‘Client’, but a ‘Client’ has no relation to stock at all. Anybody could be a client, as a client is a short term profile for a person. If a ‘Tenant’s’ lease is due to expire in 2 months and they wish to look for new premises, then he becomes a ‘Client’ but is also a tenant at the same time. So you can see where a ‘Person’ would have more than 1 type. And then depending on what the ‘Client’ wants (Retail, Industrial, Office).

Then the whole crux of this is that I should be able to input a new stock with or without an affiliated person, or a new person with or without an affiliated stock.

Man I have been struggling a lot with this. Got any ideas? I am starting to think that I have all my tables wrong.

I think it would be better to explain my use for such a database. Once it is complete I would like to use it as a tool to:

a) record all 'stock' in my area and search within the parameters of 'Area', 'Size', 'GrossRental', 'Status', etc.
b) record all 'person'(s) by their type and affiliate them to a stock (depending on their type.
c) be able to cross reference 'client' requirements with 'stock' and the stock type. eg. if a client is looking for industrial space, should be able to cross reference his requirements with all the industrial stock.
 

Attachments

  • relationships.jpg
    relationships.jpg
    97 KB · Views: 234
eeekkk! the relationships is not a pretty picture. Have you looked at the real estate template in Office 2007? it may point you in the right direction - also do a search of the forum, this subject has cropped up before
 
Thanks Steve & Dave for you responses.
@Dave : yes, please ignore the relationships lol (i was fiddling around a lot), but yes I have looked at the real estate template. It does help a lot, but I still have the problem of having different types of people with different properties related to the Persontbl, as with the different types of stock relating the Stocktbl.

@Steve & Dave : I will read up on your instructions tomorrow morning as it is too late now and I will let you guys know how I progress.

Thank you very much for your responses, I appreciate it A LOT!
 
but I still have the problem of having different types of people with different properties related to the Persontbl, as with the different types of stock relating the Stocktbl.
Perhaps my sample database which shows how you can store (normalized) DIFFERENT data for different people (and stock) and not have separate tables for each type will help.
 
Perhaps my sample database which shows how you can store (normalized) DIFFERENT data for different people (and stock) and not have separate tables for each type will help.

Thank you for your reply.

I will open your database sample as soon I am done at work :).
I am actually dying for the day to finish so I can see what it has in store as I do not have M.Access at work :(.

To the other responses, thank you for your replies (again), I am reading through a lot of over threads about normalization. Im in one of those situations where you go "OF COURSE, why didnt i think of that, but then 5 minutes later another problem emerges
 
Search this sub-theme of the forum for my posts on Entity Analysis and how to decide what goes into a database - and where. In the last year, I have posted some fairly detailed instructions and examples of data entity analysis. Read that, see if it helps, and then post back if you have more specific questions.
 
I've attached what I think would make for a more stable database, I used/covered most if not all of the fields you used.

Although there are still a lot of tables I justify that by using multiple one-to-one relationships to solve the problem of making one large table with all the fields (many of which could be empty).

I consolidated address and attachments to normalize those fields. I changed your affiliation table which now has "yes/no" fields to specify what the relationship to that property has to that person, so now you can keep better track of a single landlord to multiple properties, also having a date range will let you keep a history of each person/property.

Hope this helps.
 

Attachments

  • Stock.zip
    Stock.zip
    72.8 KB · Views: 221
  • StockTable.jpg
    StockTable.jpg
    92.3 KB · Views: 210

Users who are viewing this thread

Back
Top Bottom