1. Be able to transform databases (can provide poor database models
and tons of data) into proper normalized data - accounting knowledge
is crucial - ability to identify commonality of many data tables and
create common models that can be extended (core document)
2. build simple crud to handle docu
> Hey,
>
> I've got a question concerning my database design. I would like to
> rewrite my website for small ads.
>
> There are two possible ways of creating my database:
>
> 1) Put all in one big table
>
> simplified example:
>
> id (1)
> name (2)
>
Hey,
I've got a question concerning my database design. I would like to
rewrite my website for small ads.
There are two possible ways of creating my database:
1) Put all in one big table
simplified example:
id (1)
name (2)
address (3)
zip (4)
city (5)
request_type (6)
description (7)
si
Hello,
I am having some issues setting up the database for my base CMS to use
for all clients. My thoughts were to have the following:
blocks table - this is simply the html, title, description etc for
each page (i.e. home, about us)
menus table - simply contains the menu name (i.e. top navigatio
Hi,
I think you need to try Tree behavior, please have a look at
http://book.cakephp.org/view/1339/Tree
Hope this helps.
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Thu, Jan 20, 2011 at 1:14 PM, josef corley wrote:
> Howdy. ^^
>
> I'm a noob at this so, please bear w
Howdy. ^^
I'm a noob at this so, please bear with me.. ^_^
I have these following tables with their corresponding associations:
Users-
id, username, password,username, email, website,
date_registered, name, role_id, last_name, first_name, about
hasMany=Post,Comment
Posts-
cricket was right :D ty
On Jul 8, 9:56 pm, duderion wrote:
> hi guys,
>
> thanks alot for all your help
>
> i could solve the problem like
> this:http://book.cakephp.org/view/851/Multiple-relations-to-the-same-model
>
> tx alot :D
> duderion
>
> On 6 Jul., 19:42, bladefarm wrote:
>
>
>
> > hi p
hi guys,
thanks alot for all your help
i could solve the problem like this:
http://book.cakephp.org/view/851/Multiple-relations-to-the-same-model
tx alot :D
duderion
On 6 Jul., 19:42, bladefarm wrote:
> hi pips!
> i need ur help.
> i'v got 2 models: prospects and programs.
> prospects saves re
hi pips!
i need ur help.
i'v got 2 models: prospects and programs.
prospects saves records of prospects for one or more programs while
programs have records of the different disciplines offered.
the prospects model looks like this:
create table prospects(
... ,
... ,
program_first_id int(11
On Tue, Jul 6, 2010 at 4:26 AM, dtemes wrote:
> I would not use cascade delete on sender_id, once a mail is in your
> box it's yours and it can contain important information that should
> not be "stolen" from you even if the user that sent it is not there
> any more.
Good point!
Check out the ne
M, duderion wrote:
> > Hi Guys
>
> > i have a question about cake compatible database design:
>
> > i have a table "mails" and a table "users"
>
> > my table mail references 2 users from the users-table as Sender,
> > Recipient
>
&
On Mon, Jul 5, 2010 at 10:17 AM, duderion wrote:
> Hi Guys
>
> i have a question about cake compatible database design:
>
> i have a table "mails" and a table "users"
>
> my table mail references 2 users from the users-table as Sender,
> Recipient
>
Hi Guys
i have a question about cake compatible database design:
i have a table "mails" and a table "users"
my table mail references 2 users from the users-table as Sender,
Recipient
but then, i have 2 foreign keys in it, and i dont know how to handle
this properly
(or ev
As I think about it, putting comma-delimited data in one field is
pretty yucky i suppose there could be an extra table called
undo_fields which has a foreign key to the undo table.
On Apr 25, 3:20 am, Zaky Katalan-Ezra wrote:
> About the auto increment I meant the mysql column property AI.
>
Thank you, Zaky, for your ideas. I have to say, I was thinking pretty
much the same way before I read you post--Using beforeSave to create
an sql statement which would be stored in an undo table which would
get the data back to the way it was. The way you laid it out is very
clever, and it may be t
About the auto increment I meant the mysql column property AI.
About undo:
In that case if you don't save your sessions to table and the session is
lost it's impossible to undo.
Usually undo implemented with the state pattern.
But in your case , I'll recommend keeping the initial data locally or
On Apr 24, 2:17 pm, ZAky wrote:
> You can easily say it's actually two application there for two
> databases its fine.
It really is one application. In fact, it uses basically the same code
for the two databases. The staging area simply has more features, and
then when it gets published, the ch
You can easily say it's actually two application there for two
databases its fine.
For example let say the staging have no access from the web only from
the company intra net while the public application should be browsed
from the employs home.
In that case the design looks fine.
About the undo t
suggested was that my database design might have been a little
strange. I'd like to briefly explain it and see what you all think.
This application is used to schedule the people who work at our
center. It is fairly complex (different types of workers, different
areas of work, and various s
rse.
> Student hasAndBelongsToMany Assignment - and vice verse.
>
> The mark is in the AssignmentStudent model - which is the
> hasAndBelongsToMany model between Student and Assignment.
>
> Enjoy,
> John
>
> On Oct 30, 3:11 pm, japaternoster
> wrote:
>
> >
unting,
> production (job tracking) and crm components. I understand it sounds
> ambitious but I'd like to able to finish this project in the near
> future. I need your advice on a good database design for this kind of
> system.
>
> I have 2 small businesses which would
;d like to able to finish this project in the near
future. I need your advice on a good database design for this kind of
system.
I have 2 small businesses which would use this system independently.
Each company will have their own customers and database users. The
customers tie all of the
h student where the
marks are stored.
Hopefully this should give you some ideas.
The benefit of using Cake conventions all the way is that you can
create your app using the console (bake).
On Oct 30, 2:11 pm, japaternoster
wrote:
> Hi,
>
> I am relatively new to database design and have
ssignment belongsTo Course.
> Student hasAndBelongsToMany Assignment - and vice verse.
>
> The mark is in the AssignmentStudent model - which is the
> hasAndBelongsToMany model between Student and Assignment.
>
> Enjoy,
>John
>
> On Oct 30, 3:11 pm, japaternoster
>
ter
wrote:
> Hi,
>
> I am relatively new to database design and have only made some
> relatively simple CakePHP apps, but am currently working on a new
> project with some slightly more complicated database relationships.
>
> --Students
> student_id
> st
wrote:
>
> Hi,
>
> I am relatively new to database design and have only made some
> relatively simple CakePHP apps, but am currently working on a new
> project with some slightly more complicated database relationships.
>
> --Students
> student_id
> stud
Hi,
I am relatively new to database design and have only made some
relatively simple CakePHP apps, but am currently working on a new
project with some slightly more complicated database relationships.
--Students
student_id
student_name (I want to leave this as a single item
is simply since a type of reminder might be used by more than one
> model. Saying that this record belongs to that model reads a little
> clearer to me.
>
> /Martin
>
> On May 27, 10:22 am, Braindead wrote:
>
> > Well, my problem is not directly related to CakePHP, but a
be used by more than one
model. Saying that this record belongs to that model reads a little
clearer to me.
/Martin
On May 27, 10:22 am, Braindead wrote:
> Well, my problem is not directly related to CakePHP, but as it's about
> database design maybe I'll get some good ans
First, sorry my bad English...
Well, you could have a field "type" that reference the entity that has
the commentary. Pattern Single Table.
Braindead wrote:
> Well, my problem is not directly related to CakePHP, but as it's about
> database design maybe I'll get so
we do this with an type column.
On May 27, 9:22 am, Braindead wrote:
> Well, my problem is not directly related to CakePHP, but as it's about
> database design maybe I'll get some good answers.
>
> On my page I have news, downloads and users. These three can be
> comme
we do this with an type column.
On May 27, 9:22 am, Braindead wrote:
> Well, my problem is not directly related to CakePHP, but as it's about
> database design maybe I'll get some good answers.
>
> On my page I have news, downloads and users. These three can be
> comme
). Maybe anyone out there has an advice on how to solve this
(with a new parent class maybe?)
Thanks,
harpax
On 27 Mai, 10:22, Braindead wrote:
> Well, my problem is not directly related to CakePHP, but as it's about
> database design maybe I'll get some good answers.
>
>
Well, my problem is not directly related to CakePHP, but as it's about
database design maybe I'll get some good answers.
On my page I have news, downloads and users. These three can be
commented. Additionally I have a shoutbox and a guestbook. The
comments, shoutbox and guestbook ha
If I believe what you are saying, something like this would work (not
sure what fields you need):
// all the tenants
tenants
- id
- name
// all the expenses
expenses
- id
- cost
// relating a tenant to an expense = multiple tenants possible on an
expense
tenantExpenseRelation
- id
- tenant_id
-
I have two database tables. Tenants and expenses. Tenant has many
expenses. Expense belongs to tenant. When ever a new expense is
created a tenant who has paid for the expense is associated with it.
Now i want another relationship which is "affects". Each expense may
not affect all tenants. So wh
On Thu, Oct 2, 2008 at 5:13 PM, ORCC <[EMAIL PROTECTED]> wrote:
> [..snip..]
>
> Id City_Id Property Value
> 11 "greeting" "HELLO"
> 22 "greeting" "HOLA"
> 33 "greeting" "CIAO"
> 41 "contact""[EMAIL PROTECTED]"
> 52
I suggest you to:
- Create a single table Cities (id,name). For example
IdName
1 New York
2 Madrid
3 Roma
- Create a single table called Properties (id,city_id, property,
value) and place in that table All the properties for each city. For
instance:
Id City_Id Property Value
Hi,
I am using CakePHP as the framework for a highly content driven,
dynamic, location based site.
But I am confused for database design.
Whenever a user visits the site, he sees most of the data specific
only to his city. There is very little generalized data to be shown.
For this, I have 2
I'm looking for some input from the cake community on some db design
inquiries.
Lets say I have a table of venues (name, longitute, latitude ...).
A venue can belong to one or more child classification where
classifications are a stored as a hierachy using the adjacency list
model (id, parent_id
Hi group
I'm sure I've asked this before but, to save time (yours and mine!),
I'm going to simplify this.
My company sends out engineers to work on customer sites.
When they get to site, they can do one of many things.
I have listed each action in a table of its own, each scheduled visit
in a t
yId($id);
> > $this->set('image', $image);
> >
> > // View
> > link('next', '/images/view/'.
> > $image['ImageLink']['next_index']); ?>
> >
> > Best Wishes,
> >
> > Takuo Shiono
&
t;
> Best Wishes,
>
> Takuo Shiono
>
> Novice Programmer wrote:
> > Hello Shiono,
>
> > When i tried to add the two fields, it seemed like an overhead to me because
> > almost 50% of the images would be invalid, so adding two fields to database
> > desi
#x27;]); ?>
Best Wishes,
Takuo Shiono
Novice Programmer wrote:
> Hello Shiono,
>
> When i tried to add the two fields, it seemed like an overhead to me because
> almost 50% of the images would be invalid, so adding two fields to database
> design will lead to addition of
On Jan 27, 11:33 am, "Novice Programmer" <[EMAIL PROTECTED]>
wrote:
> Hello AD,
>
> Wont this query be slow?
No.
> Lets say that i have first valid image at index 1
> and the next one at the index 1000. How would this query perform?
SELECT * from images WHERE status = 1 AND id > $thisOne ORDE
Hello Shiono,
When i tried to add the two fields, it seemed like an overhead to me because
almost 50% of the images would be invalid, so adding two fields to database
design will lead to addition of these fields in these invalid images as well
and hence occupy more space in database. I want to
Hello AD,
Wont this query be slow? Lets say that i have first valid image at index 1
and the next one at the index 1000. How would this query perform?
Thanks.
On 1/27/08, AD7six <[EMAIL PROTECTED]> wrote:
>
>
>
>
> On Jan 26, 8:33 pm, "Novice Programmer" <[EMAIL PROTECTED]>
> wrote:
> > Though
On Jan 26, 8:33 pm, "Novice Programmer" <[EMAIL PROTECTED]>
wrote:
> Though this is less of a database question. but i am still posting it here
> since I think we can discuss the design as well.. :).
>
> I am maintaining a adresses of images stored on my filesystem in a database.
> I have design
Hello,
I often use solution 1. I think this solution can be applied in almost
all cases. However I have another solution. How about this:
1. add 2 fields (prev_valid_index and next_valid_index) in table.
2. update these fields in afterSave function.
3. show image with the next/previous link acc
Though this is less of a database question. but i am still posting it here
since I think we can discuss the design as well.. :).
I am maintaining a adresses of images stored on my filesystem in a database.
I have designed a system to show those images to the user. This interface
has the next and p
On Jan 25, 2008, at 3:11 PM, judouk wrote:
>
> ///sorry, gmail let me post it first before I'd finished and now
> that I've had the time to rethink what I was typing, I think I've
> solved my own problem !
>
>
> CREATE TABLE jobs (
> id int(10) not null auto_increment,
> typeofjob varch
///sorry, gmail let me post it first before I'd finished and now
that I've had the time to rethink what I was typing, I think I've
solved my own problem !
CREATE TABLE jobs (
id int(10) not null auto_increment,
typeofjob varchar(20) not null,
primary key(id)
) type = myisam;
CREATE TABL
Hi guys
Before I start to create a database structure which I may end up
changing, I wanted to run something past you all first.
I have a list of jobs to do (JOBS).
Each of these jobs may require one or more actions to complete it
(ACTION).
It would be nice to be able to report on how many act
of rtanz
Sent: Sun 7/15/2007 18:21
To: Cake PHP
Subject: database design
hi i am currently designing, as i can see tables should have a primary
key called id, in my case i have a table of university modules
uniquely identified by their code number, could i make code the
primary key, or should i
I would go with an id field that is an auto-increment and a code field
for storing your code numbers.
Winston
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to ca
hi i am currently designing, as i can see tables should have a primary
key called id, in my case i have a table of university modules
uniquely identified by their code number, could i make code the
primary key, or should i still use id and put the code number into the
id field?
--~--~-~-
Hi All,
On 18 abr, 10:06, GreyCells <[EMAIL PROTECTED]> wrote:
> Hi Laptop
>
> Cake uses the active record model, so by convention, expects a one to
> one relationship between model and table. That said, it is possible
> for multiple models to share the same table by specifying the useTable
> a
Hi Laptop
Cake uses the active record model, so by convention, expects a one to
one relationship between model and table. That said, it is possible
for multiple models to share the same table by specifying the useTable
attribute. If you're developing with 1.2, the actsAs could prove an
alternati
no, they woudl still exend AppModel.
OnlineAdvertisment belongsTo Advertisement
I was thinking of it like User and Profile where the Advertisement is
like the User and the OnlineAdvertisment holds specifc details about
the Ad, like a Profile would.
--~--~-~--~~~---~
Thanks gwoo..
does this mean I make models PrintAdvertisement extends
Advertisement??
I thought the hasOne association meant the object MUST have a related
record, or is it optional?
I was more inclined to have a PrintAdvertisement which has a hasOne
association with the base advertisements tab
Advertisement hasOne PrintAdvertisement, Advertisement hasOne
OnlineAdvertisment
With these assocaitions there would be common fields in the
advertisements table and then type specific fields on the
print_advertisements and online_advertisements tables.
So, laptop you have the right idea. Build
you could try making a base component for all your advertisements.
components are to controllers as helpers are to views.
On Apr 17, 9:19 pm, laptop <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Can anyone tell me what is the best way to go about implementing a
> base model class and then a type of that
Hi,
Can anyone tell me what is the best way to go about implementing a
base model class and then a type of that model. For example I have a
base "Advertisement" and then I will have PrintAdvertisement,
OnlineAdvertisement.
Each sub type will have its own specific fields and some types should
be
I am not sure I understand what are you trying to achieve, why would
you need a table with tag, user id and post id?
For typical tag cloud implementation, I assume that you would have
tags, users and posts, each user has set tags associated with it and
each post has (different) set of tags for i
Hi feelexit
> here's the problem, I have this table called "tags".
>
> tags has id, tag, users_id, posts_id, I dont want to have id to be my
> primary key, I only want 3 columns, tag, users_id, posts_id, and I
> want all these 3 columns to form my primary key.
>
> but based on wht I learned,
I just start a simple web application. Need to make tag clouds for it,
so it will look more like web 2.0
here's the problem, I have this table called "tags".
tags has id, tag, users_id, posts_id, I dont want to have id to be my
primary key, I only want 3 columns, tag, users_id, posts_id, and I
Ok an update on this for anybody that cares (if anybody cares ;) ). One
mistake I made cakewise was having the join table divisions_dances
misnamed it should be dances_divisions (alphebetical order). Dbdesigner
had added (and insists that they be there) some ids to the join table
that really aren'
I'm working on a database for a dance competition and I would
appreciate everyone's advice. This part of it is mostly for setting
things up, so that the data retrieved by cake follows the correct
division/competition structure. So you have differing types of
competitions/divisions:
couples - men
68 matches
Mail list logo