Está en la página 1de 44

Sybase PowerDesigner

Physical Data Model Report

Model: PhysicalDataModel_1
Report: Diccionario de Datos

Author: USUARIO
Version:
Date: 25-Feb-20
Summary:
Physical Data Model PhysicalDataModel_1 Report Diccionario de Datos

Table of Contents

The 'Table of Contents' field needs to be updated!

Sybase PowerDesigner 25-Feb-20 Page 2 of 44


Physical Data Model PhysicalDataModel_1

I Specifications
Include specifications here...

II

PowerDesigner 25-Feb-20 Page 3


Physical Data Model PhysicalDataModel_1

III Model information


III.1Card of model PhysicalDataModel_1
Name PhysicalDataModel_1
Code PHYSICALDATAMODEL_1
Comment
DBMS Sybase SQL Anywhere 12
Database <None>

IV

PowerDesigner 25-Feb-20 Page 4


Physical Data Model PhysicalDataModel_1

V PDM Diagrams
V.1Model level diagrams
V.1.1 Diagram PhysicalDiagram_1
PROVEEDOR
multimedia id_proveedor integer <pk>
id_multimedia integer <pk> nombre_proveedor varchar(200)
nombre_multimedia varchar(150) ruc varchar(11)
tipo_mutimedia varchar(100) direccion varchar(250)
tipo varchar(50)

PRODUCTO
id_producto integer <pk>
nombre_producto varchar(150)
id_categoria integer <fk1>
id_multimedia integer <fk2> USUARIO
precio_compra numeric(20,2) id_usuario integer <pk>
precio_venta numeric(20,2) nombre_usuario varchar(60)
id_proveedor integer <fk3> user_name varchar(80)
id_usuario integer <fk4> password varchar(80)
nivel_usuario integer <fk>
estado_usuario smallint

CATEGORIA GRUPO_USUARIO
id_categoria integer <pk> nivel_usuario integer <pk>
nombre_categoria varchar(50) nombre_grupo varchar(100)
estado_grupo smallint

VI

PowerDesigner 25-Feb-20 Page 5


Physical Data Model PhysicalDataModel_1

VII Physical diagrams objects


VII.1 References
VII.1.1 Model level references

VII.1.1.1 List of references


Name Code Parent Table Child Table
Reference_1 REFERENCE_1 CATEGORIA PRODUCTO
Reference_2 REFERENCE_2 multimedia PRODUCTO
Reference_3 REFERENCE_3 PROVEEDOR PRODUCTO
Reference_4 REFERENCE_4 USUARIO PRODUCTO
Reference_5 REFERENCE_5 GRUPO_USUARIO USUARIO

VII.1.1.2 Reference Reference_1


VII.1.1.2.1 Card of reference Reference_1
Name Reference_1
Code REFERENCE_1
Parent Table CATEGORIA
Child Table PRODUCTO

VII.1.1.2.2 Code preview of the reference Reference_1


if exists(select 1 from sys.sysforeignkey where role='FK_PRODUCTO_REFERENCE_CATEGORI') then
alter table PRODUCTO
delete foreign key FK_PRODUCTO_REFERENCE_CATEGORI
end if;

alter table PRODUCTO


add constraint FK_PRODUCTO_REFERENCE_CATEGORI foreign key (ID_CATEGORIA)
references CATEGORIA (ID_CATEGORIA)
on update restrict
on delete restrict;

VII.1.1.2.3 List of diagrams containing the reference Reference_1


Name Code
PhysicalDiagram_1 PHYSICALDIAGRAM_1

VII.1.1.2.4 List of reference joins of the reference Reference_1


Parent Table Column Child Table Column
id_categoria id_categoria

PowerDesigner 25-Feb-20 Page 6


Physical Data Model PhysicalDataModel_1

VII.1.1.3 Reference Reference_2


VII.1.1.3.1 Card of reference Reference_2
Name Reference_2
Code REFERENCE_2
Parent Table multimedia
Child Table PRODUCTO

VII.1.1.3.2 Code preview of the reference Reference_2


if exists(select 1 from sys.sysforeignkey where role='FK_PRODUCTO_REFERENCE_MULTIMED') then
alter table PRODUCTO
delete foreign key FK_PRODUCTO_REFERENCE_MULTIMED
end if;

alter table PRODUCTO


add constraint FK_PRODUCTO_REFERENCE_MULTIMED foreign key (ID_MULTIMEDIA)
references MULTIMEDIA (ID_MULTIMEDIA)
on update restrict
on delete restrict;

VII.1.1.3.3 List of diagrams containing the reference Reference_2


Name Code
PhysicalDiagram_1 PHYSICALDIAGRAM_1

VII.1.1.3.4 List of reference joins of the reference Reference_2


Parent Table Column Child Table Column
id_multimedia id_multimedia

VII.1.1.4 Reference Reference_3


VII.1.1.4.1 Card of reference Reference_3
Name Reference_3
Code REFERENCE_3
Parent Table PROVEEDOR
Child Table PRODUCTO

VII.1.1.4.2 Code preview of the reference Reference_3


if exists(select 1 from sys.sysforeignkey where role='FK_PRODUCTO_REFERENCE_PROVEEDO') then
alter table PRODUCTO
delete foreign key FK_PRODUCTO_REFERENCE_PROVEEDO
end if;

alter table PRODUCTO

PowerDesigner 25-Feb-20 Page 7


Physical Data Model PhysicalDataModel_1

add constraint FK_PRODUCTO_REFERENCE_PROVEEDO foreign key (ID_PROVEEDOR)


references PROVEEDOR (ID_PROVEEDOR)
on update restrict
on delete restrict;

VII.1.1.4.3 List of diagrams containing the reference Reference_3


Name Code
PhysicalDiagram_1 PHYSICALDIAGRAM_1

VII.1.1.4.4 List of reference joins of the reference Reference_3


Parent Table Column Child Table Column
id_proveedor id_proveedor

VII.1.1.5 Reference Reference_4


VII.1.1.5.1 Card of reference Reference_4
Name Reference_4
Code REFERENCE_4
Parent Table USUARIO
Child Table PRODUCTO

VII.1.1.5.2 Code preview of the reference Reference_4


if exists(select 1 from sys.sysforeignkey where role='FK_PRODUCTO_REFERENCE_USUARIO') then
alter table PRODUCTO
delete foreign key FK_PRODUCTO_REFERENCE_USUARIO
end if;

alter table PRODUCTO


add constraint FK_PRODUCTO_REFERENCE_USUARIO foreign key (ID_USUARIO)
references USUARIO (ID_USUARIO)
on update restrict
on delete restrict;

VII.1.1.5.3 List of diagrams containing the reference Reference_4


Name Code
PhysicalDiagram_1 PHYSICALDIAGRAM_1

VII.1.1.5.4 List of reference joins of the reference Reference_4


Parent Table Column Child Table Column
id_usuario id_usuario

PowerDesigner 25-Feb-20 Page 8


Physical Data Model PhysicalDataModel_1

VII.1.1.6 Reference Reference_5


VII.1.1.6.1 Card of reference Reference_5
Name Reference_5
Code REFERENCE_5
Parent Table GRUPO_USUARIO
Child Table USUARIO

VII.1.1.6.2 Code preview of the reference Reference_5


if exists(select 1 from sys.sysforeignkey where role='FK_USUARIO_REFERENCE_GRUPO_US') then
alter table USUARIO
delete foreign key FK_USUARIO_REFERENCE_GRUPO_US
end if;

alter table USUARIO


add constraint FK_USUARIO_REFERENCE_GRUPO_US foreign key (NIVEL_USUARIO)
references GRUPO_USUARIO (NIVEL_USUARIO)
on update restrict
on delete restrict;

VII.1.1.6.3 List of diagrams containing the reference Reference_5


