0% found this document useful (0 votes)
25 views

dabms

The document outlines the stages in database design, including analyzing user environments, developing data models, and implementing physical models. It details the four levels of data, the six steps for designing a data structure, and the importance of normalization to reduce redundancy. Additionally, it explains the three normal forms that ensure efficient data organization and retrieval.

Uploaded by

Lucas Anonymous
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

dabms

The document outlines the stages in database design, including analyzing user environments, developing data models, and implementing physical models. It details the four levels of data, the six steps for designing a data structure, and the importance of normalization to reduce redundancy. Additionally, it explains the three normal forms that ensure efficient data organization and retrieval.

Uploaded by

Lucas Anonymous
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

‭ /16‬

1
‭Stages in database design‬
‭-‬ ‭Analyze user environment‬
‭-‬ ‭Develop data model‬
‭-‬ ‭Choose a dbms‬
‭-‬ ‭Develop logical model by mapping conceptual model to dbms‬
‭-‬ ‭Develop a physical model‬
‭-‬ ‭Implement a physical model‬
‭Four Levels of data‬
‭-‬ ‭Real World‬
‭-‬ ‭Enterprise in its environment‬
‭-‬ ‭mini-world/universe of discourse: part of the world that is represented in the‬
‭database‬
‭-‬ ‭Conceptual model‬
‭-‬ ‭Entities, entity sets, attributes, relationships‬
‭-‬ ‭ER(Entity relationship), EER(Enhanced Entity relationship), UML (Unified‬
‭Modeling Language) diagram‬
‭-‬ ‭Logical Model‬
‭-‬ ‭Metadata, data about data‬
‭-‬ ‭Record types, data item types, data aggregates‬
‭-‬ ‭Schema - stored in data dictionary, catalog‬
‭-‬ ‭Data occurrences‬
‭-‬ ‭Databases‬
‭-‬ ‭Data instances‬
‭-‬ ‭Files‬

‭6 steps designing a data structure‬


‭1.‬ ‭Identify the data elements‬
‭a.‬ ‭Interviewing users, analyzing existing systems, evaluate comparable systems‬
‭2.‬ ‭Subdivide the data elements‬
‭a.‬ ‭If a data element contains two or more components, subdivide the element into‬
‭those components, won’t need to parse items this way‬
‭b.‬ ‭Extent to subdivision depends on how it will be used, difficult to predict all future‬
‭uses, most designers subdivide data as much as possible‬
‭c.‬ ‭Easy to rebuild by concatenating components‬
‭3.‬ ‭Identify the tables and assign columns‬
‭a.‬ ‭Divide the data elements into logic groups‬
‭b.‬ ‭Groups become tables of the database, elements and attributes will become‬
‭columns‬
‭4.‬ ‭Identify the primary and foreign keys‬
‭a.‬ ‭Each table should have a primary key that uniquely identifies each row‬
‭i.‬ ‭Values of primary keys should be seldom, short, and easy to enter‬
‭correctly‬
‭ii.‬ ‭If possible, use an existing column for primary key‬
‭iii.‬ ‭ composite primary key is a primary key made up by more than one‬
A
‭column in a table‬
‭b.‬ ‭If two tables have a one to many relationship‬
‭i.‬ ‭Add a foreign key column to the table on the many side‬
‭ii.‬ ‭Foreign key must have same data type as primary key column‬
‭1.‬ ‭Eg. Employee Table and Orders Table‬
‭c.‬ ‭If two tables have a many to many relationship‬
‭i.‬ ‭Define a linking table to relate them‬
‭ii.‬ ‭Each of the many to many tables will have a one to many relationship‬
‭with the linking table‬
‭d.‬ ‭If two tables have a one to one relationship‬
‭i.‬ ‭Relate by primary keys‬
‭ii.‬ ‭This relationship is typically used to improve performance‬
‭e.‬ ‭Foreign Keys‬
‭i.‬ ‭A column that references columns of another table‬
‭ii.‬ ‭Use to manage relationships/dependencies between tables‬
‭iii.‬ ‭Foreign key column must have the same data type and value as the‬
‭primary key column its related to‬
‭iv.‬ ‭Must have same data type and value as the primary key column its‬
‭related to‬
‭5.‬ ‭Normalize data structure‬
‭a.‬ ‭Normalization separates the data in a data structure into related tables‬
‭b.‬ ‭Normalization reduces data redundancy, which can cause storage, performance‬
‭and maintenance problems‬
‭c.‬ ‭Un-normalized data structure a table can contain 2 or more entities‬
‭i.‬ ‭Repeating columns with repeating values‬
‭d.‬ ‭In a normalized data structure each table contains info about a single entity‬
‭i.‬ ‭Each piece of info stored in one place‬
‭e.‬ ‭To normalize: apply the normal forms in sequence,‬
‭i.‬ ‭7 normal forms, but considered normalized if first 3 applied‬
‭ .‬ ‭Identify the indexes‬
6
‭a.‬ ‭To search and manipulate data faster‬
‭ /23‬
1
‭3 Normal Forms‬
‭1.‬ ‭First: a table must not contain any repeating columns‬
‭2.‬ ‭Second: Every non-key column must depend on the entire primary key‬
‭3.‬ ‭Third: Every non-key column must depend only on the primary key‬
‭-‬ ‭Usually between 2 and 3‬
‭-‬ ‭Benefits‬
‭-‬ ‭More tables->more clustered indexes = data retrieval more efficient‬
‭-‬ ‭Makes operations on data entries more efficient‬
‭-‬ ‭Data redundancy is minimized‬
‭First Normal form‬
‭-‬ ‭Each column must contain a single atomic value‬
‭Second Normal Form‬
‭-‬ ‭Move columns that don’t depend on entire primary key to another table and establish a‬
‭relationship‬
‭Third Normal Form‬
‭-‬ ‭All columns must come solely from primary key‬
‭-‬ ‭A column that is computed from other columns contains derived data‬

You might also like