i want to add advertisment in sql database how should i add

i want to add advertisment in the middle of the artical in sql data base with the help of the query how should i add this in sql database
Umesh ModiAsked:
Who is Participating?
 
Mark WillsTopic AdvisorCommented:
I wouldnt put it inside the database, but put to disk and have a link / pointer to the disk file in the table.

SQL does have a facility known as FILESTREAM to aid and abet, have a look at : https://technet.microsoft.com/en-us/library/bb933993(v=sql.105).aspx and look on the left hand side for other filestream topics. https://technet.microsoft.com/en-us/library/bb895234(v=sql.105).aspx

But before you begin, have a read of : https://sqltales.wordpress.com/2012/05/15/varbinary-vs-filestream-and-other-blob-issues-3/ and take not of the 10meg file in the performance comparisons. A significant overhead inside SQL.

SQL does have a few choices : https://docs.microsoft.com/en-us/sql/relational-databases/blob/binary-large-object-blob-data-sql-server and again, look at the left hand side for more topics....

If you still insist, then there are example around. If you are a c# programmer http://www.c-sharpcorner.com/blogs/upload-video-file-audio-file-and-image-file-in-sql-server-db1 or lookup codeproject : https://www.codeproject.com/Articles/225446/Uploading-and-downloading-files-to-from-a-SQL-Serv

in fact codeproject has a few - look at the links in this 'answer' : https://www.codeproject.com/Questions/622003/MP-file-how-to-store-in-SQL-database-file-under

Good luck with your project and let us know how you go....
0
 
ste5anSenior DeveloperCommented:
i want to add advertisment in the middle of the artical in sql data base with the help of the query how should i add this in sql database

You don't want to do that. You either inject a link placeholder before saving the article or after retreiving it from the database. Which strategy you chose is yours, but depends on your architecture and is always done in the front-end (business logic) and not in the back-end (database or data layer).
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.