i am going to make a tiny little CMS for a site with about 5 or 6 pages.
but how should i design the structure?
what should the tables contain?
is it ok to make it like this:
a page is called prices, so i make a table called prices.
on that page i have a h1 tag and 3 p tags, so i make 1 column called h1 and 3 columns called p1, p2 and p3
and i have i picture to so i make another column called img
i am just wondering how to design the ER model for a CMS-based DB.
how many entities? which entities? how many attributes per entity? which attributes?
basically, what should i include in the DB??
does anybody know about a tutorial for a CMS-based DB??
Actually, I'm not sure what you mean by CMS. My first thought was "Code Management System", but looking at your examples of prices and pictures that seems unlikely. "Contact Management System" perhaps? Or did you really mean CRM (Customer Relationship Management)?
Anyway, there's a kick-start data model for Contact Management here on Database Answers, and if that isn't what you want there are 200 other models on that site to choose from.
i am trying to make a system for a friend of mine who runs a traffic school.
its only going to be 5 or 6 pages but he wants all the content to be editable by him. so all the text and images on the different pages have to be stored in a DB.
What are these columns called p1, p2, h1, h2, etc.?
What are these columns called h1, h2, p1, p2, etc.?
It does not look to me that you are building a data model of any sort.
If, as I suspect, h1, h2, etc. are the HTML tags, then they have no place as column names in a data model. Ask yourself, are these tags features of the problem domain, or are they merely an artifact of the technology (html) that you are using to solve the problem.
Please educate yourself on some fundamentals of relational databases so that you can ask more meaningful questions and we can provide meaningful answers to these questions.