Jump to content
Xisto Corporation
Sign in to follow this  
k_nitin_r

Cakephp Database Conventions Guide to naming database table names and column names for CakePHP

Recommended Posts

Hi!When working with the CakePHP web development framework's object relational mapping layer, the framework follows a concept called convention over configuration.The tables that you define ought to be in plural (with an 's' at the end) and the column names should follow the following conventions:* The 'id' column is the primary key of the table* The 'name' column is the text that would be displayed to the user in place of the ID, which will be used internally* The 'tablename_id' column, where tablename is the name of any other table in singular form, represents a foreign key relationship with another tableThe convention over configuration approach has its advantages and disadvantages. The key advantages are that it speeds up the software development process and it helps easily determine the purpose of the various fields in the database table by simply looking up the names of the tables and the columns. The disadvantages are that the database conventions require the database administrators and database developers to familiarize themselves with the conventions and the conventions create a steeper learning curve for developers.

Share this post


Link to post
Share on other sites

thank you k_nithin_r for these useful information. even i don't use phpcake, but i heard that it has a lot of good features. and i know there are a lot of developers use it despite of its disadvantages. thank you for sharing.

Share this post


Link to post
Share on other sites

Hi!CakePHP is one of the most popular web development frameworks for PHP. It may or may not be the framework of choice for web development projects starting today because the approach followed by CakePHP has been improved upon and re-packaged into many different frameworks, including Symphony and CodeIgniter. CakePHP still is found in many existing web development projects and there's a lot of documentation and support available for it online.CakePHP follows the Model-View-Controller (MVC) architectural pattern for developing web applications. Although it takes a while to get used to at first, it is actually better organized than storing single PHP files within folders. The CakePHP framework provides helpers to do just about everything from rendering HTML forms to validating user input.@web_designerThank you for your kind words. I'll try to put together more information about CakePHP and will post it to the forum.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.