| Author | Topic | 
                            
                                    | makubex1719Starting Member
 
 
                                        6 Posts | 
                                            
                                            |  Posted - 2010-07-27 : 23:44:17 
 |  
                                            | Hi everybody!!I was wondering if there is someone that can help me!! I'd like to know how I can make a program like Youtube but on ASP.NET connected to SQL 2008 what I mean is that I don't know How to store videos on the database...I've hear that one way is to make a method to convert the video to byte but I'm still a noob so I don't how to do it!!I'll be much pleasured to know if there is an answer to my problem Thanks a lot!! |  | 
       
                            
                       
                          
                            
                                    | russellPyro-ma-ni-yak
 
 
                                    5072 Posts | 
                                        
                                          |  Posted - 2010-07-28 : 10:55:43 
 |  
                                          | SQL Server is, in my opinion, the wrong place to store them.But, to answer your question use Varbinary(MAX) data type |  
                                          |  |  | 
                            
                       
                          
                            
                                    | makubex1719Starting Member
 
 
                                    6 Posts | 
                                        
                                          |  Posted - 2010-07-28 : 13:27:59 
 |  
                                          | quote:Why do you think sql server is the wrong place? Can you tell more about it because i don't want to commit a mistakeThanks... I hope Your answerOriginally posted by russell
 SQL Server is, in my opinion, the wrong place to store them.But, to answer your question use Varbinary(MAX) data type
 
 |  
                                          |  |  | 
                            
                       
                          
                            
                                    | russellPyro-ma-ni-yak
 
 
                                    5072 Posts | 
                                        
                                          |  Posted - 2010-07-28 : 14:22:55 
 |  
                                          | I'll store them on a file server and keep the path to them in the database |  
                                          |  |  | 
                            
                       
                          
                            
                                    | X002548Not Just a Number
 
 
                                    15586 Posts |  | 
                            
                       
                          
                            
                                    | KristenTest
 
 
                                    22859 Posts | 
                                        
                                          |  Posted - 2010-07-29 : 02:18:38 
 |  
                                          | "Why do you think sql server is the wrong place? " The ONLY reason (IMHO) to include Images / other large objects in the database is if:Potential lack of cachingThroughputScalabilityHaving to backup all the videos with your SQL data
 For anything else:Store the meta data about the Image (include path  filename) in the database, and put the Image on the filesystemThey MUST be tied ATOMically to some data - either the Image AND its meta data are in the database, or NEITHER isThere is a need to bundle Images and Data together - e.g. to distribute the whole lot as one entity without users orphan data being createdThere is a security issue - only certain people can see Image-1 - and SQL Database solves that somehow that the file system does not.
 |  
                                          |  |  | 
                            
                       
                          
                            
                                    | YellowBugAged Yak Warrior
 
 
                                    616 Posts |  | 
                            
                       
                          
                            
                                    | makubex1719Starting Member
 
 
                                    6 Posts | 
                                        
                                          |  Posted - 2010-07-29 : 23:51:26 
 |  
                                          | Thanks for all the answer to everybody!! But I still want to know What will be the perfect "CODE LINE" to put on my syntaxis of ASP.NET |  
                                          |  |  | 
                            
                       
                          
                            
                                    | X002548Not Just a Number
 
 
                                    15586 Posts |  | 
                            
                       
                          
                            
                                    | X002548Not Just a Number
 
 
                                    15586 Posts |  | 
                            
                       
                          
                            
                                    | X002548Not Just a Number
 
 
                                    15586 Posts |  | 
                            
                       
                          
                            
                                    | Michael Valentine JonesYak DBA Kernel (pronounced Colonel)
 
 
                                    7020 Posts |  | 
                            
                       
                          
                            
                                    | makubex1719Starting Member
 
 
                                    6 Posts | 
                                        
                                          |  Posted - 2010-07-30 : 19:17:44 
 |  
                                          | So If I do this on my sql server 2008:create table demo(cod int not null primary key,name varchar(100),picture image)That's wrong ??Because everybody talk about "FILESTREAM" and to be honest with You I haven't ever used that kind of data type.To conclude, I must change Image by filestream or no?Thanks again, I hope Their answers!! |  
                                          |  |  | 
                            
                       
                          
                            
                                    | robvolkMost Valuable Yak
 
 
                                    15732 Posts | 
                                        
                                          |  Posted - 2010-07-30 : 20:02:55 
 |  
                                          | The image data type is deprecated and will be removed.  Varbinary(max) is the preferred data type to use for storing videos and other streaming data.  FILESTREAM is the preferred method for streaming data, for reasons given in the articles linked above.  You should read them all thoroughly and understand the benefits and downsides so you can choose the best way to deliver this data to your users. |  
                                          |  |  | 
                            
                       
                          
                            
                                    | KristenTest
 
 
                                    22859 Posts | 
                                        
                                          |  Posted - 2010-07-31 : 02:10:51 
 |  
                                          | Or just put the Video files on your web server and store the path / filename in the database ... |  
                                          |  |  | 
                            
                       
                          
                            
                                    | makubex1719Starting Member
 
 
                                    6 Posts | 
                                        
                                          |  Posted - 2010-07-31 : 20:53:37 
 |  
                                          | quote:Well, I'm gonna read more about the topic thanksOriginally posted by robvolk
 The image data type is deprecated and will be removed.  Varbinary(max) is the preferred data type to use for storing videos and other streaming data.  FILESTREAM is the preferred method for streaming data, for reasons given in the articles linked above.  You should read them all thoroughly and understand the benefits and downsides so you can choose the best way to deliver this data to your users.
 
 |  
                                          |  |  | 
                            
                       
                          
                            
                                    | makubex1719Starting Member
 
 
                                    6 Posts | 
                                        
                                          |  Posted - 2010-07-31 : 20:55:55 
 |  
                                          | quote:That will be the easier way!! I also thought about that posibility but I wanted to know what I posted first.Thanks anyway!!Originally posted by Kristen
 Or just put the Video files on your web server and store the path / filename in the database ...
 
 |  
                                          |  |  | 
                            
                            
                                |  |