Name Code
PhysicalDiagram_1 PHYSICALDIAGRAM_1

VII.1.1.6.4 List of reference joins of the reference Reference_5


Parent Table Column Child Table Column
nivel_usuario nivel_usuario

VII.2

PowerDesigner 25-Feb-20 Page 9


Physical Data Model PhysicalDataModel_1

VII.3 Tables
VII.3.1 Model level tables

VII.3.1.1 List of tables


Name Code
CATEGORIA CATEGORIA
GRUPO_USUARIO GRUPO_USUARIO
multimedia MULTIMEDIA
PRODUCTO PRODUCTO
PROVEEDOR PROVEEDOR
USUARIO USUARIO

VII.3.1.2 List of table columns


Name Code
id_producto ID_PRODUCTO
nombre_producto NOMBRE_PRODUCTO
id_categoria ID_CATEGORIA
id_multimedia ID_MULTIMEDIA
precio_compra PRECIO_COMPRA
precio_venta PRECIO_VENTA
id_proveedor ID_PROVEEDOR
id_usuario ID_USUARIO
id_categoria ID_CATEGORIA
nombre_categoria NOMBRE_CATEGORIA
id_multimedia ID_MULTIMEDIA
nombre_multimedia NOMBRE_MULTIMEDIA
tipo_mutimedia TIPO_MUTIMEDIA
id_proveedor ID_PROVEEDOR
nombre_proveedor NOMBRE_PROVEEDOR
ruc RUC
direccion DIRECCION
tipo TIPO
id_usuario ID_USUARIO
nombre_usuario NOMBRE_USUARIO
user_name USER_NAME
password PASSWORD
nivel_usuario NIVEL_USUARIO
estado_usuario ESTADO_USUARIO
nivel_usuario NIVEL_USUARIO
nombre_grupo NOMBRE_GRUPO
estado_grupo ESTADO_GRUPO

PowerDesigner 25-Feb-20 Page 10


Physical Data Model PhysicalDataModel_1

VII.3.1.3 List of table keys


Name Code Table
Key_1 KEY_1 PRODUCTO
Key_1 KEY_1 CATEGORIA
Key_1 KEY_1 multimedia
Key_1 KEY_1 PROVEEDOR
Key_1 KEY_1 USUARIO
Key_1 KEY_1 GRUPO_USUARIO

VII.3.1.4 Table CATEGORIA


VII.3.1.4.1 Card of table CATEGORIA
Name CATEGORIA
Code CATEGORIA
DBMS Sybase SQL Anywhere 12

VII.3.1.4.2 Check constraint name of the table CATEGORIA


CKT_CATEGORIA

VII.3.1.4.3 Server validation rule of the table CATEGORIA


%RULES%

VII.3.1.4.4 Code preview of the table CATEGORIA


drop table if exists CATEGORIA;

/*==============================================================*/
/* Table: CATEGORIA */
/*==============================================================*/
create table CATEGORIA
(
ID_CATEGORIA integer not null,
NOMBRE_CATEGORIA varchar(50) null,
constraint PK_CATEGORIA primary key clustered (ID_CATEGORIA)
);

VII.3.1.4.5 List of diagrams containing the table CATEGORIA


Name Code
PhysicalDiagram_1 PHYSICALDIAGRAM_1

VII.3.1.4.6 List of incoming references of the table CATEGORIA


Name Code
Reference_1 REFERENCE_1

PowerDesigner 25-Feb-20 Page 11


Physical Data Model PhysicalDataModel_1

VII.3.1.4.7 List of all dependencies of the table CATEGORIA


Name Code Class Name
Reference_1 REFERENCE_1 Reference

VII.3.1.4.8 List of extended attributes of the table CATEGORIA


Name Data Type Value Target Name
At (Physical Option) Sybase SQL Anywhere 12
DbspaceIn (Physical Option) Sybase SQL Anywhere 12
Encrypted (Physical Option) false Sybase SQL Anywhere 12
PctFree (Integer) Sybase SQL Anywhere 12
TemporaryTable (String) Sybase SQL Anywhere 12

VII.3.1.4.9 List of columns of the table CATEGORIA


Name Code
id_categoria ID_CATEGORIA
nombre_categoria NOMBRE_CATEGORIA

VII.3.1.4.10 Column id_categoria of the table CATEGORIA


VII.3.1.4.10.1 Card of the column id_categoria of the table CATEGORIA
Name id_categoria
Code ID_CATEGORIA
Data Type integer
Mandatory Yes

VII.3.1.4.10.2 Check constraint name of the column id_categoria of the table CATEGORIA
CKC_ID_CATEGORIA_CATEGORI

VII.3.1.4.10.3 Check of the column id_categoria of the table CATEGORIA


Minimum Value
Maximum Value
Default Value
Unit
Format
Cannot Modify No
List Of Values

VII.3.1.4.10.4 Server validation rule of the column id_categoria of the table CATEGORIA
%MINMAX% and %LISTVAL% and %CASE% and %RULES%

VII.3.1.4.10.5 List of all dependencies of the table column id_categoria

PowerDesigner 25-Feb-20 Page 12


Physical Data Model PhysicalDataModel_1

Name Code Class Name


? ? Reference Join
Key_1 KEY_1 Key

VII.3.1.4.10.6 List of extended attributes of the table column id_categoria


Name Data Type Value Target Name
Compressed (Boolean) false Sybase SQL Anywhere 12
DefaultExt (String) Sybase SQL Anywhere 12

VII.3.1.4.11 Column nombre_categoria of the table CATEGORIA


VII.3.1.4.11.1 Card of the column nombre_categoria of the table CATEGORIA
Name nombre_categoria
Code NOMBRE_CATEGORIA
Data Type varchar(50)
Mandatory No

VII.3.1.4.11.2 Check constraint name of the column nombre_categoria of the table CATEGORIA
CKC_NOMBRE_CATEGORIA_CATEGORI

VII.3.1.4.11.3 Check of the column nombre_categoria of the table CATEGORIA


Minimum Value
Maximum Value
Default Value
Unit
Format
Cannot Modify No
List Of Values

VII.3.1.4.11.4 Server validation rule of the column nombre_categoria of the table CATEGORIA
%MINMAX% and %LISTVAL% and %CASE% and %RULES%

VII.3.1.4.11.5 List of extended attributes of the table column nombre_categoria


Name Data Type Value Target Name
Compressed (Boolean) false Sybase SQL Anywhere 12
DefaultExt (String) Sybase SQL Anywhere 12

VII.3.1.4.12 List of keys of the table CATEGORIA


Name Code Primary
Key_1 KEY_1 X

PowerDesigner 25-Feb-20 Page 13


Physical Data Model PhysicalDataModel_1

VII.3.1.4.13 Key Key_1 of the table CATEGORIA


VII.3.1.4.13.1 Card of the key Key_1 of the table CATEGORIA
Name Key_1
Code KEY_1
Table CATEGORIA

VII.3.1.4.13.2 Code preview of the key Key_1 of the table CATEGORIA


if exists(
select 1 from sys.sysconstraint k
join sys.systab t on (t.object_id = k.table_object_id and t.table_name='CATEGORIA')
where
k.constraint_type = 'P'
) then
alter table CATEGORIA
delete primary key
end if;

VII.3.1.4.13.3 List of columns of the table key Key_1


Name Code
id_categoria ID_CATEGORIA

VII.3.1.4.13.4 List of all dependencies of the table key Key_1


Name Code Class Name
Reference_1 REFERENCE_1 Reference

VII.3.1.5 Table GRUPO_USUARIO


VII.3.1.5.1 Card of table GRUPO_USUARIO
Name GRUPO_USUARIO
Code GRUPO_USUARIO
DBMS Sybase SQL Anywhere 12

