SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict mak-uk's Avatar
    Join Date
    Dec 2001
    Location
    Midlands, UK
    Posts
    284
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy Conceptual Design for PHP/MySql?

    Hi

    There are loads of database driven sites out there on the net that run on PHP/MySQL or similiar combinations.

    I know such sites can be developed quite easily now, however, what I am more interested in is the actual design of such database driven sites.

    Say for example you take the average computer hardware article/news site that runs on such a PHP/MySQL system, where articles are stored in a database and retrieved from there as needed.

    What I would like peoples' comments on is a conceptual design for such a site.

    What I have come up with so far is the following:

    A conceptual diagram would consist of: Authors, Aritcles, Website, WebDevelopers (people who post updates to the site).

    In a more schematic way:

    ARTICLE(ArticleID, Title, PublishDate, Content)
    AUTHOR(AuthorID, Name, StartDate)
    TOPIC (ArticleID, AuthorID, Topic)

    -----

    I am still unsure, however, how this maps to a MySQL database for example.

    Firstly, is my schema correct, if so.. do I just create tables with those properties?

    Can someone please help as I know I can implement such a thing.. I just want to do a decent design!

    Thanks!

    Mak

  2. #2
    SitePoint Evangelist
    Join Date
    Jul 2001
    Location
    UK
    Posts
    407
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The article table could look like:

    Code:
    CREATE TABLE Article (
    ArticleID int NOT NULL auto_increment,
    Title varchar(50) NOT NULL,
    PublishDate date NOT NULL,
    Content text NOT NULL,
    PRIMARY KEY (ArticleID)
    );
    Something similar with the other tables should do OK.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •