Unidad IV
Unidad IV
Unidad IV
Asignatura
Análisis y Diseño de Sistemas
Facilitador
Johanna Jiménez, M.A.
Participante
Yaniel Mercedes
Matricula
100064028
Tema
Unidad VI
Fecha
03/07/2024
2
Contenido
Introducción.........................................................................................................................2
Diccionario de Datos................................................................................................................................2
Extructura para crear las tablas y sus relaciones:....................................................................................3
Relacion Entre Tablas:.........................................................................................................5
Referencias........................................................................................................................12
3
Introducción
Diccionario de Datos.
Identifica los procesos donde se emplean los datos y los sitios donde se necesita el acceso
inmediato a la información, se desarrolla durante el análisis de flujo de datos y auxilia a los
analistas que participan en la determinación de los requerimientos del sistema, su contenido
también se emplea durante el diseño.
En un diccionario de datos se encuentra la lista de todos los elementos que forman parte del flujo
de datos de todo el sistema. Los elementos más importantes son flujos de datos, almacenes de
datos y procesos. El diccionario de datos guarda los detalles y descripción de todos estos
elementos.
Si los analistas desean conocer cuántos caracteres abarca un determinado dato o qué otros
nombres recibe en distintas partes del sistema, o dónde se utiliza, encontrarán las respuestas en
un diccionario de datos desarrollado en forma apropiada.
4
use Biblioteca_D;
go
CASCADE);
5
go
SELECT
'DATADICTIONARY' AS [REPORT],
@@SERVERNAME AS [ServerName],
DB_NAME() AS [Biblioteca_D],
t.name AS [ALUMNOS_D],
schema_name(t.schema_id) AS [Biblioteca_D],
c.name AS [ColumnName],
st.name AS [DataType],
c.max_length AS [MaxLength],
CASE
WHEN c.is_nullable = 0 THEN 'NO'
ELSE 'YES'
END AS [IsNull],
CASE
WHEN c.is_identity = 0 THEN 'NO'
ELSE 'YES'
END AS [IsIdentity],
isnull(ep.value, '-- add description here') AS [Description]
FROM [sys].[tables] t
INNER JOIN [sys].[columns] c
ON t.object_id= c.object_id
INNER JOIN [sys].[systypes] st
ON c.system_type_id= st.xusertype
INNER JOIN [sys].[objects] o
ON t.object_id= o.object_id
LEFT JOIN [sys].[extended_properties] ep
ON o.object_id = ep.major_id
AND c.column_Id = ep.minor_id
WHERE t.name <> 'sysdiagrams'
ORDER BY
t.name,
c.column_Id
7
SELECT
'DATADICTIONARY' AS [REPORT],
@@SERVERNAME AS [ServerName],
DB_NAME() AS [Biblioteca_D],
t.name AS [AUTOR_D],
schema_name(t.schema_id) AS [Biblioteca_D],
c.name AS [ColumnName],
st.name AS [DataType],
c.max_length AS [MaxLength],
CASE
WHEN c.is_nullable = 0 THEN 'NO'
ELSE 'YES'
END AS [IsNull],
CASE
WHEN c.is_identity = 0 THEN 'NO'
ELSE 'YES'
END AS [IsIdentity],
isnull(ep.value, '-- add description here') AS [Description]
FROM [sys].[tables] t
INNER JOIN [sys].[columns] c
ON t.object_id= c.object_id
INNER JOIN [sys].[systypes] st
ON c.system_type_id= st.xusertype
INNER JOIN [sys].[objects] o
ON t.object_id= o.object_id
LEFT JOIN [sys].[extended_properties] ep
ON o.object_id = ep.major_id
AND c.column_Id = ep.minor_id
WHERE t.name <> 'sysdiagrams'
ORDER BY
t.name,
c.column_Id
8
SELECT
'DATADICTIONARY' AS [REPORT],
@@SERVERNAME AS [ServerName],
DB_NAME() AS [Biblioteca_D],
t.name AS [Libro_D],
schema_name(t.schema_id) AS [Biblioteca_D],
c.name AS [ColumnName],
st.name AS [DataType],
c.max_length AS [MaxLength],
CASE
WHEN c.is_nullable = 0 THEN 'NO'
ELSE 'YES'
END AS [IsNull],
CASE
WHEN c.is_identity = 0 THEN 'NO'
ELSE 'YES'
END AS [IsIdentity],
isnull(ep.value, '-- add description here') AS [Description]
FROM [sys].[tables] t
INNER JOIN [sys].[columns] c
ON t.object_id= c.object_id
INNER JOIN [sys].[systypes] st
ON c.system_type_id= st.xusertype
INNER JOIN [sys].[objects] o
ON t.object_id= o.object_id
LEFT JOIN [sys].[extended_properties] ep
ON o.object_id = ep.major_id
AND c.column_Id = ep.minor_id
WHERE t.name <> 'sysdiagrams'
ORDER BY
t.name,
c.column_Id
9
SELECT
'DATADICTIONARY' AS [REPORT],
@@SERVERNAME AS [ServerName],
DB_NAME() AS [Biblioteca_D],
t.name AS [Prestamos_Libros_D],
schema_name(t.schema_id) AS [Biblioteca_D],
c.name AS [ColumnName],
st.name AS [DataType],
c.max_length AS [MaxLength],
CASE
WHEN c.is_nullable = 0 THEN 'NO'
ELSE 'YES'
END AS [IsNull],
CASE
WHEN c.is_identity = 0 THEN 'NO'
ELSE 'YES'
END AS [IsIdentity],
isnull(ep.value, '-- add description here') AS [Description]
FROM [sys].[tables] t
INNER JOIN [sys].[columns] c
ON t.object_id= c.object_id
INNER JOIN [sys].[systypes] st
ON c.system_type_id= st.xusertype
INNER JOIN [sys].[objects] o
ON t.object_id= o.object_id
LEFT JOIN [sys].[extended_properties] ep
ON o.object_id = ep.major_id
AND c.column_Id = ep.minor_id
WHERE t.name <> 'sysdiagrams'
ORDER BY
t.name,
c.column_Id
10
Conclusión.
Referencias
🔗 Link