| Author |
Topic |
|
aturner
Starting Member
29 Posts |
Posted - 2004-08-02 : 10:50:08
|
| I have two tables called Employee and Location. I need the ability to store photos in the database that displays in my web application with information pulled from the Location table. My Location table includes:PRIDPRTitlePRDatePRLocationPRRegOwnerPRLeaseOwnerPRDetailsEmpIDPREntryDate The employee table has basic information, i.e., EmpID, EmpFName, EmpLName, EmpPwd, etc.. Can I insert the photos within the Location table using DataType (image) or should I create a second table and reference it to the PRID field? The photos have to tie in with the specific PRID field. |
|
|
JasonGoff
Posting Yak Master
158 Posts |
Posted - 2004-08-02 : 11:13:05
|
| How many photos can you have per PRID ?If 1, only 1, and always 1, then stick it in the Location table as you suggest.If you can 0 or more than 1 photo, then normalise and have a Photo table with the PRID and the photo in it. |
 |
|
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2004-08-02 : 11:25:35
|
| And, I'm sure you've heard this a million times. You really should store the photos on a file share and just have the location and filename stored in the database.MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
MuadDBA
628 Posts |
Posted - 2004-08-02 : 14:02:29
|
| yeah, what is it iwth everyone storing images in the database lately? |
 |
|
|
aturner
Starting Member
29 Posts |
Posted - 2004-08-02 : 14:05:39
|
| I wasn't sure if posting images in a database was the best route. Is there a way to tie the PRID field to an image not stored in a table? |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
aturner
Starting Member
29 Posts |
Posted - 2004-08-02 : 14:10:34
|
| I noticed in the example link you provided, it has a field called ImageURL. How does the user insert or update the location of image, if it is found on your server in an image directory? |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-08-02 : 14:11:30
|
| You don't let the user control that. The application controls it.Tara |
 |
|
|
aturner
Starting Member
29 Posts |
Posted - 2004-08-02 : 14:22:40
|
| Thanks. |
 |
|
|
aturner
Starting Member
29 Posts |
Posted - 2004-08-02 : 14:22:51
|
| Thanks. |
 |
|
|
|