Arxiv:1208.0084V1 [Cs.DB] 1 Aug 2012 Functional Dependencies

Total Page:16

File Type:pdf, Size:1020Kb

Arxiv:1208.0084V1 [Cs.DB] 1 Aug 2012 Functional Dependencies FundamentaAB CD EFdeF DependencieB Jaroslaw SAlBCDEaF Parke GodfreyF Jarek GryA York UnBversBEyF CompuEer SCBenCe & ngBneerBngF ToronEoF Canada and IBM CenEer for AdvanCed SEudBesF ToronEoF Canada '(sAlBCDEF godfreyF (arek)*Cse.yorku.Ca ABSTRACT query1s author could not leave DEABteB out of the group,by 2 Dependencies have played a significant role in database design for even if he realizes it would be better to 2 because it is stated in the many years. They have also been shown to be useful in query select. The query optimizer could, however, use an index scan optimization. In this paper, we discuss dependencies between to have the tuple stream in yeAB, Fonth order to accomplish the lexicographically ordered sets of tuples. We introduce formally gBoEp by on yeAB, DEABteB, Fonth, AD it recognizes that the concept of order dependency and present a set of axioms yeAB, Fonth and yeAB, DEABteB, Fonth offer the same (inference rules) for them. We show how query rewrites based on partition. This is done by query optimizers today 2 given the these axioms can be used for query optimization. We present functional dependency /D) information that Fonth 3 several interesting theorems that can be derived using the DEABteB is available to the optimizer 2 by rewrite. inference rules. We prove that functional dependencies are subsumed by order dependencies and that our set of axioms for /or the query above, the rewrite might still not be applied, since order dependencies is sound and complete. the query specifies the answers to be ordered by yeAB, quarter, Fonth. The /D that Fonth 3 DEABteB is noF 1. ABTRCDECTACB logically sufficient to eliminate DEABteB from the order,by, as it Consider the following SQL query (in Example 1). was to eliminate it from the group,by. Since a query plan must guarantee the order,by, it li-ely will include a sort operator for EXAMPLE 1. yeAB, DEABteB, Fonth, after all. select D.yeABC D.DEABteBC D.FonthC sEF(S.sAles) As totAl To see that the /D does not suffice to eliminate DEABteB from fBoF DAtes DC SAles S the order,by, imagine the values for DEABteB were the strings wheBe D.dAte_id = S.dAte_id DArCF, Cecond, FhArd, and DourFh. Data would be lexicographically And D.yeAB between 2001 And 200 ordered as DArCF, DourFh, Cecond, then FhArd4 .f course, we intend gBoEp by D.yeABC D.quarterC D.Fonth that values of DEABteB are, say, 1, 2, 3, and 7, so the data would oBdeB by D.yeABC D.quarterC D.Fonth order naturally as by date. It is unfortunate, then, that DEABteB is, in fact, redundant in this query) in the order,by also, but that In the schema, DAtes is a dABenCAon table with a row per day, the optimizer does not have the means to eliminate it. and SAles is a very large DEcF table recording all individual sales. Each has a surrogate,valued column dAte_id, which is the What is missing is the semantic information that Fonth orderC primary -ey for DAtes. In the DAtes dimension table, each row DEABteB, which is more than 8ust that Fonth DuncFAonElly describes a given day with explicit columns as yeAB, DEABteB, deFerBAneC DEABteB. This states that as values rACe from one Fonth, and dAy that describe the natural date values and tuple to another on Fonth, they must rACe, or stay the same, from additional columns that qualify that day, such as whether it is a the one tuple to the other on DEABteB that is, the values do not wee-end day or holiday). descend from the one tuple to the other on DEABteB). These have been called order dependencAeC .Ds), in contrast to Assume we have a tree index for DAtes on yeAB, Fonth, dAy. arXiv:1208.0084v1 [cs.DB] 1 Aug 2012 functional dependencies. .ur ob8ective is to bring reasoning about This index cannot help in a query plan, however, to accomplish order dependencies into the query optimizer. A query plan for the the group,by because DEABteB intercedes. .f course, DEABteB query above could then eliminate DEABteB from boFh the order, is logically redundant here, as Fonth which follows it in the by and the group,by clauses, and the index on yeAB, Fonth, group,by) functionally determines DEABteB. /irst quarter dAy might then provide for an efficient plan with no need for a encompasses the months of 0anuary, /ebruary, and March, second sort operator. quarter, the months of April, May, and 0une, and so forth.) The The notion of order dependencies can be greatly generalized, and the potential use of them in query optimization shown to be vast. Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are The relationships between ordered sets have been explored in the not made or distributed for profit or commercial advantage and that copies past and several different notions of order have been considered. bear this notice and the full citation on the first page. To copy otherwise, to In this wor-, we consider 8ust lexAcogrEphAcEl ordering of tuples, republish, to post on servers or to redistribute to lists, requires prior specific as by the order,by operator in S$L, because this is the notion of permission and/or a fee. Articles from this volume were invited to present order used in S$L and within query optimization for tuple their results at The 38th International Conference on Very Large Data Bases, streams. August 27th - 31st 2012, Istanbul, Turkey. Proceedings of the VLDB Endowment, Vol. 5, No. 11 Copyright 2012 VLDB Endowment 2150-8097/12/07... $ 10.00. 1220 The contribution of this paper is to present an ExAoBEFAzEFAon for could be changed to BulFA-CeFC easily, with no consequences to our order dependencies, analogous to Armstrong1s axiomatization for axiomatization. /Ds 91:. This provides a formal framewor- for reasoning about .Ds. There are two reasons for one to pursue an axiomatization. Ta le 1. Botational conventions. 1. The axioms provide AnCAghF into how dependencies RelEFAonC behave 2 and patterns for how dependencies logically A capital letter in bold italics represents a relEFAonA R. follow from others 2 that are not easily evident A small letter in bold represent a relEFAonEl AnCFEnce reasoning from first principles. E FEble)A r. 2. A Cound and coBpleFe axiomatization is the first We use capital letters to represent single EFFrAbuFeCA necessary step to designing an efficient AnDerence A,B,C. TupleC are mar-ed with small letters in italicsA C, F. procedure. SeFC .ur axioms for .Ds help us explore beneficial query rewrites. Calligraphic letters stand for CeFC oD EFFrAbuFeA F, , . We show how they can be cast as a new type of integrity We use proximity for unAon of setsA F is shorthand constraint to be used in query optimization. We derive theorems for F. Li-ewise, AF or FA, where F is a set of based on our axioms, which illustrate surprising inferences and attributes and A a single attribute, stands for F {A. equivalences over .Ds, and which can provide for powerful query rewrites. While .Ds for databases have been explored before, we Also F denotes the pro8ection of the tuple F on the present the first general axiomatization for them. We prove the attributes of F, while is the shorthand for . CoundneCC of the axioms. We demonstrate that Armstrong1s LACFC axiomatization for /Ds is subsumed within our axiomatization for .Ds. In this sense, .Ds can be thought of as a generalization of Bold letters stand for lACFC of attributesA , , . Note list /Ds.) We then prove the coBpleFeneCC of the set of axioms. X could be the empty list, 9:. Wor-ing with .Ds is more involved than with /Ds because the We use square brac-ets to denote a listA 9A, B, C:. The order of the attributes matters. Thus, we must wor- with lACFC of notation 9A B T: denotes that A is the heEd of the list, and attributes instead of with CeFC. This necessarily complicates our T is the FEAl of the list, the remaining list with the first axioms 2 compared with Armstrong1s axioms for /Ds 2 and the element removed. proofs of our theorems. Proximity is used for concatenation of lists of attributesA is shorthand for . Li-ewise, A and A stands CFtline. In Section 2, we present .Ds) formally. We provide respectively for [A] and [A], where is list of bac-ground, our notational conventions, and definitions for .Ds attributes and A is a single attribute. AB denotes [A, B]. Section 2.1). We show from where .Ds in databases naturally denotes some other permutation of elements of list . arise Section 2.2). We demonstrate a number of effective ways .Ds may be used in query optimization Section 2.3). We discuss DE/INITI.N 1. operator ) Let X be a list of attributes, C and F be a query optimization technique with .Ds that we have two tuples in relation instance r. .perator is defined as followsA implemented as a prototype in IBM DB2 918:, and our ongoing wor- with these techniques. In Section 3, we introduce the where X $ 9A B T: axiomatization for .Ds Section 3.1), and we prove the soundness if ! ) of the axioms Section 3.2). We derive a collection of theorems or if " ) and T C 9: or # #)) using our axioms 2 which we use in the proof of completeness 2 which illustrate the utility of our axioms Section 3.3). In Section In this paper, we assume ECcendAng Asc) order in the 7, we prove the completeness of the axiomatization.
Recommended publications
  • Powerdesigner 16.6 Data Modeling
    SAP® PowerDesigner® Document Version: 16.6 – 2016-02-22 Data Modeling Content 1 Building Data Models ...........................................................8 1.1 Getting Started with Data Modeling...................................................8 Conceptual Data Models........................................................8 Logical Data Models...........................................................9 Physical Data Models..........................................................9 Creating a Data Model.........................................................10 Customizing your Modeling Environment........................................... 15 1.2 Conceptual and Logical Diagrams...................................................26 Supported CDM/LDM Notations.................................................27 Conceptual Diagrams.........................................................31 Logical Diagrams............................................................43 Data Items (CDM)............................................................47 Entities (CDM/LDM)..........................................................49 Attributes (CDM/LDM)........................................................55 Identifiers (CDM/LDM)........................................................58 Relationships (CDM/LDM)..................................................... 59 Associations and Association Links (CDM)..........................................70 Inheritances (CDM/LDM)......................................................77 1.3 Physical Diagrams..............................................................82
    [Show full text]
  • Denormalization Strategies for Data Retrieval from Data Warehouses
    Decision Support Systems 42 (2006) 267–282 www.elsevier.com/locate/dsw Denormalization strategies for data retrieval from data warehouses Seung Kyoon Shina,*, G. Lawrence Sandersb,1 aCollege of Business Administration, University of Rhode Island, 7 Lippitt Road, Kingston, RI 02881-0802, United States bDepartment of Management Science and Systems, School of Management, State University of New York at Buffalo, Buffalo, NY 14260-4000, United States Available online 20 January 2005 Abstract In this study, the effects of denormalization on relational database system performance are discussed in the context of using denormalization strategies as a database design methodology for data warehouses. Four prevalent denormalization strategies have been identified and examined under various scenarios to illustrate the conditions where they are most effective. The relational algebra, query trees, and join cost function are used to examine the effect on the performance of relational systems. The guidelines and analysis provided are sufficiently general and they can be applicable to a variety of databases, in particular to data warehouse implementations, for decision support systems. D 2004 Elsevier B.V. All rights reserved. Keywords: Database design; Denormalization; Decision support systems; Data warehouse; Data mining 1. Introduction houses as issues related to database design for high performance are receiving more attention. Database With the increased availability of data collected design is still an art that relies heavily on human from the Internet and other sources and the implemen- intuition and experience. Consequently, its practice is tation of enterprise-wise data warehouses, the amount becoming more difficult as the applications that data- of data that companies possess is growing at a bases support become more sophisticated [32].Cur- phenomenal rate.
    [Show full text]
  • A Comprehensive Analysis of Sybase Powerdesigner 16.0
    white paper A Comprehensive Analysis of Sybase® PowerDesigner® 16.0 InformationArchitect vs. ER/Studio XE2 Version 2.0 www.sybase.com TABLe OF CONTENtS 1 Introduction 1 Product Overviews 1 ER/Studio XE2 3 Sybase PowerDesigner 16.0 4 Data Modeling Activities 4 Overview 6 Types of Data Model 7 Design Layers 8 Managing the SAM-LDM Relationship 10 Forward and Reverse Engineering 11 Round-trip Engineering 11 Integrating Data Models with Requirements and Processes 11 Generating Object-oriented Models 11 Dependency Analysis 17 Model Comparisons and Merges 18 Update Flows 18 Required Features for a Data Modeling Tool 18 Core Modeling 25 Collaboration 27 Interfaces & Integration 29 Usability 34 Managing Models as a Project 36 Dependency Matrices 37 Conclusions 37 Acknowledgements 37 Bibliography 37 About the Author IntrOduCtion Data modeling is more than just database design, because data doesn’t just exist in databases. Data does not exist in isolation, it is created, managed and consumed by business processes, and those business processes are implemented using a variety of applications and technologies. To truly understand and manage our data, and the impact of changes to that data, we need to manage more than just models of data in databases. We need support for different types of data models, and for managing the relationships between data and the rest of the organization. When you need to manage a data center across the enterprise, integrating with a wider set of business and technology activities is critical to success. For this reason, this review will use the InformationArchitect version of Sybase PowerDesigner rather than their DataArchitect™ version.
    [Show full text]
  • Database Normalization
    Outline Data Redundancy Normalization and Denormalization Normal Forms Database Management Systems Database Normalization Malay Bhattacharyya Assistant Professor Machine Intelligence Unit and Centre for Artificial Intelligence and Machine Learning Indian Statistical Institute, Kolkata February, 2020 Malay Bhattacharyya Database Management Systems Outline Data Redundancy Normalization and Denormalization Normal Forms 1 Data Redundancy 2 Normalization and Denormalization 3 Normal Forms First Normal Form Second Normal Form Third Normal Form Boyce-Codd Normal Form Elementary Key Normal Form Fourth Normal Form Fifth Normal Form Domain Key Normal Form Sixth Normal Form Malay Bhattacharyya Database Management Systems These issues can be addressed by decomposing the database { normalization forces this!!! Outline Data Redundancy Normalization and Denormalization Normal Forms Redundancy in databases Redundancy in a database denotes the repetition of stored data Redundancy might cause various anomalies and problems pertaining to storage requirements: Insertion anomalies: It may be impossible to store certain information without storing some other, unrelated information. Deletion anomalies: It may be impossible to delete certain information without losing some other, unrelated information. Update anomalies: If one copy of such repeated data is updated, all copies need to be updated to prevent inconsistency. Increasing storage requirements: The storage requirements may increase over time. Malay Bhattacharyya Database Management Systems Outline Data Redundancy Normalization and Denormalization Normal Forms Redundancy in databases Redundancy in a database denotes the repetition of stored data Redundancy might cause various anomalies and problems pertaining to storage requirements: Insertion anomalies: It may be impossible to store certain information without storing some other, unrelated information. Deletion anomalies: It may be impossible to delete certain information without losing some other, unrelated information.
    [Show full text]
  • Normalization for Relational Databases
    Chapter 10 Functional Dependencies and Normalization for Relational Databases Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter Outline 1 Informal Design Guidelines for Relational Databases 1.1Semantics of the Relation Attributes 1.2 Redundant Information in Tuples and Update Anomalies 1.3 Null Values in Tuples 1.4 Spurious Tuples 2. Functional Dependencies (skip) Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 10- 2 Chapter Outline 3. Normal Forms Based on Primary Keys 3.1 Normalization of Relations 3.2 Practical Use of Normal Forms 3.3 Definitions of Keys and Attributes Participating in Keys 3.4 First Normal Form 3.5 Second Normal Form 3.6 Third Normal Form 4. General Normal Form Definitions (For Multiple Keys) 5. BCNF (Boyce-Codd Normal Form) Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 10- 3 Informal Design Guidelines for Relational Databases (2) We first discuss informal guidelines for good relational design Then we discuss formal concepts of functional dependencies and normal forms - 1NF (First Normal Form) - 2NF (Second Normal Form) - 3NF (Third Normal Form) - BCNF (Boyce-Codd Normal Form) Additional types of dependencies, further normal forms, relational design algorithms by synthesis are discussed in Chapter 11 Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 10- 4 1 Informal Design Guidelines for Relational Databases (1) What is relational database design? The grouping of attributes to form "good" relation schemas Two levels of relation schemas The logical "user view" level The storage "base relation" level Design is concerned mainly with base relations What are the criteria for "good" base relations? Copyright © 2007 Ramez Elmasri and Shamkant B.
    [Show full text]
  • The Denormalized Relational Schema
    The Denormalized Relational Schema How undying is Forster when take-out and wifely Hermon debauches some nebulisers? Unrejoiced Judas crams that scrutinizinglyschematization enough, scorify iscephalad Ram lingering? and verdigris substantivally. When Quigly retouches his exclusionists stagnating not Two related fields of the more data denormalization types of data was common to long as a normalized but, denormalized relational schema limits do you Maybe Normalizing Isn't Normal Coding Horror. Once she is told that this is a different animal called a cow, she will modify her existing schema for a horse and create a new schema for a cow. Overall these represent things that can be done at different stages in the design process that will maximize efficiencies of the model. Data redundancy leads to data anomalies and corruption and should be avoided when creating a relational database consisting of several entities. DBMS processes must insure integrity and accuracy. But relational databases still remain the default choice in most applications. That email is too long. NULL when the object type is mapped to tables in a denormalized schema form. Still, processing technology advancements have resulted in improved snowflake schema query performance in recent years, which is one of the reasons why snowflake schemas are rising in popularity. Updating, to the contrary, gets faster as all pieces of data are stored in a single place. Migration scripts are necessary. The reporting one is denormalized to get the most data in the most usable structure with each database call. Star schema dimension tables are not normalized, snowflake schemas dimension tables are normalized.
    [Show full text]
  • Best Practices What It Means to Be A
    What it means to be a DBA Best Practices Natural Conference in Boston, MA August 17-20, 2008 Dieter W. Storr [email protected] DBA ? Doing Business As …… Deutsche Ba (German airline) Doctor of Business Administration Davis-Bacon Act of 1931 Design Basis Accident Design Business Association Dual Band Antenna Direct Budget Authority Dollar Bill Acceptors Dumb But Adorable Danish Beekeepers' Association Dieter W. Storr August 2008 [email protected] 2 ASSO DATA WORK Data Base Administrator Dieter W. Storr August 2008 [email protected] 3 Content 1 Tasks of a DBA [Help to] determine the database design Hardware level Application design level Determine the ADABAS parameters Help to determine the transaction design Coordinate the online and batch processes Dieter W. Storr August 2008 [email protected] 4 Content 2 Develop Back-up and recovery procedures Ensure (force) quality assurance and quality control Performance and tuning Educate and train staff members [Help to] determine data security Dieter W. Storr August 2008 [email protected] 5 Content 3 [Help to] determine standard routines and help functions Maintain and optimize the database system Ideal DBA profile -- technically and personally Future requirements Position and salary of the DBA in the enterprise Dieter W. Storr August 2008 [email protected] 6 Tasks of a DBA Sometimes different organizational units Run Utilities Create FDT Determine Disks Determine DB Components Determine Access paths Install ADABAS SVC/Router Dieter W. Storr August 2008 [email protected] 7 Tasks of a DBA Leads to performance problems DBA must have good knowledge about development as well as system tasks, for example Programming (Natural, Cobol, Assembler), design Operating system, TP monitor, SVC installation Supervisor and coordinator Mainframe, Unix, Linux and/or Windows Dieter W.
    [Show full text]
  • Normalization of Database Tables
    Normalization Of Database Tables Mistakable and intravascular Slade never confect his hydrocarbons! Toiling and cylindroid Ethelbert skittle, but Jodi peripherally rejuvenize her perigone. Wearier Patsy usually redate some lucubrator or stratifying anagogically. The database can essentially be of database normalization implementation in a dynamic argument of Database Data normalization MIT OpenCourseWare. How still you structure a normlalized database you store receipt data? Draw data warehouse information will be familiar because it? Today, inventory is hardware key and database normalization. Create a person or more please let me know how they see, including future posts teaching approach an extremely difficult for a primary key for. Each invoice number is assigned a date of invoicing and a customer number. Transform the data into a format more suitable for analysis. Suppose you execute more joins are facts necessitates deletion anomaly will be some write sql server, product if you are moved from? The majority of modern applications need to be gradual to access data discard the shortest time possible. There are several denormalization techniques, and apply a set of formal criteria and rules, is the easiest way to produce synthetic primary key values. In a database performance have only be a candidate per master. With respect to terminology, is added, the greater than gross is transitive. There need some core skills you should foster an speaking in try to judge a DBA. Each entity type, normalization of database tables that uniquely describing an election system. Say that of contents. This table represents in tables logically helps in exactly matching fields remain in learning your lecturer left side part is seen what i live at all.
    [Show full text]
  • Denormalization in Data Warehouse Example
    Denormalization In Data Warehouse Example Stacy is impartibly frequentative after financial Durant vibrated his polydactylism mildly. Ontogenetic Laurent understudies no parricide pedestrianise cursorily after Tod adhered surely, quite westering. How unpractised is Filmore when scrimpiest and arduous Willard esquires some syphiloma? One example of warehouse proves very fine points of denormalization in data warehouse example, or breach of interest table? Peshawar students in corresponding table etc. Thousands of concurrent users supported. Thanks for determining the identify and efficiently to have his principle ideas about it is more time of warehouse data model? One example is with table joins. For example, Faculty Hire Date, we always have to have join with this address table. In our dimensional data model, stored procedures, you typically use a dimensional data model to build a data mart. Calculus for example if customer categories, and warehouse structure with invalid data and thanks for example in denormalization data warehouse? We should store data denormalization in dimension tables to loop because only purpose is an example in denormalization is known as it. Sometimes, we need some rules to guide our definition of aggregates. You can change your ad preferences anytime. There are updated by denormalization in data warehouse example. It was given use technology advancements have become more insights and to it is denormalization in data warehouse example. This figure is not only one way. Below is a table that stores the names and telephone numbers of customers. You are independent of warehouse design, users frequently hear goes like amazon rds may be consigned to point of accumulating snapshot are.
    [Show full text]
  • Introduction to Databases Presented by Yun Shen ([email protected]) Research Computing
    Research Computing Introduction to Databases Presented by Yun Shen ([email protected]) Research Computing Introduction • What is Database • Key Concepts • Typical Applications and Demo • Lastest Trends Research Computing What is Database • Three levels to view: ▫ Level 1: literal meaning – the place where data is stored Database = Data + Base, the actual storage of all the information that are interested ▫ Level 2: Database Management System (DBMS) The software tool package that helps gatekeeper and manage data storage, access and maintenances. It can be either in personal usage scope (MS Access, SQLite) or enterprise level scope (Oracle, MySQL, MS SQL, etc). ▫ Level 3: Database Application All the possible applications built upon the data stored in databases (web site, BI application, ERP etc). Research Computing Examples at each level • Level 1: data collection text files in certain format: such as many bioinformatic databases the actual data files of databases that stored through certain DBMS, i.e. MySQL, SQL server, Oracle, Postgresql, etc. • Level 2: Database Management (DBMS) SQL Server, Oracle, MySQL, SQLite, MS Access, etc. • Level 3: Database Application Web/Mobile/Desktop standalone application - e-commerce, online banking, online registration, etc. Research Computing Examples at each level • Level 1: data collection text files in certain format: such as many bioinformatic databases the actual data files of databases that stored through certain DBMS, i.e. MySQL, SQL server, Oracle, Postgresql, etc. • Level 2: Database
    [Show full text]
  • Relational Model of Temporal Data Based on 6Th Normal Form
    D. Golec i dr. Relacijski model vremenskih podataka zasnovan na 6. normalnoj formi ISSN 1330-3651 (Print), ISSN 1848-6339 (Online) https://doi.org/10.17559/TV-20160425214024 RELATIONAL MODEL OF TEMPORAL DATA BASED ON 6TH NORMAL FORM Darko Golec, Viljan Mahnič, Tatjana Kovač Original scientific paper This paper brings together two different research areas, i.e. Temporal Data and Relational Modelling. Temporal data is data that represents a state in time while temporal database is a database with built-in support for handling data involving time. Most of temporal systems provide sufficient temporal features, but the relational models are improperly normalized, and modelling approaches are missing or unconvincing. This proposal offers advantages for a temporal database modelling, primarily used in analytics and reporting, where typical queries involve a small subset of attributes and a big amount of records. The paper defines a distinctive logical model, which supports temporal data and consistency, based on vertical decomposition and sixth normal form (6NF). The use of 6NF allows attribute values to change independently of each other, thus preventing redundancy and anomalies. Our proposal is evaluated against other temporal models and super-fast querying is demonstrated, achieved by database join elimination. The paper is intended to help database professionals in practice of temporal modelling. Keywords: logical model; relation; relational modelling; 6th Normal Form; temporal data Relacijski model vremenskih podataka zasnovan na 6. normalnoj formi Izvorni znanstveni članak Ovaj rad povezuje dva različita područja istraživanja, tj. Temporalne podatke i Relacijsko modeliranje. Temporalni podaci su podaci koji predstavljaju stanje u vremenu, a temporalna baza podataka je baza podataka s ugrađenom podrškom za baratanje s podacima koji uključuju vrijeme.
    [Show full text]
  • CS411 Database Systems
    CS411 Database Systems 05: Relational Schema Design Ch. 3.1-3.5, except 3.4.2 - 3.4.3 and 3.5.3. 1 How does this fit in? • ER Diagrams: Data Definition • Translation to Relational Schema: Data Definition • Relational Algebra: Data Manipulation So now you know how to construct relations, and the basics of querying them… Now, let’s complete the data definition story (before more DM) • Not sufficient to map the ER to Relational Schema and call it a day... Have some more work to do! 2 Motivation • We have designed ER diagram, and translated it into a relational db schema R = set of R1, R2, ... • Now what? • We can do the following – implement R in SQL – start using it • However, R may not be well-designed, thus causing us a lot of problems • OR: people may start without an ER diagram, and you need to reformat the schema R 3 – Either way you may need to improve the schema Q: Is this a good design? Individuals with several phones: Address SSN Phone Number 10 Green 123-321-99 (201) 555-1234 10 Green 123-321-99 (206) 572-4312 431 Purple 909-438-44 (908) 464-0028 431 Purple 909-438-44 (212) 555-4000 4 Potential Problems Address SSN Phone Number 10 Green 123-321-99 (201) 555-1234 10 Green 123-321-99 (206) 572-4312 431 Purple 909-438-44 (908) 464-0028 431 Purple 909-438-44 (212) 555-4000 • Redundancy • Update anomalies – maybe we’ll update the address of the person with phone number ‘(206) 572-4312’ to something other than ‘10 Green’.
    [Show full text]