Re: relations between tables
--- Adolfo Bello [EMAIL PROTECTED] wrote: As far as I know and how I understand it, the relationships are basically all in your head... You just have to coordinate it in your queries and other functions This is not true. Fot type innodb tables, you can define REFERENCES using ON DELETE (CASCADE|RESTRICT) and/or ON UPDATE CASCADE Adolfo Awesome... Thanx for the correction as I had no idea, apparently, that this was possible!!! __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: relations between tables
As far as I know and how I understand it, the relationships are basically all in your head... You just have to coordinate it in your queries and other functions This is not true. Fot type innodb tables, you can define REFERENCES using ON DELETE (CASCADE|RESTRICT) and/or ON UPDATE CASCADE Adolfo - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: relations between tables
Octavian Rasnita wrote: Is MySQL able (like MS Access) to define permanent relations between tables? For example, I want to define a master - child relation between 2 tables so when deleting some entries from the master table to automaticly delete the entries from the details table without specifying this in the query. Search for REFERENCES in the MySQL manual; it only applies to InnoDB type tables though. -- Michael T. Babcock C.T.O., FibreSpeed Ltd. http://www.fibrespeed.net/~mbabcock - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: relations between tables
--- Octavian Rasnita [EMAIL PROTECTED] wrote: Hi all, Is MySQL able (like MS Access) to define permanent relations between tables? For example, I want to define a master - child relation between 2 tables so when deleting some entries from the master table to automaticly delete the entries from the details table without specifying this in the query. Thank you. Teddy, Teddy's Center: http://teddy.fcc.ro/ Email: [EMAIL PROTECTED] As far as I know and how I understand it, the relationships are basically all in your head... You just have to coordinate it in your queries and other functions __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: relations between tables
On Fri, Jan 10, 2003 at 04:54:14PM +0200, Octavian Rasnita wrote: Hi all, Is MySQL able (like MS Access) to define permanent relations between tables? For example, I want to define a master - child relation between 2 tables so when deleting some entries from the master table to automaticly delete the entries from the details table without specifying this in the query. Dear Teddy, The InnoDB table type supports this type of functionality - see http://www.mysql.com/doc/en/SEC449.html for more details Cheers! -- Zak Greant [EMAIL PROTECTED] | MySQL Advocate | http://zak.fooassociates.com MySQL Tip: Upgrading your servers to 4.0.8? Make sure to upgrade your clients to 4.0.8 as well! See http://mysql.com/doc/en/News-4.0.8.html While we are postponing, life speeds by.--Lucius Annaeus Seneca - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Relations between tables?
On Wed, 04 Jul 2001, Mohan Khurana wrote: database enthusiasts, I'm fairly new to database administration and development, I'm currently still learning about features of databases so that I can ensure that my design for the database that I create will be correct. I will be storing general pieces of information in an index table that will store an ID #, which I wish to be incremented as more people are added to the index, the ID # should start with 0. The index will also contain information like their name, the date of the last visit to the construction site, and how many total days they have worked. One thing I'm not clear about is the notion of a primary key. Is this provided just to allow for faster SQL calls that access records using that primary key? Does specifying a primary key provide for more functionality in any way? A primary key is a piece of information that uniquely identifies that piece of data. It can be a number, a string, or even a group of numbers and/or strings, but is has to exist (it cannot be null or lacking a value). It is basically the building block of all relational databases. I would suggest getting a good book on database theory that will explain the basics of keys, normalization, and E-R diagrams. My favorite is Database Systems: Design, Implementation, and Management by Peter Rob and Carlos Coronel. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php -- John Meyer [EMAIL PROTECTED] Programmer Those who sacrifice liberty for security deserve neither -- Ben Franklin - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Relations between tables?
Mohan; I'm also new to this database administration and development. There are some excellent tutorials at Devshed.com. Below is a link to the tutorial on Database Normalization, I think this will give you some answers to your query: http://www.devshed.com/Server_Side/MySQL/Normal/ Joe At 09:04 AM 07/04/2001 , you wrote: database enthusiasts, I'm fairly new to database administration and development, I'm currently still learning about features of databases so that I can ensure that my design for the database that I create will be correct. I will be storing general pieces of information in an index table that will store an ID #, which I wish to be incremented as more people are added to the index, the ID # should start with 0. The index will also contain information like their name, the date of the last visit to the construction site, and how many total days they have worked. One thing I'm not clear about is the notion of a primary key. Is this provided just to allow for faster SQL calls that access records using that primary key? Does specifying a primary key provide for more functionality in any way? Another table keeps track of the number of hours worked in the current day, the location that work was performed, and the expected time to completion for the day. This data is updated frequently for each person. Is there anyway to allow for all data in this specific table to automatically disappear as a result of removing a work from the more general database? mohan - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php