CSS的SQL数据库结构? [英] SQL database structure for CSS?

查看:88
本文介绍了CSS的SQL数据库结构?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个大量使用CSS的网络应用程序,但我希望用户能够对某些课程进行一定程度的控制

和属性。为了实现这一点,我想将我的CSS类存储在一个

的SQL数据库中。


唯一的问题是,我有一个时间试图以规范化的方式设计

数据库表。我搜索了高价和低价

CSS实体关系图的例子 - 无济于事。


这里有没有人做过类似的事情,如果有的话,你有一个我可以借的

例子吗?我觉得我每次都在重新发明轮子

我对此嗤之以鼻,并且很难想象如何分开桌子。它似乎也将是一笔很大的工作量。例如,我开始认为

我将需要的表数将无止境:CssColors,CssAlignments,CssFontStyles,

CssFontFamilies,CssBorderStyles,等等


帮助!

I''m working on a web application that makes heavy use of CSS, but I
would like users to have a degree of control over some of the classes
and attributes. To accomplish this, I want to store my CSS classes in a
SQL database.

The only problem is, I''m having a heck of a time trying to design the
database tables in a normalized way. I have searched high and low for
examples of CSS entity-relationship diagrams--to no avail.

Has anyone here done something similar, and if so, do you have an
example I can borrow? I feel like I''m reinventing the wheel every time
I take a stab at this, and it is difficult trying to visualize how to
separate the tables. It also seems like it is going to be a ton of
work. For example, I am starting to think there will be no end to the
number of tables I''ll need: CssColors, CssAlignments, CssFontStyles,
CssFontFamilies, CssBorderStyles, etc.

Help!

推荐答案

文章< 1114633159.afc5e0ddeb0e4458d0312b537b89968e@teran ews>,< a href =mailto:sk **** @ bones.com> sk **** @ bones.com 说...
In article <1114633159.afc5e0ddeb0e4458d0312b537b89968e@teran ews>, sk****@bones.com says...
我正在网络上工作大量使用CSS的应用程序,但我希望用户能够对某些类和属性进行一定程度的控制。为了实现这一点,我想将我的CSS类存储在一个
SQL数据库中。

唯一的问题是,我有一点时间试图设计
标准化方式的数据库表。我已经搜索了CSS实体关系图的示例 - 无济于事。

这里有没有人做过类似的事情,如果有的话,你有没有? >例子我可以借用吗?我觉得我每次都在重新发明轮子
我对此进行了一次尝试,并且很难想象如何将桌子分开。它似乎也将成为大量的工作。例如,我开始认为我需要的表数将无止境:CssColors,CssAlignments,CssFontStyles,
CssFontFamilies,CssBorderStyles等。
I''m working on a web application that makes heavy use of CSS, but I
would like users to have a degree of control over some of the classes
and attributes. To accomplish this, I want to store my CSS classes in a
SQL database.

The only problem is, I''m having a heck of a time trying to design the
database tables in a normalized way. I have searched high and low for
examples of CSS entity-relationship diagrams--to no avail.

Has anyone here done something similar, and if so, do you have an
example I can borrow? I feel like I''m reinventing the wheel every time
I take a stab at this, and it is difficult trying to visualize how to
separate the tables. It also seems like it is going to be a ton of
work. For example, I am starting to think there will be no end to the
number of tables I''ll need: CssColors, CssAlignments, CssFontStyles,
CssFontFamilies, CssBorderStyles, etc.




AFAICS,你只需要一个包含以下字段的表:

at-rule:String

selector:String

property:String

value:String

important:Boolean



AFAICS, you only need one table with fields for:
at-rule : String
selector : String
property : String
value : String
important : Boolean


在文章< ; 1114635447.805e218ca45779b77652af66747f6d39@teran ews>,

Mr.Clean< mrclean @ p& g.com>写道:
In article <1114635447.805e218ca45779b77652af66747f6d39@teran ews>,
Mr.Clean <mrclean@p&g.com> wrote:
文章< 1114633159.afc5e0ddeb0e4458d0312b537b89968e@teran ews>,
sk * ***@bones.com 说...
In article <1114633159.afc5e0ddeb0e4458d0312b537b89968e@teran ews>,
sk****@bones.com says...
我正在开发一个大量使用CSS的网络应用程序,但我希望用户拥有对某些类和属性的一定程度的控制。为了实现这一点,我想将我的CSS类存储在一个
SQL数据库中。

