Hi all,

I'm just starting to dabble in databases and I'm a little lost.
I have a couple of questions:

I have two excel spreadsheets containing employee records & equipment records respectively. For MS Access, I simply import these spreadsheets into MS Access. Is this the way to do it on mysql and other dbrm apps (importing data from spreadsheets) or is there some other standard way ?

What are the common ways to create the tables that are worked on in dbrm apps ?

I googled and it seems that everyone creates the tables using scripts and not spreadsheets ... so how do we input chunks of data (ie. 120 employee records) into these tables ?

Recommended Answers

All 2 Replies

I would strongly recommend creating tables from scratch and not from imported spreadsheets. Spreadsheets usually won't be divided into the database structure you need.

As far as importing data... with MS Access, you can import the tables directly into temp tables and then create queries or write code in vba to grab the data and populate the database tables. For something such as MySQL and php, once all the tables are created in MySQL, you can create a script in php to open a file with data, read the data and then populate the tables with the data it read.

Since spreadsheets and relational databases look at data differently (spreadsheets usually show all data concerning a record on a single row while relational databases store data in different tables and record relationships between data), you can't simply import a spreadsheet into a relational database management system and expect to have a correctly structured relational database in the end. The only way for that to happen is if the data in the spreadsheet was normalized; but if that was the case, the creator of the spreadsheet would have probably started with a relational database in the first place.

This is my own take of what i think u are asking for.However i am still working on this and looking for a better design. pls anyone with a better idea or design pls feel free to correct me and share. Thanks

Patient Attribute
Name,Surname,Card_No(Primary Key),Age,Sex,Weight,Height,marital_status

In_Patient
Card_no(Foreign Key),Bed_no(Primary_key),Ward_type,Admission_Date,Discharge_Date,Personnel_in_charge.

Patient_activities
Visit_id,Visit_Date(Primary Key),Visit_type,card_no,personnel_id,Recommendation,Treatment,Personnel_Id(Foreign key),

Medical_history
Treatment,Treatment_Id(primary_key),Visit_id,Card_no,Personnel_id,Designation

Medical_personnel
Name,Surname,user_id,password,speciality,personnel_id,Designation
Pharmacy
Transaction_id,quantity,unit_price,Product_descr, bill

Be a part of the DaniWeb community

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