Notes of BCA-3, DBMS ASSOCIATION.pdf - Study Material
Page 1 :
32 DATABASE MANAGEMENT SYSTEMS, , {Roll-No} and {Phone-No} are two candidate key. Because we can consider any one of these as, , a primary key., Foreign Key : Foreign keys represent relationships between tables., + A foreign key is a column whose values are derived from the primary key of some other table., , OR, * A foreign key is a key which is the primary key in the one table and used to relate with some, , attributes in other table with same data entry., , , , , , , , , , , , , , , , , , , , , , eg,, Student :, Roll_No Name Subject, a 1 Vijay Computer, 2 Gopal Math, 3 Sanjay Physics, Marks :, Roll_No Sem Marks, — 1 ml 80, 2 Vv 715, 3 vil 70, , , , , , , , , , , , , , , , Here Roll_No of marks table is foreign key., , 1.25 ASSOCIATION, , Association connect two or more independent entity types., , For example : Teaches/Teachers by are a basic binary associative relationship connecting the two, entity types teachers and courses., , While writes/written by is a ternary relationship that connects student, course and Reports., , 1.26 SPECIALIZATION, Specialization is the result of taking a subset of a higher-level entity set to form a lower-level, , entity set., We can say : A lower-level entity set inherits all the attributes and relationship participation of, , the higher-level entity set to which it is linked., * Specialization follows “Top-down” approach., , Name) (Street), , , , , , , , Specialization, wonezifesauan)
Page 2 :
DATABASE MANAGEMENT SYSTEM 33, , 1.27 GENERALIZATION, , Generalization is the result of taking the union of two or more disjoint (lower-level) entity sets, to produce a higher-level entity set. :, , The attributes of higher-level entity sets are inherited by lower-level entity sets., , * Generalization follow “Bottom-up” approach., , * Person is superclass (higher-level entity) and customer and employee are lower level entity., , 1.28 AGGREGATION, , An aggregation is an abstraction through which relationships are treated as higher level entities., * Aggregation allows us to indicate that a relationship set participates in another relationship, set., , , , , , e.g., The relationship set work-on, relating the entity sets employees, branch and job as a higher, level entity set called work-on., , 1.29 RELATIONSHIPS OF HIGHER DEGREE, , * The degree of a relationship type is the number of participating entity types., * A relationship type of degree two is called binary. One of the degree three is called ternary., eg,, , Employee Works-For Department, , FA, , The works-for relationship is of degree two., Supplier Supply Project
Page 3 :
34 DATABASE MANAGEMENT SYSTEMS., , The supply relationship is of degree three or a ternary relationship is supply., , 1.30 REDUCTION OF AN E-R DIAGRAM TO TABLES, * A database that conforms to an E-R database schema can be represented by a collection of, tables., * For each entity set and for each relationship set in the database, there is a unique table that, is assigned the name of the corresponding entity set or relationship set., * Each table has multiple columns, each of which has a unique name. We can represent in E-R, schema by table., , 1.30.1 Tabular Representation of Strong Entity Set, , Let E be a strong entity set with descriptive attributes a1, a2, a3, ..., dn. We represents this entity, by a tables called E with n distinct columns, cach of which corresponds to one of the attribute of E., Each row in this table corresponds to one entity of the entity set E., , , , Customer, , Customer, , , , SSN Name DOB Address, , , , , , , , , , , , , , , , 1.30.2 Tabular Representation of Weak Entity Set, , Let A be a weak entity set with attributes a, a, ..., @m, Let B be the strong entity set on which A is dependent., , Let the primary key of B consist of attributes bj, b2, ...,b,. We represent the entiy set A by a, table called A with one column for each attribute of the set, , {@45 495 +++ @n} U {by, Bay «+s Dn}, , , , , , , , , , , , , Nias, Strong entity Weak entity, , , , , , “JETT, , Primary key, , Roll-no | Sem | Mt, | aa Final