唯一的问题是,我有一点时间试图设计
标准化方式的数据库表。我已经搜索了CSS实体关系图的示例 - 无济于事。

这里有没有人做过类似的事情,如果有的话,你有没有? >例子我可以借用吗?我觉得我每次都在重新发明轮子
我对此进行了一次尝试,并且很难想象如何将桌子分开。它似乎也将成为大量的工作。例如,我开始认为我需要的表数将无止境:CssColors,CssAlignments,CssFontStyles,
CssFontFamilies,CssBorderStyles等。
I''m working on a web application that makes heavy use of CSS, but I
would like users to have a degree of control over some of the classes
and attributes. To accomplish this, I want to store my CSS classes in a
SQL database.

The only problem is, I''m having a heck of a time trying to design the
database tables in a normalized way. I have searched high and low for
examples of CSS entity-relationship diagrams--to no avail.

Has anyone here done something similar, and if so, do you have an
example I can borrow? I feel like I''m reinventing the wheel every time
I take a stab at this, and it is difficult trying to visualize how to
separate the tables. It also seems like it is going to be a ton of
work. For example, I am starting to think there will be no end to the
number of tables I''ll need: CssColors, CssAlignments, CssFontStyles,
CssFontFamilies, CssBorderStyles, etc.



AFAICS,你只需要一个包含以下字段的表:
at-rule:String
selector:String
property:String
value:String
important:Boolean



AFAICS, you only need one table with fields for:
at-rule : String
selector : String
property : String
value : String
important : Boolean




True。但这意味着我必须为

列构建很多约束。例如,我不希望你有机会

可以选择

颜色的无效(或非网页安全)十六进制代码。此外,我不想允许无效的字体集,不适当的

对齐选择,或不存在的边框样式。


更重要的是,尽管,如果几个类共享相同的字体

系列或颜色,我不想在

单个主表的多行中管理该信息。 br />

例如,如果一个用户想要一天使用蓝色主题并且下一个使用

绿色主题怎么办?我必须在

多行中更改十六进制值,而不是在一个表中更改一行。即使我仍然无法想象它,我认为必须有一种方法来规范化CSS

关系。



True. It would mean I would have to build a lot of constraints for the
columns, though. For instance, I wouldn''t want there to be a chance you
could pick an invalid (or non-web-safe) hexadecimal code for the
colors. Also, I wouldn''t want to allow invalid font sets, inappropriate
alignment choices, or non-existent border styles.

Even more importantly, though, if several classes share the same font
family or colors, I wouldn''t want to have to manage that information in
multiple rows of a single master table.

What if, for example, one user wants to use a blue theme one day and a
green theme the next? I would have to change a hexadecimal value in
multiple rows, rather than one row in one table. Even though I still
can''t visualize it, I think there must be a way to normalize CSS
relationships.

2005年4月27日星期三16:29:03 -0500,

comp.infosystems。 www.authoring.stylesheets Big Slim< sk **** @ bones.com>

