Anti Essays :: Free "Database" Essay
Below is a free essay on "Database" from Anti Essays, your source for online free essays, free research papers, and free term papers. Anti Essays also has a database of thousands of other free essays, free research papers, and free college essays. You can search for more free essays from Anti Essays using the search box above.
This free essay is for research purposes ONLY. Do NOT submit essays from Anti Essays as your own. If you use information from this free essay, it is your responsibility to cite it. MLA and APA citations can be found at the bottom of the page.
Submitted by kaizu on March 8, 2008
Q1. What are properties of relation?
A relation has following properties
The relation has a name that is distinct from all other relation names in the relational schema- all the tables have unique names;
Each cell of the relation contains exactly one atomic(single) value;
Each attribute has different name;
The values of an attribute are all from the same domain
Each tuple(row) is distinct; there are no duplicate tuple;
The order of attributes has no significance- there is no particular Order of listing attributes in table ;
The order of tuple has no significance theoretically; however, in practice, the order may affect the efficiency of accessing tuples;
Q2. Distinguish between the terms primary key, candidate key and foreign key?
Primary key: Primary key is the candidate key that is selected to identify tuples uniquely within the relation. Since a relation has no duplicate tuples, it is always possible to identify each row uniquely. Therefore a relation always has a primary key. They candidate key that are not selected as a primary key are called alternate keys. Primary key value is never null.
Candidate key: a candidate key is a key that uniquely defines rows in each table. Any of identified candidate key can be used as a Primary key. A candidate key can also be defined as a Super key (an attribute that uniquely identifies a tuple within relation) such that no proper subset is a super key within the relation.
Foreign key: An attribute, or set of attributes, within one relation that matches the candidate key of some relation. When an attribute appears in more than one relation it usually represents relationship between tuples of the two relations. A foreign key is a column in a table that does not uniquely identify tuples in that table, but is used as a link to matching columns in other tables to indicate a...
You must Login to view the entire essay.
If you are not a member yet, Sign Up for free!
"Database". Anti Essays. 5 Dec. 2008
<http://www.antiessays.com/free-essays/4010.html>
Database. Anti Essays. Retrieved December 5, 2008, from the World Wide Web: http://www.antiessays.com/free-essays/4010.html