VII.3.1.5.2 Check constraint name of the table GRUPO_USUARIO


CKT_GRUPO_USUARIO

VII.3.1.5.3 Server validation rule of the table GRUPO_USUARIO


%RULES%

VII.3.1.5.4 Code preview of the table GRUPO_USUARIO


drop table if exists GRUPO_USUARIO;

/*==============================================================*/

PowerDesigner 25-Feb-20 Page 14


Physical Data Model PhysicalDataModel_1

/* Table: GRUPO_USUARIO */
/*==============================================================*/
create table GRUPO_USUARIO
(
NIVEL_USUARIO integer not null,
NOMBRE_GRUPO varchar(100) null,
ESTADO_GRUPO smallint null,
constraint PK_GRUPO_USUARIO primary key clustered (NIVEL_USUARIO)
);

VII.3.1.5.5 List of diagrams containing the table GRUPO_USUARIO


Name Code
PhysicalDiagram_1 PHYSICALDIAGRAM_1

VII.3.1.5.6 List of incoming references of the table GRUPO_USUARIO


Name Code
Reference_5 REFERENCE_5

VII.3.1.5.7 List of all dependencies of the table GRUPO_USUARIO


Name Code Class Name
Reference_5 REFERENCE_5 Reference

VII.3.1.5.8 List of extended attributes of the table GRUPO_USUARIO


Name Data Type Value Target Name
At (Physical Option) Sybase SQL Anywhere 12
DbspaceIn (Physical Option) Sybase SQL Anywhere 12
Encrypted (Physical Option) false Sybase SQL Anywhere 12
PctFree (Integer) Sybase SQL Anywhere 12
TemporaryTable (String) Sybase SQL Anywhere 12

VII.3.1.5.9 List of columns of the table GRUPO_USUARIO


Name Code
nivel_usuario NIVEL_USUARIO
nombre_grupo NOMBRE_GRUPO
estado_grupo ESTADO_GRUPO

VII.3.1.5.10 Column nivel_usuario of the table GRUPO_USUARIO


VII.3.1.5.10.1 Card of the column nivel_usuario of the table GRUPO_USUARIO
Name nivel_usuario
Code NIVEL_USUARIO

PowerDesigner 25-Feb-20 Page 15


Physical Data Model PhysicalDataModel_1

Data Type integer


Mandatory Yes

VII.3.1.5.10.2 Check constraint name of the column nivel_usuario of the table GRUPO_USUARIO
CKC_NIVEL_USUARIO_GRUPO_US

VII.3.1.5.10.3 Check of the column nivel_usuario of the table GRUPO_USUARIO


Minimum Value
Maximum Value
Default Value
Unit
Format
Cannot Modify No
List Of Values

VII.3.1.5.10.4 Server validation rule of the column nivel_usuario of the table GRUPO_USUARIO
%MINMAX% and %LISTVAL% and %CASE% and %RULES%

VII.3.1.5.10.5 List of all dependencies of the table column nivel_usuario


Name Code Class Name
Key_1 KEY_1 Key
? ? Reference Join

VII.3.1.5.10.6 List of extended attributes of the table column nivel_usuario


Name Data Type Value Target Name
Compressed (Boolean) false Sybase SQL Anywhere 12
DefaultExt (String) Sybase SQL Anywhere 12

VII.3.1.5.11 Column nombre_grupo of the table GRUPO_USUARIO


VII.3.1.5.11.1 Card of the column nombre_grupo of the table GRUPO_USUARIO
Name nombre_grupo
Code NOMBRE_GRUPO
Data Type varchar(100)
Mandatory No

VII.3.1.5.11.2 Check constraint name of the column nombre_grupo of the table GRUPO_USUARIO
CKC_NOMBRE_GRUPO_GRUPO_US

VII.3.1.5.11.3 Check of the column nombre_grupo of the table GRUPO_USUARIO


Minimum Value
Maximum Value

PowerDesigner 25-Feb-20 Page 16


Physical Data Model PhysicalDataModel_1

Default Value
Unit
Format
Cannot Modify No
List Of Values

VII.3.1.5.11.4 Server validation rule of the column nombre_grupo of the table GRUPO_USUARIO
%MINMAX% and %LISTVAL% and %CASE% and %RULES%

VII.3.1.5.11.5 List of extended attributes of the table column nombre_grupo


Name Data Type Value Target Name
Compressed (Boolean) false Sybase SQL Anywhere 12
DefaultExt (String) Sybase SQL Anywhere 12

VII.3.1.5.12 Column estado_grupo of the table GRUPO_USUARIO


VII.3.1.5.12.1 Card of the column estado_grupo of the table GRUPO_USUARIO
Name estado_grupo
Code ESTADO_GRUPO
Data Type smallint
Mandatory No

VII.3.1.5.12.2 Check constraint name of the column estado_grupo of the table GRUPO_USUARIO
CKC_ESTADO_GRUPO_GRUPO_US

VII.3.1.5.12.3 Check of the column estado_grupo of the table GRUPO_USUARIO


Minimum Value
Maximum Value
Default Value
Unit
Format
Cannot Modify No
List Of Values

VII.3.1.5.12.4 Server validation rule of the column estado_grupo of the table GRUPO_USUARIO
%MINMAX% and %LISTVAL% and %CASE% and %RULES%

VII.3.1.5.12.5 List of extended attributes of the table column estado_grupo


Name Data Type Value Target Name
Compressed (Boolean) false Sybase SQL Anywhere 12
DefaultExt (String) Sybase SQL Anywhere 12

PowerDesigner 25-Feb-20 Page 17


Physical Data Model PhysicalDataModel_1

VII.3.1.5.13 List of keys of the table GRUPO_USUARIO


Name Code Primary
Key_1 KEY_1 X

VII.3.1.5.14 Key Key_1 of the table GRUPO_USUARIO


VII.3.1.5.14.1 Card of the key Key_1 of the table GRUPO_USUARIO
Name Key_1
Code KEY_1
Table GRUPO_USUARIO

VII.3.1.5.14.2 Code preview of the key Key_1 of the table GRUPO_USUARIO


if exists(
select 1 from sys.sysconstraint k
join sys.systab t on (t.object_id = k.table_object_id and t.table_name='GRUPO_USUARIO')
where
k.constraint_type = 'P'
) then
alter table GRUPO_USUARIO
delete primary key
end if;

VII.3.1.5.14.3 List of columns of the table key Key_1


Name Code
nivel_usuario NIVEL_USUARIO

VII.3.1.5.14.4 List of all dependencies of the table key Key_1


Name Code Class Name
Reference_5 REFERENCE_5 Reference

VII.3.1.6 Table multimedia


VII.3.1.6.1 Card of table multimedia
Name multimedia
Code MULTIMEDIA
DBMS Sybase SQL Anywhere 12

VII.3.1.6.2 Check constraint name of the table multimedia


CKT_MULTIMEDIA

VII.3.1.6.3 Server validation rule of the table multimedia


%RULES%

PowerDesigner 25-Feb-20 Page 18


Physical Data Model PhysicalDataModel_1

VII.3.1.6.4 Code preview of the table multimedia


drop table if exists MULTIMEDIA;

/*==============================================================*/
/* Table: MULTIMEDIA */
/*==============================================================*/
create table MULTIMEDIA
(
ID_MULTIMEDIA integer not null,
NOMBRE_MULTIMEDIA varchar(150) null,
TIPO_MUTIMEDIA varchar(100) null,
constraint PK_MULTIMEDIA primary key clustered (ID_MULTIMEDIA)
);

VII.3.1.6.5 List of diagrams containing the table multimedia


Name Code
PhysicalDiagram_1 PHYSICALDIAGRAM_1

VII.3.1.6.6 List of incoming references of the table multimedia


Name Code
Reference_2 REFERENCE_2