写道:
On Wed, 27 Apr 2005 16:29:03 -0500, in
comp.infosystems.www.authoring.stylesheets Big Slim <sk****@bones.com>
wrote:
|在文章< 1114635447.805e218ca45779b77652af66747f6d39@teran ews>,
| Mr.Clean< mrclean @ p& g.com>写道:
|
| >在文章< 1114633159.afc5e0ddeb0e4458d0312b537b89968e@teran ews>,
| > sk****@bones.com 说......
| > >我正在开发一个大量使用CSS的Web应用程序,但我是
> >希望用户对某些类有一定程度的控制权。
| > >和属性。为了实现这一点,我想将我的CSS类存储在
中> > SQL数据库。
| > >
| > >唯一的问题是,我有一点时间试图设计
| > >数据库表以规范化方式表示。我已经搜索了高/低的
| > > CSS实体关系图的例子 - 无济于事。
| > >
| > >有没有人在这做过类似的事情,如果有的话,你有没有
| > >我可以借用的例子吗?我觉得我每次都在重新发明轮子
| > >我对此进行了尝试,很难想象如何使用
> >将表分开。它似乎也将是一大堆
| > >工作。例如,我开始认为
|将无止境> >我需要的桌子数量:CssColors,CssAlignments,CssFontStyles,
| > > CssFontFamilies,CssBorderStyles等
| >
| > AFAICS,您只需要一个包含以下字段的表:
| > at-rule:String
| > selector:String
| > property:String
| > value:String
| >重要:布尔
| >
|
|真正。这意味着我必须为
|构建很多约束但是,列。例如,我不希望你有机会
|可以为
|选择无效的(或非网页安全的)十六进制代码颜色。另外,我不想允许无效的字体集,不合适的
|对齐选择,或不存在的边框样式。
|
|但更重要的是,如果几个类共享相同的字体
|家庭或颜色,我不想在
|中管理这些信息单个主表的多行。
|
|例如,如果一个用户希望有一天使用蓝色主题并且
|绿色主题下一个?我必须在
|中更改十六进制值多行,而不是一个表中的一行。即使我还是
|无法想象它,我认为必须有一种方法来规范化CSS
|关系。
| In article <1114635447.805e218ca45779b77652af66747f6d39@teran ews>,
| Mr.Clean <mrclean@p&g.com> wrote:
|
| > In article <1114633159.afc5e0ddeb0e4458d0312b537b89968e@teran ews>,
| > sk****@bones.com says...
| > > I''m working on a web application that makes heavy use of CSS, but I
| > > would like users to have a degree of control over some of the classes
| > > and attributes. To accomplish this, I want to store my CSS classes in a
| > > SQL database.
| > >
| > > The only problem is, I''m having a heck of a time trying to design the
| > > database tables in a normalized way. I have searched high and low for
| > > examples of CSS entity-relationship diagrams--to no avail.
| > >
| > > Has anyone here done something similar, and if so, do you have an
| > > example I can borrow? I feel like I''m reinventing the wheel every time
| > > I take a stab at this, and it is difficult trying to visualize how to
| > > separate the tables. It also seems like it is going to be a ton of
| > > work. For example, I am starting to think there will be no end to the
| > > number of tables I''ll need: CssColors, CssAlignments, CssFontStyles,
| > > CssFontFamilies, CssBorderStyles, etc.
| >
| > AFAICS, you only need one table with fields for:
| > at-rule : String
| > selector : String
| > property : String
| > value : String
| > important : Boolean
| >
|
| True. It would mean I would have to build a lot of constraints for the
| columns, though. For instance, I wouldn''t want there to be a chance you
| could pick an invalid (or non-web-safe) hexadecimal code for the
| colors. Also, I wouldn''t want to allow invalid font sets, inappropriate
| alignment choices, or non-existent border styles.
|
| Even more importantly, though, if several classes share the same font
| family or colors, I wouldn''t want to have to manage that information in
| multiple rows of a single master table.
|
| What if, for example, one user wants to use a blue theme one day and a
| green theme the next? I would have to change a hexadecimal value in
| multiple rows, rather than one row in one table. Even though I still
| can''t visualize it, I think there must be a way to normalize CSS
| relationships.




我认为你这太复杂了。您的用户将需要很好地掌握CSS来改变他们的方案。你还需要写一个完整的CSS应用程序(ala TopStyle)来保证信息和有效选项。


我发现用户想要选择颜色和

布局选择。他们想要查看不同的选项,只需点击

一个按钮。这可以通过使用预定义的CSS文件来实现。用户

选择保存到数据库,在他们登录时读取并对他们查看的每个页面应用



--- -------------------------------------------------- ----------
jn ****** @ yourpantsyahoo.com.au :脱掉裤子回复

--------------------------------- ------------------------------



I think that you are making this far too complicated. Your users would
have to have a good grasp of CSS to alter their schemes. You would
also need to write a full blown CSS application (ala TopStyle) just to
maintain the information and valid options.

What I have found is that user wants to have a selection of colour and
layout choices. They want to view the different options and just click
a button. This can be achieved by using predefined CSS files. The user
selection is saved to the database, read when they log in and applied
to each page that they view.
---------------------------------------------------------------
jn******@yourpantsyahoo.com.au : Remove your pants to reply
---------------------------------------------------------------


这篇关于CSS的SQL数据库结构?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