1 / 8

Relational Databases

Relational Databases. Overview Immediate access? Unnormalized, 1NF, 2NF, 3NF relational databases Operations for creating new relations-projection and join Indexes Operations for retrieving data from relations. Making Relations out of Relations. Two basic operations: projection and join

bazyli
Download Presentation

Relational Databases

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Relational Databases • Overview • Immediate access? • Unnormalized, 1NF, 2NF, 3NF relational databases • Operations for creating new relations-projection and join • Indexes • Operations for retrieving data from relations

  2. Making Relations out of Relations • Two basic operations: projection and join • Projection: selection of the chosen attribute(s), followed by removal of duplicate tuples. • Join: Integration of two relations based on chosen attribute(s).

  3. Projection • A EnrollmentList relation • Project EnrollmentList over Course = ? (Answer for ?) • Project EnrollmentList over Major and Stdname = ?

  4. Join • Two relations: Student and Enrollment • Join Student and Enrollment over Name = ?

  5. Indexes for Immediate Access • If primary key attributes do not perform well for some search functions, it may be appropriate to have an INDEX relation to help such searches. • Ex. Q: List the suppliers for which agent A2 is responsible.

  6. Types of Query • Let A be an attribute, E be an entity, and V be some value • Six types of queries • A(E)=? (ask for the value of an attribute for an entity) • A(?)=V (or !=, >, >=, <, <=) (ask for entities) • ?(E)=V (or !=, >, >=, <, <=) (ask for attributes) • ?(E)=? (ask for all values of all attributes) • A(?)=? (ask for the value of an attribute for all entities) • ?(?)=V (ask for all attributes of all entities for a certain value)

  7. Is immediate access necessary? • Types of access from the user’s viewpoint: • Operational access: need this to access data stores in order to continue the execution of system. • Informational access: need this to get information to make a better decision or performance.

  8. Data Immediate-Access Diagram (DIAD) • One data store may be implemented with more than one database. • Relevant information may be stored in different databases. (How to retrieve them? –SELECT-FROM-WHERE) • DIAD shows the access relationships between these databases.

More Related