VII.3.1.6.7 List of all dependencies of the table multimedia


Name Code Class Name
Reference_2 REFERENCE_2 Reference

VII.3.1.6.8 List of extended attributes of the table multimedia


Name Data Type Value Target Name
At (Physical Option) Sybase SQL Anywhere 12
DbspaceIn (Physical Option) Sybase SQL Anywhere 12
Encrypted (Physical Option) false Sybase SQL Anywhere 12
PctFree (Integer) Sybase SQL Anywhere 12
TemporaryTable (String) Sybase SQL Anywhere 12

VII.3.1.6.9 List of columns of the table multimedia


Name Code
id_multimedia ID_MULTIMEDIA
nombre_multimedia NOMBRE_MULTIMEDIA
tipo_mutimedia TIPO_MUTIMEDIA

VII.3.1.6.10 Column id_multimedia of the table multimedia

PowerDesigner 25-Feb-20 Page 19


Physical Data Model PhysicalDataModel_1

VII.3.1.6.10.1 Card of the column id_multimedia of the table multimedia


Name id_multimedia
Code ID_MULTIMEDIA
Data Type integer
Mandatory Yes

VII.3.1.6.10.2 Check constraint name of the column id_multimedia of the table multimedia
CKC_ID_MULTIMEDIA_MULTIMED

VII.3.1.6.10.3 Check of the column id_multimedia of the table multimedia


Minimum Value
Maximum Value
Default Value
Unit
Format
Cannot Modify No
List Of Values

VII.3.1.6.10.4 Server validation rule of the column id_multimedia of the table multimedia
%MINMAX% and %LISTVAL% and %CASE% and %RULES%

VII.3.1.6.10.5 List of all dependencies of the table column id_multimedia


Name Code Class Name
? ? Reference Join
Key_1 KEY_1 Key

VII.3.1.6.10.6 List of extended attributes of the table column id_multimedia


Name Data Type Value Target Name
Compressed (Boolean) false Sybase SQL Anywhere 12
DefaultExt (String) Sybase SQL Anywhere 12

VII.3.1.6.11 Column nombre_multimedia of the table multimedia


VII.3.1.6.11.1 Card of the column nombre_multimedia of the table multimedia
Name nombre_multimedia
Code NOMBRE_MULTIMEDIA
Data Type varchar(150)
Mandatory No

VII.3.1.6.11.2 Check constraint name of the column nombre_multimedia of the table multimedia
CKC_NOMBRE_MULTIMEDIA_MULTIMED

PowerDesigner 25-Feb-20 Page 20


Physical Data Model PhysicalDataModel_1

VII.3.1.6.11.3 Check of the column nombre_multimedia of the table multimedia


Minimum Value
Maximum Value
Default Value
Unit
Format
Cannot Modify No
List Of Values

VII.3.1.6.11.4 Server validation rule of the column nombre_multimedia of the table multimedia
%MINMAX% and %LISTVAL% and %CASE% and %RULES%

VII.3.1.6.11.5 List of extended attributes of the table column nombre_multimedia


Name Data Type Value Target Name
Compressed (Boolean) false Sybase SQL Anywhere 12
DefaultExt (String) Sybase SQL Anywhere 12

VII.3.1.6.12 Column tipo_mutimedia of the table multimedia


VII.3.1.6.12.1 Card of the column tipo_mutimedia of the table multimedia
Name tipo_mutimedia
Code TIPO_MUTIMEDIA
Data Type varchar(100)
Mandatory No

VII.3.1.6.12.2 Check constraint name of the column tipo_mutimedia of the table multimedia
CKC_TIPO_MUTIMEDIA_MULTIMED

VII.3.1.6.12.3 Check of the column tipo_mutimedia of the table multimedia


Minimum Value
Maximum Value
Default Value
Unit
Format
Cannot Modify No
List Of Values

VII.3.1.6.12.4 Server validation rule of the column tipo_mutimedia of the table multimedia
%MINMAX% and %LISTVAL% and %CASE% and %RULES%

VII.3.1.6.12.5 List of extended attributes of the table column tipo_mutimedia


Name Data Type Value Target Name

PowerDesigner 25-Feb-20 Page 21


Physical Data Model PhysicalDataModel_1

Compressed (Boolean) false Sybase SQL Anywhere 12


DefaultExt (String) Sybase SQL Anywhere 12

VII.3.1.6.13 List of keys of the table multimedia


Name Code Primary
Key_1 KEY_1 X

VII.3.1.6.14 Key Key_1 of the table multimedia


VII.3.1.6.14.1 Card of the key Key_1 of the table multimedia
Name Key_1
Code KEY_1
Table multimedia

VII.3.1.6.14.2 Code preview of the key Key_1 of the table multimedia


if exists(
select 1 from sys.sysconstraint k
join sys.systab t on (t.object_id = k.table_object_id and t.table_name='MULTIMEDIA')
where
k.constraint_type = 'P'
) then
alter table MULTIMEDIA
delete primary key
end if;

VII.3.1.6.14.3 List of columns of the table key Key_1


Name Code
id_multimedia ID_MULTIMEDIA

VII.3.1.6.14.4 List of all dependencies of the table key Key_1


Name Code Class Name
Reference_2 REFERENCE_2 Reference

VII.3.1.7 Table PRODUCTO


VII.3.1.7.1 Card of table PRODUCTO
Name PRODUCTO
Code PRODUCTO
DBMS Sybase SQL Anywhere 12

VII.3.1.7.2 Check constraint name of the table PRODUCTO

PowerDesigner 25-Feb-20 Page 22


Physical Data Model PhysicalDataModel_1

CKT_PRODUCTO

VII.3.1.7.3 Server validation rule of the table PRODUCTO


%RULES%

VII.3.1.7.4 Code preview of the table PRODUCTO


if exists(select 1 from sys.sysforeignkey where role='FK_PRODUCTO_REFERENCE_CATEGORI') then
alter table PRODUCTO
delete foreign key FK_PRODUCTO_REFERENCE_CATEGORI
end if;

if exists(select 1 from sys.sysforeignkey where role='FK_PRODUCTO_REFERENCE_MULTIMED') then


alter table PRODUCTO
delete foreign key FK_PRODUCTO_REFERENCE_MULTIMED
end if;

if exists(select 1 from sys.sysforeignkey where role='FK_PRODUCTO_REFERENCE_PROVEEDO') then


alter table PRODUCTO
delete foreign key FK_PRODUCTO_REFERENCE_PROVEEDO
end if;

if exists(select 1 from sys.sysforeignkey where role='FK_PRODUCTO_REFERENCE_USUARIO') then


alter table PRODUCTO
delete foreign key FK_PRODUCTO_REFERENCE_USUARIO
end if;

drop table if exists PRODUCTO;

/*==============================================================*/
/* Table: PRODUCTO */
/*==============================================================*/
create table PRODUCTO
(
ID_PRODUCTO integer not null,
NOMBRE_PRODUCTO varchar(150) null,
ID_CATEGORIA integer null,
ID_MULTIMEDIA integer null,
PRECIO_COMPRA numeric(20,2) null,
PRECIO_VENTA numeric(20,2) null,
ID_PROVEEDOR integer null,
ID_USUARIO integer null,
constraint PK_PRODUCTO primary key clustered (ID_PRODUCTO)
);

alter table PRODUCTO


add constraint FK_PRODUCTO_REFERENCE_CATEGORI foreign key (ID_CATEGORIA)
references CATEGORIA (ID_CATEGORIA)
on update restrict
on delete restrict;

alter table PRODUCTO


add constraint FK_PRODUCTO_REFERENCE_MULTIMED foreign key (ID_MULTIMEDIA)
references MULTIMEDIA (ID_MULTIMEDIA)
on update restrict
on delete restrict;

