Hi Guys,

I've been asssigned to do a pharmaceutical supplies database using Microsoft Access in 1 week time.
I only think of 3 tables, that is Clinic, Supplier and Items.
Can I put supplies as a table too? If yes, what will be the content of the table?
If no, any suggestion?
Thanks so much in advance.

Best Regards,

Its hard to tell you what how your tables should look without more information. In general, when designing a relational database, you would want to normalize your data as much as possible. Creating an ER diagram helps you build your tables.

Based on the information you provided, if you are going to track supplies, then yes, most likely a supply table will be needed. For example, If the supplies are provided by suppliers, then the supplies table will have a foreign key which is the primary key of the supplier table.

If this assignment is for coursework, I am sure that the topic of ER diagrams has been discussed if you are creating databases. Refer back to that topic, and use it as a tool to help you design your database.


Thanks for the prompt reply.
Actually our lecturer just throw everything to us, so no ER diagram or whatsoever has been discussed.
If I wanna make a validation rule on one of the table field, that is if the user enter alphabet other than S,G or T, error will pops out saying that wrong character entered. How do I write the statement?
Thanks so much.

Hi rhfh,

But you understand the concept of ER diagram right? if not, you should probably do a quick background search on it and have n idea of what it is (no knowledge lost).

For validation rules, I dont really understand what you mean by the S, G and T characters tho.

However, you can use a check constraint while creating the table. for e.g

CREATE TABLE Supplies ( S_Id int NOT NULL, SName varchar(255) NOT NULL, Location varchar(255), CONSTRAINT chk_supplies CHECK (SName<>'S' OR SName<>'G' OR SName<>'T') )

By the way, what language are you using on the front end? That's where you decide what error message would be printed

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.