Công nghệ thông tin
Overview of Components - Sơ lược về Com | Overview of Components - Sơ lược về Com |
|
|
|
| 23/11/2007 | ||||||||||
Trang 3 / 8
Developing the Database SchemaFrom Mambo ManualWe now have a rough brief to work with. What do we have to consider and how are we going to build it in the Mambo framework. Firstly what information do we need to store? The users that will be displayed on the in/out board. If a user checks out, when did they do it, where are they and when are they coming back? The first thought is simply to add a few fields to the mos_users table. OK, that's quick and easy but what happens if the client wants to upgrade their Mambo down the track? The Developers aren't going to be too sympathetic to thirdparties that hack into the core schema. So, it's obvious that we need to create a new table to support our Client's information without tampering with the core schema. Let's call our new table mos_com_inout. This makes it obvious that the table is associated with the in/out component that we are going to build. Only users in this table will be displayed on the in/out board. We will link to the mos_users table via the id field (we shouldn't use the name field as this could change) as this is the primary key for the table. We need a few fields to store when the user checked out, where they are and when they are coming back. So, the sql for the mos_com_inout table might look like: CREATE TABLE `mos_com_inout` ( `id` int(10) unsigned NOT NULL auto_increment, We've included a primary key in this table, the `id` field, to help us edit specific records if we need to. We've also included a `catid` field. This is so we can link back to the categories table. You just have a hunch that your Client might ask you for a couple of different in/out boards for different groups of users. Using the Categories feature of Mambo will serve this purpose quite well without you having to write any additional code to support it. You'll also see two other fields, `checked_out` and `checked_out_time`. These two fields are required by the MOS framework to check in and out the records in the mos_inout table when they are being edited (don't confuse this with the users checking in and checking out of the office). So we have our schema planned, at least for stage 1. Next we need to think about what we need to provide in Mambo. Tin mới hơn:
Tin cũ hơn:
|
||||||||||
| Liên kết Webs |
| Why's luyenkim.net |
| Woman Calendar |
| Cà phê chiều thứ 7 |
| Từ điển LạcViệt Online |
| Kulkul's world |
| www.xahoihoctap.net |