PowerDesigner 25-Feb-20 Page 23


Physical Data Model PhysicalDataModel_1

alter table PRODUCTO


add constraint FK_PRODUCTO_REFERENCE_PROVEEDO foreign key (ID_PROVEEDOR)
references PROVEEDOR (ID_PROVEEDOR)
on update restrict
on delete restrict;

alter table PRODUCTO


add constraint FK_PRODUCTO_REFERENCE_USUARIO foreign key (ID_USUARIO)
references USUARIO (ID_USUARIO)
on update restrict
on delete restrict;

VII.3.1.7.5 List of diagrams containing the table PRODUCTO


Name Code
PhysicalDiagram_1 PHYSICALDIAGRAM_1

VII.3.1.7.6 List of outgoing references of the table PRODUCTO


Name Code Foreign Key Columns
Reference_1 REFERENCE_1 id_categoria
Reference_2 REFERENCE_2 id_multimedia
Reference_3 REFERENCE_3 id_proveedor
Reference_4 REFERENCE_4 id_usuario

VII.3.1.7.7 List of all dependencies of the table PRODUCTO


Name Code Class Name
Reference_1 REFERENCE_1 Reference
Reference_2 REFERENCE_2 Reference
Reference_3 REFERENCE_3 Reference
Reference_4 REFERENCE_4 Reference

VII.3.1.7.8 List of extended attributes of the table PRODUCTO


Name Data Type Value Target Name
At (Physical Option) Sybase SQL Anywhere 12
DbspaceIn (Physical Option) Sybase SQL Anywhere 12
Encrypted (Physical Option) false Sybase SQL Anywhere 12
PctFree (Integer) Sybase SQL Anywhere 12
TemporaryTable (String) Sybase SQL Anywhere 12

VII.3.1.7.9 List of columns of the table PRODUCTO


Name Code
id_producto ID_PRODUCTO
nombre_producto NOMBRE_PRODUCTO

PowerDesigner 25-Feb-20 Page 24


Physical Data Model PhysicalDataModel_1

id_categoria ID_CATEGORIA
id_multimedia ID_MULTIMEDIA
precio_compra PRECIO_COMPRA
precio_venta PRECIO_VENTA
id_proveedor ID_PROVEEDOR
id_usuario ID_USUARIO

VII.3.1.7.10 Column id_producto of the table PRODUCTO


VII.3.1.7.10.1 Card of the column id_producto of the table PRODUCTO
Name id_producto
Code ID_PRODUCTO
Data Type integer
Mandatory Yes

VII.3.1.7.10.2 Check constraint name of the column id_producto of the table PRODUCTO
CKC_ID_PRODUCTO_PRODUCTO

VII.3.1.7.10.3 Check of the column id_producto of the table PRODUCTO


Minimum Value
Maximum Value
Default Value
Unit
Format
Cannot Modify No
List Of Values

VII.3.1.7.10.4 Server validation rule of the column id_producto of the table PRODUCTO
%MINMAX% and %LISTVAL% and %CASE% and %RULES%

VII.3.1.7.10.5 List of all dependencies of the table column id_producto


Name Code Class Name
Key_1 KEY_1 Key

VII.3.1.7.10.6 List of extended attributes of the table column id_producto


Name Data Type Value Target Name
Compressed (Boolean) false Sybase SQL Anywhere 12
DefaultExt (String) Sybase SQL Anywhere 12

VII.3.1.7.11 Column nombre_producto of the table PRODUCTO


VII.3.1.7.11.1 Card of the column nombre_producto of the table PRODUCTO

PowerDesigner 25-Feb-20 Page 25


Physical Data Model PhysicalDataModel_1

Name nombre_producto
Code NOMBRE_PRODUCTO
Data Type varchar(150)
Mandatory No

VII.3.1.7.11.2 Check constraint name of the column nombre_producto of the table PRODUCTO
CKC_NOMBRE_PRODUCTO_PRODUCTO

VII.3.1.7.11.3 Check of the column nombre_producto of the table PRODUCTO


Minimum Value
Maximum Value
Default Value
Unit
Format
Cannot Modify No
List Of Values

VII.3.1.7.11.4 Server validation rule of the column nombre_producto of the table PRODUCTO
%MINMAX% and %LISTVAL% and %CASE% and %RULES%

VII.3.1.7.11.5 List of extended attributes of the table column nombre_producto


Name Data Type Value Target Name
Compressed (Boolean) false Sybase SQL Anywhere 12
DefaultExt (String) Sybase SQL Anywhere 12

VII.3.1.7.12 Column id_categoria of the table PRODUCTO


VII.3.1.7.12.1 Card of the column id_categoria of the table PRODUCTO
Name id_categoria
Code ID_CATEGORIA
Data Type integer
Mandatory No

VII.3.1.7.12.2 Check constraint name of the column id_categoria of the table PRODUCTO
CKC_ID_CATEGORIA_PRODUCTO

VII.3.1.7.12.3 Check of the column id_categoria of the table PRODUCTO


Minimum Value
Maximum Value
Default Value
Unit
Format

PowerDesigner 25-Feb-20 Page 26


Physical Data Model PhysicalDataModel_1

Cannot Modify No
List Of Values

VII.3.1.7.12.4 Server validation rule of the column id_categoria of the table PRODUCTO
%MINMAX% and %LISTVAL% and %CASE% and %RULES%

VII.3.1.7.12.5 List of all dependencies of the table column id_categoria


Name Code Class Name
? ? Reference Join

VII.3.1.7.12.6 List of extended attributes of the table column id_categoria


Name Data Type Value Target Name
Compressed (Boolean) false Sybase SQL Anywhere 12
DefaultExt (String) Sybase SQL Anywhere 12

VII.3.1.7.13 Column id_multimedia of the table PRODUCTO


VII.3.1.7.13.1 Card of the column id_multimedia of the table PRODUCTO
Name id_multimedia
Code ID_MULTIMEDIA
Data Type integer
Mandatory No

VII.3.1.7.13.2 Check constraint name of the column id_multimedia of the table PRODUCTO
CKC_ID_MULTIMEDIA_PRODUCTO

VII.3.1.7.13.3 Check of the column id_multimedia of the table PRODUCTO


Minimum Value
Maximum Value
Default Value
Unit
Format
Cannot Modify No
List Of Values

VII.3.1.7.13.4 Server validation rule of the column id_multimedia of the table PRODUCTO
%MINMAX% and %LISTVAL% and %CASE% and %RULES%

VII.3.1.7.13.5 List of all dependencies of the table column id_multimedia


Name Code Class Name
? ? Reference Join

PowerDesigner 25-Feb-20 Page 27


Physical Data Model PhysicalDataModel_1

VII.3.1.7.13.6 List of extended attributes of the table column id_multimedia


Name Data Type Value Target Name
Compressed (Boolean) false Sybase SQL Anywhere 12
DefaultExt (String) Sybase SQL Anywhere 12

VII.3.1.7.14 Column precio_compra of the table PRODUCTO


VII.3.1.7.14.1 Card of the column precio_compra of the table PRODUCTO
Name precio_compra
Code PRECIO_COMPRA
Data Type numeric(20,2)
Mandatory No

VII.3.1.7.14.2 Check constraint name of the column precio_compra of the table PRODUCTO
CKC_PRECIO_COMPRA_PRODUCTO

VII.3.1.7.14.3 Check of the column precio_compra of the table PRODUCTO


Minimum Value
Maximum Value
Default Value
Unit
Format
Cannot Modify No
List Of Values

VII.3.1.7.14.4 Server validation rule of the column precio_compra of the table PRODUCTO
%MINMAX% and %LISTVAL% and %CASE% and %RULES%

VII.3.1.7.14.5 List of extended attributes of the table column precio_compra


