This article highlight relational database model and also talks about relational keys and identity keys.
We shall represent a relation as a table with columns and rows. Each column of the table has a name, or attribute. Each row is called a tuple.
Example: STUDENT( Name, SID, Age, GPA)
NOTES:
Properties of relations
Properties of database relations are:
Relational keys
There are two kinds of keys in relations. The first are identifying keys: the primary key is the main concept, while two other keys – super key and candidate key – are related concepts. The second kind is the foreign key
Identity Keys
Super Keys
A super key is a set of attributes whose values can be used to uniquely identify a tuple within a relation. A relation may have more than one super key, but it always has at least one: the set of all attributes that make up the relation.
Candidate Keys
A candidate key is a super key that is minimal; that is, there is no proper subset that is itself a superkey. A relation may have more than one candidate key, and the different candidate keys may have a different number of attributes. In other words, you should not interpret 'minimal' to mean the super key with the fewest attributes.
A candidate key has two properties:
(i) in each tuple of R, the values of K uniquely identify that tuple (uniqueness)
(ii) no proper subset of K has the uniqueness property (irreducibility).
Primary Key
The primary key of a relation is a candidate key especially selected to be the key for the relation. In other words, it is a choice, and there can be only one candidate key designated to be the primary key.
Foreign keys
The attribute(s) within one relation that matches a candidate key of another relation. A relation may have several foreign keys, associated with different target relations.
Foreign keys allow users to link information in one relation to information in another relation. Without FKs, a database would be a collection of unrelated tables.
Example
CAR( State, LicensePlateNo, VehicleID, Model, Year, Manufacturer)
This schema has two keys:
K1 = { State, LicensePlateNo}
K2 = { VehicleID }
Both K1 and K2 are superkeys.
K3 = { VehicleID, Manufacturer} is a superkey, but not a key (Why?).
If a relation has more than one keys, we can select any one (arbitrarily) to be the primary key. Primary Key attributes are underlined in the schema:
CAR (State, LicensePlateNo, VehicleID, Model, Year, Manufacturer)
Designing of e-commerce solution using Web Site Design Tools
There are certain tools or softwares which assist developers in web develpopment. these tools are available in market inn order to make the best use of the development efforts put by the developers. These tools help the web developers to design highly interactive application at less prices.What is Flow Chart?
This article is brought to you by Programming Assignments Help which discuss about Flow Charts. Flow charts are graphical representation of a pseudo code (Algorithm). It is mostly used in software development to explain the work flow of logic.Entity-relationship modeling
The ER model defines the conceptual view of a database. It works around real-world entities and the associations among them. At view level, the ER model is considered a good option for designing databases. Here is some discussion upon connectivity.