views:

569

answers:

5

I got a project from my client to create a site similar to STACKOVERFLOW for Printing media. So I want to know where should I store the article heading, body, images etc.? In databaser? in XML? I want to make them searchable and can easily be picked by search engine.

Waiting for your replies.

Thanks Ali Adravi

+27  A: 

This is a really basic question, so unfortunatly I don't rate your chances at being able to complete this project at present. By the sounds of it, you need to study a few fundamentals:

System Design

Start reading, look up database normalisation, as well as some beginner ASP.net tutorials should help you a long. Properly structuring a website is crucial, and unfortunatly a lot of that is learnt through trial and error. Experience definatly trumps here.

Read up on client server architecture of the web, it will help you a good insight into how these sorts of technologies actually work.

Storing data

Storing data should pretty much always be done in a database, they have been designed with data storage in mind so will work a lot more efficiently than any other solution you may come up with. It will make performing functions such as search (see below) a lot easier as they have inbuilt functions and operators to perform all the actions you will want.

Searching for Text in SQL

If you want to search for text in a database, use the LIKE operator, used as such.

Search engines

Not much to do here, search engines will rate your content if it's high quality and unique. Systems such as stack overflow by nature generate this sort of content as long as the user base is educated enough, so this should come naturally to you. Don't worry about search engine micro optimisations until the site is actually completed. As long as there is text on the website, presented in a readable (and machine readable via good CSS layout) way, you will be fine.

Some more thoughts

Again I stress that it sounds like a very ambitious project so make sure you don't under-deliver, there is no shame in turning down a job, but under-delivering is a good way to lose future work and clients very fast.

Tom Gullen
+1 for partially detailed explanation
Yanick Rochon
1 more for a reversal :O
Jean-Bernard Pellerin
woot i gots the revershal
Tom Gullen
+1 for polite, unoffending answer to a very joke-provoking question
Dmitry Ornatsky
+6  A: 

stackoverflow is saving all the datas in sql database and they following MVC architecture, for heading and all. you also do the same if you want to follow the same

http://blog.stackoverflow.com/2008/09/what-was-stack-overflow-built-with/

anishmarokey
+3  A: 

Why is this question being voted down? Yes, it is a very basic question but he just needs to know how stackoverflow was built? I don't think he is expecting the code for it :)

Amit
I agree entirely; however, this is q better fit for a comment than an answer.
kbrimington
+1  A: 

As others have mentioned it sounds like you will struggle with a project of this complexity going on the question asked - you may be better looking at one of the may Stack Overflow clones that are around. A pretty good list can be found over at meta.stackoverflow.com http://meta.stackoverflow.com/questions/2267/stack-overflow-clones

Macros
+3  A: 

If you want to get an idea of how StackOverflow stores its data, you can download a data dump of the stackoverflow database (public data, only) from here.

Scott Hanselman has a nice two step process on how to import this dump into a SQL Server database. Look at the Preparation section of his blog post.

Once you're able to import this data into a database, then you can see how they organize the data -- what's stored in what table, etc. I would strongly advise not copying this structure, but rather use it as a guide and learn from how they've organized their data.

Also, regarding searching through the entries for a search functionality, I would recommend you look into SQL Server Full-Text Indexing. The language is a little different than you typical T-SQL (e.g. LIKE) but it's much more powerful and provides you the ability to do closeness searches (i.e. giving you back relevance statistics on how close the search result matched that string), complex searches (e.g. find "this" but exclude items that have "that"), and also perform search indexing through HTML and other files (like Office docs -- doc, docx, xls, xlsx, etc. -- and PDFs).

In order for your pages to be searchable (I'm assuming you mean SEO), then using the MVC framework is a good idea -- and also look at the IIS Search Engine Optimization Toolkit. This will scan your site and highlight areas that you can improve upon in order to improve the searchability of your site.

I hope these suggestions help. Good luck!

David Hoerster