Name Data Type Value Target Name
Compressed (Boolean) false Sybase SQL Anywhere 12
DefaultExt (String) Sybase SQL Anywhere 12

VII.3.1.7.15 Column precio_venta of the table PRODUCTO


VII.3.1.7.15.1 Card of the column precio_venta of the table PRODUCTO
Name precio_venta
Code PRECIO_VENTA
Data Type numeric(20,2)
Mandatory No

VII.3.1.7.15.2 Check constraint name of the column precio_venta of the table PRODUCTO

PowerDesigner 25-Feb-20 Page 28


Physical Data Model PhysicalDataModel_1

CKC_PRECIO_VENTA_PRODUCTO

VII.3.1.7.15.3 Check of the column precio_venta of the table PRODUCTO


Minimum Value
Maximum Value
Default Value
Unit
Format
Cannot Modify No
List Of Values

VII.3.1.7.15.4 Server validation rule of the column precio_venta of the table PRODUCTO
%MINMAX% and %LISTVAL% and %CASE% and %RULES%

VII.3.1.7.15.5 List of extended attributes of the table column precio_venta


Name Data Type Value Target Name
Compressed (Boolean) false Sybase SQL Anywhere 12
DefaultExt (String) Sybase SQL Anywhere 12

VII.3.1.7.16 Column id_proveedor of the table PRODUCTO


VII.3.1.7.16.1 Card of the column id_proveedor of the table PRODUCTO
Name id_proveedor
Code ID_PROVEEDOR
Data Type integer
Mandatory No

VII.3.1.7.16.2 Check constraint name of the column id_proveedor of the table PRODUCTO
CKC_ID_PROVEEDOR_PRODUCTO

VII.3.1.7.16.3 Check of the column id_proveedor of the table PRODUCTO


Minimum Value
Maximum Value
Default Value
Unit
Format
Cannot Modify No
List Of Values

VII.3.1.7.16.4 Server validation rule of the column id_proveedor of the table PRODUCTO
%MINMAX% and %LISTVAL% and %CASE% and %RULES%

VII.3.1.7.16.5 List of all dependencies of the table column id_proveedor

PowerDesigner 25-Feb-20 Page 29


Physical Data Model PhysicalDataModel_1

Name Code Class Name


? ? Reference Join

VII.3.1.7.16.6 List of extended attributes of the table column id_proveedor


Name Data Type Value Target Name
Compressed (Boolean) false Sybase SQL Anywhere 12
DefaultExt (String) Sybase SQL Anywhere 12

VII.3.1.7.17 Column id_usuario of the table PRODUCTO


VII.3.1.7.17.1 Card of the column id_usuario of the table PRODUCTO
Name id_usuario
Code ID_USUARIO
Data Type integer
Mandatory No

VII.3.1.7.17.2 Check constraint name of the column id_usuario of the table PRODUCTO
CKC_ID_USUARIO_PRODUCTO

VII.3.1.7.17.3 Check of the column id_usuario of the table PRODUCTO


Minimum Value
Maximum Value
Default Value
Unit
Format
Cannot Modify No
List Of Values

VII.3.1.7.17.4 Server validation rule of the column id_usuario of the table PRODUCTO
%MINMAX% and %LISTVAL% and %CASE% and %RULES%

VII.3.1.7.17.5 List of all dependencies of the table column id_usuario


Name Code Class Name
? ? Reference Join

VII.3.1.7.17.6 List of extended attributes of the table column id_usuario


Name Data Type Value Target Name
Compressed (Boolean) false Sybase SQL Anywhere 12
DefaultExt (String) Sybase SQL Anywhere 12

VII.3.1.7.18 List of keys of the table PRODUCTO

PowerDesigner 25-Feb-20 Page 30


Physical Data Model PhysicalDataModel_1

Name Code Primary


Key_1 KEY_1 X

VII.3.1.7.19 Key Key_1 of the table PRODUCTO


VII.3.1.7.19.1 Card of the key Key_1 of the table PRODUCTO
Name Key_1
Code KEY_1
Table PRODUCTO

VII.3.1.7.19.2 Code preview of the key Key_1 of the table PRODUCTO


if exists(
select 1 from sys.sysconstraint k
join sys.systab t on (t.object_id = k.table_object_id and t.table_name='PRODUCTO')
where
k.constraint_type = 'P'
) then
alter table PRODUCTO
delete primary key
end if;

VII.3.1.7.19.3 List of columns of the table key Key_1


Name Code
id_producto ID_PRODUCTO

VII.3.1.8 Table PROVEEDOR


VII.3.1.8.1 Card of table PROVEEDOR
Name PROVEEDOR
Code PROVEEDOR
DBMS Sybase SQL Anywhere 12

VII.3.1.8.2 Check constraint name of the table PROVEEDOR


CKT_PROVEEDOR

VII.3.1.8.3 Server validation rule of the table PROVEEDOR


%RULES%

VII.3.1.8.4 Code preview of the table PROVEEDOR


drop table if exists PROVEEDOR;

/*==============================================================*/
/* Table: PROVEEDOR */
/*==============================================================*/

PowerDesigner 25-Feb-20 Page 31


Physical Data Model PhysicalDataModel_1

create table PROVEEDOR


(
ID_PROVEEDOR integer not null,
NOMBRE_PROVEEDOR varchar(200) null,
RUC varchar(11) null,
DIRECCION varchar(250) null,
TIPO varchar(50) null,
constraint PK_PROVEEDOR primary key clustered (ID_PROVEEDOR)
);

VII.3.1.8.5 List of diagrams containing the table PROVEEDOR


Name Code
PhysicalDiagram_1 PHYSICALDIAGRAM_1

VII.3.1.8.6 List of incoming references of the table PROVEEDOR


Name Code
Reference_3 REFERENCE_3

VII.3.1.8.7 List of all dependencies of the table PROVEEDOR


Name Code Class Name
Reference_3 REFERENCE_3 Reference

VII.3.1.8.8 List of extended attributes of the table PROVEEDOR


Name Data Type Value Target Name
At (Physical Option) Sybase SQL Anywhere 12
DbspaceIn (Physical Option) Sybase SQL Anywhere 12
Encrypted (Physical Option) false Sybase SQL Anywhere 12
PctFree (Integer) Sybase SQL Anywhere 12
TemporaryTable (String) Sybase SQL Anywhere 12

VII.3.1.8.9 List of columns of the table PROVEEDOR


Name Code
id_proveedor ID_PROVEEDOR
nombre_proveedor NOMBRE_PROVEEDOR
ruc RUC
direccion DIRECCION
tipo TIPO

VII.3.1.8.10 Column id_proveedor of the table PROVEEDOR


VII.3.1.8.10.1 Card of the column id_proveedor of the table PROVEEDOR

PowerDesigner 25-Feb-20 Page 32


Physical Data Model PhysicalDataModel_1

Name id_proveedor
Code ID_PROVEEDOR
Data Type integer
Mandatory Yes

VII.3.1.8.10.2 Check constraint name of the column id_proveedor of the table PROVEEDOR
CKC_ID_PROVEEDOR_PROVEEDO

VII.3.1.8.10.3 Check of the column id_proveedor of the table PROVEEDOR


Minimum Value
Maximum Value
Default Value
Unit
Format
Cannot Modify No
List Of Values

VII.3.1.8.10.4 Server validation rule of the column id_proveedor of the table PROVEEDOR
%MINMAX% and %LISTVAL% and %CASE% and %RULES%

VII.3.1.8.10.5 List of all dependencies of the table column id_proveedor


Name Code Class Name
? ? Reference Join
Key_1 KEY_1 Key

VII.3.1.8.10.6 List of extended attributes of the table column id_proveedor


Name Data Type Value Target Name
Compressed (Boolean) false Sybase SQL Anywhere 12
DefaultExt (String) Sybase SQL Anywhere 12

