Suggestion on Database Schema / Database Design

33 views
Skip to first unread message

Jonathan Seni

unread,
Jan 18, 2012, 6:56:27 AM1/18/12
to joomla-de...@googlegroups.com
Hello,

I want to create a component, but am not sure if there is a particula guidelines / approach of designing a database.

Please advise any reading or approach.

Thanks. 

Prasit Gebsaap

unread,
Jan 23, 2012, 3:15:54 AM1/23/12
to joomla-de...@googlegroups.com
Hi,

A simple guideline is adding your component (without com_) to your tables. If your component is com_test then your "articles" table will named "#__test_articles". #__ is  Joomla table prefix. I prefer using plural name (articles not article) for table name.

This is only one guideline I use.

--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/GdANVEqXPHkJ.
To post to this group, send an email to joomla-de...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-gene...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.



--
Prasit Gebsaap
 
Nonthaburi, Thailand
 

Sloan

unread,
Jan 26, 2012, 10:13:06 AM1/26/12
to Joomla! General Development
There are a few other things to be aware of that are specific to
Joomla! tables.

You should define several fields that Joomla will manage:
id - an auto increment field, and primary key
ordering - a field that controls or at least specifies the ordering of
rows for display
published - indicates whether the row is published or not. Allows the
admin to make a row disappear without deleting it

Take a look at some of the table in Joomla to see the type on the last
two (I can't remember off the top of my head).

Prasit Gebsaap

unread,
Jan 27, 2012, 3:22:04 AM1/27/12
to joomla-de...@googlegroups.com
Yes, you have to define that fields if you need them. Joomla! check for it before perform action. However, for checked_out and checked_out_time, they are mandatory requirements. 

--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To post to this group, send an email to joomla-de...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-gene...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.

Jonathan Seni

unread,
Jan 27, 2012, 6:57:35 AM1/27/12
to joomla-de...@googlegroups.com
Okay, so which ones are mandatory to all every database in Joomla?

ie. id, checked_out, checked_out_time, etc....?
Jonathan Seni.

There are 10 kinds of people in this world,
Those who knows numbers, and
Those who wait for the other 8 people to be listed
----------------------------------------------------

SimplyMepis, SuSE 9.2, openSuSE 10.2 /10.3/11.0/11.1/11.2 /11.3/11.4(x86-64).

Reply all
Reply to author
Forward
0 new messages