Decisions, decisions

admin

Administrator
Staff member
I have come for some guidance in making a major decision for a large project I am starting. As far as I have I have decided I have two choices:

1) Make everything EXCEPT the main 'content' of the page (i.e., the full news story or editorial) put into the database. With this method each file would be generated after an admin filled out the appropriate fields in a web based form in the admin area, saving the file to the appropriate area in the web tree and making the indexing entries into the database.


2) On the second hand site management becomes so much easier (not to mention the coding) when EVERYTHING is stored in the db and called from templates using encoded URL's rather than individual files which would be neccessary when using the first method. With this method I am afraid that the site would perform slow when trying to pull massive 'LONGTEXT' from the databse.


What do you think are the benefits, isssues, hinderances of each? The site will be maintained by a large group of people with various security accesses. I have included a sample of the 'files' table dump that I am currently contructing to help clarify. The second method would also have a 'files_content' LONGTEXT field where all the main page content would be stored.

CREATE TABLE files (
files_id tinyint(4) NOT NULL auto_increment,
files_filename varchar(255) NOT NULL,
files_date_created datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
files_category_id int(5) NOT NULL,
files_header_id int(5) NOT NULL,
files_column_left_id int(5) NOT NULL,
files_footer_id int(5) NOT NULL,
files_last_modified datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
files_type_id int(5) NOT NULL,
files_title varchar(255) NOT NULL,
files_accessReq int(5) NOT NULL,
files_accessMin int(5) NOT NULL,
files_securityLevel int(5) NOT NULL,
files_stylesheet varchar(255) NOT NULL,
files_language varchar(255) NOT NULL,
files_meta varchar(255) NOT NULL,
files_column_right_id int(5) NOT NULL,
files_author_id int(5) NOT NULL,
files_description text NOT NULL,
PRIMARY KEY (files_id)
);
 
Back
Top