VII.3.1.8.11 Column nombre_proveedor of the table PROVEEDOR


VII.3.1.8.11.1 Card of the column nombre_proveedor of the table PROVEEDOR
Name nombre_proveedor
Code NOMBRE_PROVEEDOR
Data Type varchar(200)
Mandatory No

VII.3.1.8.11.2 Check constraint name of the column nombre_proveedor of the table PROVEEDOR
CKC_NOMBRE_PROVEEDOR_PROVEEDO

VII.3.1.8.11.3 Check of the column nombre_proveedor of the table PROVEEDOR

PowerDesigner 25-Feb-20 Page 33


Physical Data Model PhysicalDataModel_1

Minimum Value
Maximum Value
Default Value
Unit
Format
Cannot Modify No
List Of Values

VII.3.1.8.11.4 Server validation rule of the column nombre_proveedor of the table PROVEEDOR
%MINMAX% and %LISTVAL% and %CASE% and %RULES%

VII.3.1.8.11.5 List of extended attributes of the table column nombre_proveedor


Name Data Type Value Target Name
Compressed (Boolean) false Sybase SQL Anywhere 12
DefaultExt (String) Sybase SQL Anywhere 12

VII.3.1.8.12 Column ruc of the table PROVEEDOR


VII.3.1.8.12.1 Card of the column ruc of the table PROVEEDOR
Name ruc
Code RUC
Data Type varchar(11)
Mandatory No

VII.3.1.8.12.2 Check constraint name of the column ruc of the table PROVEEDOR
CKC_RUC_PROVEEDO

VII.3.1.8.12.3 Check of the column ruc of the table PROVEEDOR


Minimum Value
Maximum Value
Default Value
Unit
Format
Cannot Modify No
List Of Values

VII.3.1.8.12.4 Server validation rule of the column ruc of the table PROVEEDOR
%MINMAX% and %LISTVAL% and %CASE% and %RULES%

VII.3.1.8.12.5 List of extended attributes of the table column ruc


Name Data Type Value Target Name
Compressed (Boolean) false Sybase SQL Anywhere 12

PowerDesigner 25-Feb-20 Page 34


Physical Data Model PhysicalDataModel_1

DefaultExt (String) Sybase SQL Anywhere 12

VII.3.1.8.13 Column direccion of the table PROVEEDOR


VII.3.1.8.13.1 Card of the column direccion of the table PROVEEDOR
Name direccion
Code DIRECCION
Data Type varchar(250)
Mandatory No

VII.3.1.8.13.2 Check constraint name of the column direccion of the table PROVEEDOR
CKC_DIRECCION_PROVEEDO

VII.3.1.8.13.3 Check of the column direccion of the table PROVEEDOR


Minimum Value
Maximum Value
Default Value
Unit
Format
Cannot Modify No
List Of Values

VII.3.1.8.13.4 Server validation rule of the column direccion of the table PROVEEDOR
%MINMAX% and %LISTVAL% and %CASE% and %RULES%

VII.3.1.8.13.5 List of extended attributes of the table column direccion


Name Data Type Value Target Name
Compressed (Boolean) false Sybase SQL Anywhere 12
DefaultExt (String) Sybase SQL Anywhere 12

VII.3.1.8.14 Column tipo of the table PROVEEDOR


VII.3.1.8.14.1 Card of the column tipo of the table PROVEEDOR
Name tipo
Code TIPO
Data Type varchar(50)
Mandatory No

VII.3.1.8.14.2 Check constraint name of the column tipo of the table PROVEEDOR
CKC_TIPO_PROVEEDO

VII.3.1.8.14.3 Check of the column tipo of the table PROVEEDOR

PowerDesigner 25-Feb-20 Page 35


Physical Data Model PhysicalDataModel_1

Minimum Value
Maximum Value
Default Value
Unit
Format
Cannot Modify No
List Of Values

VII.3.1.8.14.4 Server validation rule of the column tipo of the table PROVEEDOR
%MINMAX% and %LISTVAL% and %CASE% and %RULES%

VII.3.1.8.14.5 List of extended attributes of the table column tipo


Name Data Type Value Target Name
Compressed (Boolean) false Sybase SQL Anywhere 12
DefaultExt (String) Sybase SQL Anywhere 12

VII.3.1.8.15 List of keys of the table PROVEEDOR


Name Code Primary
Key_1 KEY_1 X

VII.3.1.8.16 Key Key_1 of the table PROVEEDOR


VII.3.1.8.16.1 Card of the key Key_1 of the table PROVEEDOR
Name Key_1
Code KEY_1
Table PROVEEDOR

VII.3.1.8.16.2 Code preview of the key Key_1 of the table PROVEEDOR


if exists(
select 1 from sys.sysconstraint k
join sys.systab t on (t.object_id = k.table_object_id and t.table_name='PROVEEDOR')
where
k.constraint_type = 'P'
) then
alter table PROVEEDOR
delete primary key
end if;

VII.3.1.8.16.3 List of columns of the table key Key_1


Name Code
id_proveedor ID_PROVEEDOR

PowerDesigner 25-Feb-20 Page 36


Physical Data Model PhysicalDataModel_1

VII.3.1.8.16.4 List of all dependencies of the table key Key_1


Name Code Class Name
Reference_3 REFERENCE_3 Reference

VII.3.1.9 Table USUARIO


VII.3.1.9.1 Card of table USUARIO
Name USUARIO
Code USUARIO
DBMS Sybase SQL Anywhere 12

VII.3.1.9.2 Check constraint name of the table USUARIO


CKT_USUARIO

VII.3.1.9.3 Server validation rule of the table USUARIO


%RULES%

VII.3.1.9.4 Code preview of the table USUARIO


if exists(select 1 from sys.sysforeignkey where role='FK_USUARIO_REFERENCE_GRUPO_US') then
alter table USUARIO
delete foreign key FK_USUARIO_REFERENCE_GRUPO_US
end if;

drop table if exists USUARIO;

/*==============================================================*/
/* Table: USUARIO */
/*==============================================================*/
create table USUARIO
(
ID_USUARIO integer not null,
NOMBRE_USUARIO varchar(60) null,
USER_NAME varchar(80) null,
PASSWORD varchar(80) null,
NIVEL_USUARIO integer null,
ESTADO_USUARIO smallint null,
constraint PK_USUARIO primary key clustered (ID_USUARIO)
);

alter table USUARIO


add constraint FK_USUARIO_REFERENCE_GRUPO_US foreign key (NIVEL_USUARIO)
references GRUPO_USUARIO (NIVEL_USUARIO)
on update restrict
on delete restrict;

VII.3.1.9.5 List of diagrams containing the table USUARIO


Name Code

PowerDesigner 25-Feb-20 Page 37


Physical Data Model PhysicalDataModel_1

PhysicalDiagram_1 PHYSICALDIAGRAM_1

VII.3.1.9.6 List of incoming references of the table USUARIO


Name Code
Reference_4 REFERENCE_4

VII.3.1.9.7 List of outgoing references of the table USUARIO


Name Code Foreign Key Columns
Reference_5 REFERENCE_5 nivel_usuario

VII.3.1.9.8 List of all dependencies of the table USUARIO


Name Code Class Name
Reference_4 REFERENCE_4 Reference
Reference_5 REFERENCE_5 Reference

VII.3.1.9.9 List of extended attributes of the table USUARIO


Name Data Type Value Target Name
At (Physical Option) Sybase SQL Anywhere 12
DbspaceIn (Physical Option) Sybase SQL Anywhere 12
Encrypted (Physical Option) false Sybase SQL Anywhere 12
PctFree (Integer) Sybase SQL Anywhere 12
TemporaryTable (String) Sybase SQL Anywhere 12

VII.3.1.9.10 List of columns of the table USUARIO


