Browse by Tags

All Tags » SQL (RSS)

SELECT TOP

It is a real pain in the ... that every sql server uses it's own select top equivelent... Here follows a list of some of the ones I found: SQL Server : SELECT TOP 10 * FROM [TABLE] DB2 : SELECT * FROM [TABLE] FETCH FIRST 10 ROWS ONLY PostgreSQL : SELECT * FROM [TABLE] LIMIT 10 Oracle : SELECT * FROM [TABLE] WHERE ROWNUM <= 10 Sybase : SET ROWCOUNT 10 SELECT * FROM [TABLE] Firebird : SELECT FIRST 10 * FROM [TABLE] MySQL : SELECT * FROM [TABLE] LIMIT 10 I haven't tested all of these... I...

SQL + Images Redux

Thank you for all the suggestions on how and why I should or should not store images in a SQL database. After posting my blog, I decided to do some reading about my problem. I found the link posted by Pieter to be very helpful. The following pros and cons were identified: Pro's The images are backed up with the data in a coordinated fashion. All "pointers" between your structured data and the images are maintained. No "broken link" problems No out of sync problems No multiple...
Posted by rudi | with no comments
Filed under:

SQL + Images

I have a question for all the SQL experts... In the Impilo Health Management project, I want to create a browser of all the existing gym equipment. I created tables in my database to store information about these machines (ie. Description, instructions, manufacture, etc). I also need a image or thumbnail of this machine to be displayed using a LINQ query? Should I: Store the image in the SQL database and bind it to the Image object Store a path name to a image and bind this to the Image URI? For...
Posted by rudi | 7 comment(s)
Filed under: , ,

Should I log every visit?

As I mentioned in some earlier blogs of mine,I am working on a Health Club Management suit of applications called Impilo. I am currently busy updating the database and I am faced with relatively big dicsion. The application needs to keeps records of the gym members visits. I am now wondering if my Members table must just have a value called visits and I increment this visits or should I rather creat a new table called Visit that keeps a refrence to the members ID and saves the date and time of the...
Posted by rudi | 6 comment(s)
Filed under: ,