Name Code
id_usuario ID_USUARIO
nombre_usuario NOMBRE_USUARIO
user_name USER_NAME
password PASSWORD
nivel_usuario NIVEL_USUARIO
estado_usuario ESTADO_USUARIO

VII.3.1.9.11 Column id_usuario of the table USUARIO


VII.3.1.9.11.1 Card of the column id_usuario of the table USUARIO
Name id_usuario
Code ID_USUARIO
Data Type integer
Mandatory Yes

PowerDesigner 25-Feb-20 Page 38


Physical Data Model PhysicalDataModel_1

VII.3.1.9.11.2 Check constraint name of the column id_usuario of the table USUARIO
CKC_ID_USUARIO_USUARIO

VII.3.1.9.11.3 Check of the column id_usuario of the table USUARIO


Minimum Value
Maximum Value
Default Value
Unit
Format
Cannot Modify No
List Of Values

VII.3.1.9.11.4 Server validation rule of the column id_usuario of the table USUARIO
%MINMAX% and %LISTVAL% and %CASE% and %RULES%

VII.3.1.9.11.5 List of all dependencies of the table column id_usuario


Name Code Class Name
? ? Reference Join
Key_1 KEY_1 Key

VII.3.1.9.11.6 List of extended attributes of the table column id_usuario


Name Data Type Value Target Name
Compressed (Boolean) false Sybase SQL Anywhere 12
DefaultExt (String) Sybase SQL Anywhere 12

VII.3.1.9.12 Column nombre_usuario of the table USUARIO


VII.3.1.9.12.1 Card of the column nombre_usuario of the table USUARIO
Name nombre_usuario
Code NOMBRE_USUARIO
Data Type varchar(60)
Mandatory No

VII.3.1.9.12.2 Check constraint name of the column nombre_usuario of the table USUARIO
CKC_NOMBRE_USUARIO_USUARIO

VII.3.1.9.12.3 Check of the column nombre_usuario of the table USUARIO


Minimum Value
Maximum Value
Default Value
Unit
Format

PowerDesigner 25-Feb-20 Page 39


Physical Data Model PhysicalDataModel_1

Cannot Modify No
List Of Values

VII.3.1.9.12.4 Server validation rule of the column nombre_usuario of the table USUARIO
%MINMAX% and %LISTVAL% and %CASE% and %RULES%

VII.3.1.9.12.5 List of extended attributes of the table column nombre_usuario


Name Data Type Value Target Name
Compressed (Boolean) false Sybase SQL Anywhere 12
DefaultExt (String) Sybase SQL Anywhere 12

VII.3.1.9.13 Column user_name of the table USUARIO


VII.3.1.9.13.1 Card of the column user_name of the table USUARIO
Name user_name
Code USER_NAME
Data Type varchar(80)
Mandatory No

VII.3.1.9.13.2 Check constraint name of the column user_name of the table USUARIO
CKC_USER_NAME_USUARIO

VII.3.1.9.13.3 Check of the column user_name of the table USUARIO


Minimum Value
Maximum Value
Default Value
Unit
Format
Cannot Modify No
List Of Values

VII.3.1.9.13.4 Server validation rule of the column user_name of the table USUARIO
%MINMAX% and %LISTVAL% and %CASE% and %RULES%

VII.3.1.9.13.5 List of extended attributes of the table column user_name


Name Data Type Value Target Name
Compressed (Boolean) false Sybase SQL Anywhere 12
DefaultExt (String) Sybase SQL Anywhere 12

VII.3.1.9.14 Column password of the table USUARIO


VII.3.1.9.14.1 Card of the column password of the table USUARIO

PowerDesigner 25-Feb-20 Page 40


Physical Data Model PhysicalDataModel_1

Name password
Code PASSWORD
Data Type varchar(80)
Mandatory No

VII.3.1.9.14.2 Check constraint name of the column password of the table USUARIO
CKC_PASSWORD_USUARIO

VII.3.1.9.14.3 Check of the column password of the table USUARIO


Minimum Value
Maximum Value
Default Value
Unit
Format
Cannot Modify No
List Of Values

VII.3.1.9.14.4 Server validation rule of the column password of the table USUARIO
%MINMAX% and %LISTVAL% and %CASE% and %RULES%

VII.3.1.9.14.5 List of extended attributes of the table column password


Name Data Type Value Target Name
Compressed (Boolean) false Sybase SQL Anywhere 12
DefaultExt (String) Sybase SQL Anywhere 12

VII.3.1.9.15 Column nivel_usuario of the table USUARIO


VII.3.1.9.15.1 Card of the column nivel_usuario of the table USUARIO
Name nivel_usuario
Code NIVEL_USUARIO
Data Type integer
Mandatory No

VII.3.1.9.15.2 Check constraint name of the column nivel_usuario of the table USUARIO
CKC_NIVEL_USUARIO_USUARIO

VII.3.1.9.15.3 Check of the column nivel_usuario of the table USUARIO


Minimum Value
Maximum Value
Default Value
Unit
Format

PowerDesigner 25-Feb-20 Page 41


Physical Data Model PhysicalDataModel_1

Cannot Modify No
List Of Values

VII.3.1.9.15.4 Server validation rule of the column nivel_usuario of the table USUARIO
%MINMAX% and %LISTVAL% and %CASE% and %RULES%

VII.3.1.9.15.5 List of all dependencies of the table column nivel_usuario


Name Code Class Name
? ? Reference Join

VII.3.1.9.15.6 List of extended attributes of the table column nivel_usuario


Name Data Type Value Target Name
Compressed (Boolean) false Sybase SQL Anywhere 12
DefaultExt (String) Sybase SQL Anywhere 12

VII.3.1.9.16 Column estado_usuario of the table USUARIO


VII.3.1.9.16.1 Card of the column estado_usuario of the table USUARIO
Name estado_usuario
Code ESTADO_USUARIO
Data Type smallint
Mandatory No

VII.3.1.9.16.2 Check constraint name of the column estado_usuario of the table USUARIO
CKC_ESTADO_USUARIO_USUARIO

VII.3.1.9.16.3 Check of the column estado_usuario of the table USUARIO


Minimum Value
Maximum Value
Default Value
Unit
Format
Cannot Modify No
List Of Values

VII.3.1.9.16.4 Server validation rule of the column estado_usuario of the table USUARIO
%MINMAX% and %LISTVAL% and %CASE% and %RULES%

VII.3.1.9.16.5 List of extended attributes of the table column estado_usuario


Name Data Type Value Target Name
Compressed (Boolean) false Sybase SQL Anywhere 12
DefaultExt (String) Sybase SQL Anywhere 12

PowerDesigner 25-Feb-20 Page 42


Physical Data Model PhysicalDataModel_1

VII.3.1.9.17 List of keys of the table USUARIO


Name Code Primary
Key_1 KEY_1 X

VII.3.1.9.18 Key Key_1 of the table USUARIO


VII.3.1.9.18.1 Card of the key Key_1 of the table USUARIO
Name Key_1
Code KEY_1
Table USUARIO

VII.3.1.9.18.2 Code preview of the key Key_1 of the table USUARIO


if exists(
select 1 from sys.sysconstraint k
join sys.systab t on (t.object_id = k.table_object_id and t.table_name='USUARIO')
where
k.constraint_type = 'P'
) then
alter table USUARIO
delete primary key
end if;

VII.3.1.9.18.3 List of columns of the table key Key_1


Name Code
id_usuario ID_USUARIO

VII.3.1.9.18.4 List of all dependencies of the table key Key_1


Name Code Class Name
Reference_4 REFERENCE_4 Reference

PowerDesigner 25-Feb-20 Page 43


Physical Data Model PhysicalDataModel_1

PowerDesigner 25-Feb-20 Page 44

También podría gustarte